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

:root {
  /* ألوان الهويّة — قيم تجريبيّة يستبدلها الناشر */
  --store-primary: #3D332B;
  --store-primary-dark: #2A221C;
  --store-accent: #CDB277;
  --store-bg: #F7F5F1;
  --store-text: #3D332B;

  /* مشتقّة من الهويّة */
  --surface: color-mix(in srgb, var(--store-text) 5%, var(--store-bg));      /* خلفيّة الأغلفة */
  --cream: color-mix(in srgb, var(--store-accent) 22%, var(--store-bg));      /* بطاقات كريميّة */
  --cocoa: color-mix(in srgb, var(--store-primary) 86%, var(--store-accent)); /* القسم البنّيّ */
  --deep: color-mix(in srgb, var(--store-primary) 88%, #000);                 /* التذييل */
  --line: color-mix(in srgb, var(--store-text) 16%, var(--store-bg));
  --muted: color-mix(in srgb, var(--store-text) 80%, var(--store-bg));
  --on-dark: #FFFFFF;
  --on-dark-muted: color-mix(in srgb, #FFFFFF 78%, var(--store-primary));

  /* ثابتة */
  --white: #FFFFFF;
  --sale: #A8322D;
  --star: #E0A100;
  --type-paper: #DB7056;
  --type-ebook: #5675A3;
  --type-audio: #986AB0;
  --type-edu: #3f8f6b;

  --font: "Tajawal", system-ui, sans-serif;
  --container: 1320px;
  --gutter: 16px;
  --radius: 0px;
  --radius-sm: 0px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}
body[data-corners="rounded"] { --radius: 12px; --radius-sm: 8px; }

/* ---------- أساسيّات ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { scroll-padding-top: 104px; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.75; color: var(--store-text); background-color: 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, figure, blockquote { margin: 0; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.ornament { fill: none; stroke: var(--store-accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; width: 120px; height: 60px; flex: none; }
.ornament--sm { width: 72px; height: 36px; }
[hidden] { display: none !important; }
.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: 3px; }
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 84px; }
.section--tight { padding-block: 48px; }
.marble { background-color: var(--store-bg); background-image: url("assets/texture.jpg"); background-size: 900px auto; background-blend-mode: multiply; }

/* ---------- عنوان القسم ---------- */
.eyebrow { display: inline-block; background: var(--store-accent); color: var(--store-primary-dark); font-size: 13px; font-weight: 700; padding: 3px 12px 2px; line-height: 1.6; margin-bottom: 14px; clip-path: polygon(1% 8%, 99% 0, 100% 90%, 0 100%); }
.heading { font-size: clamp(30px, 3.6vw, 50px); font-weight: 300; line-height: 1.25; text-wrap: balance; }
.heading--sm { font-size: 26px; }
.heading mark { background: none; color: inherit; font-weight: 500; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head__lead { color: var(--muted); max-width: 56ch; margin-top: 10px; }
.section-head--center { justify-content: center; text-align: center; }
.section-head--center .section-head__text { display: grid; justify-items: center; }
.section-head--small { margin-bottom: 22px; }
.link-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: gap .25s var(--ease); }
.link-more:hover { gap: 12px; }
.link-more .icon { width: 17px; height: 17px; }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 30px; border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 500; font-size: 15.5px; transition: background-color .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn .icon { width: 19px; height: 19px; }
.btn--dark { background: var(--store-primary); color: var(--on-dark); }
.btn--dark:hover { background: var(--store-primary-dark); }
.btn--gold { background: var(--store-accent); color: var(--store-primary-dark); }
.btn--gold:hover { background: color-mix(in srgb, var(--store-accent) 85%, var(--white)); }
.btn--outline { border-color: var(--store-primary); color: var(--store-primary); }
.btn--outline:hover { background: var(--store-primary); color: var(--on-dark); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .55); color: var(--on-dark); }
.btn--ghost-light:hover { background: var(--white); color: var(--store-primary); }
.btn:disabled, .btn-add:disabled { background: var(--surface); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.btn[aria-pressed="true"] .icon { fill: var(--sale); stroke: var(--sale); }

/* ---------- الشريط العلويّ ---------- */
.topbar { background: var(--store-primary); color: var(--on-dark); font-size: 13.5px; }
.topbar__inner { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 42px; }
.topbar__msgs { position: relative; min-width: 0; flex: 0 1 520px; height: 24px; text-align: center; }
.topbar__msgs li { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__msgs li.is-active { opacity: 1; transform: none; }
.topbar__msgs .icon { width: 16px; height: 16px; color: var(--store-accent); }
.topbar__arrow { width: 30px; height: 30px; display: grid; place-items: center; color: var(--on-dark-muted); }
.topbar__arrow:hover { color: var(--on-dark); }
.topbar__arrow .icon { width: 17px; height: 17px; }

/* ---------- الرأس ---------- */
.header { position: sticky; top: 0; z-index: 40; background: var(--store-bg); border-bottom: 1px solid var(--line); }
.header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 92px; }
.header__start { display: flex; align-items: center; gap: 14px; min-width: 0; }
.store-info { display: grid; gap: 2px; font-size: 13.5px; color: var(--muted); min-width: 0; }
.store-info a, .store-info span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.store-info a { color: var(--store-text); font-weight: 500; }
.store-info .icon { width: 16px; height: 16px; color: var(--store-text); }
.header__nav { display: flex; align-items: center; gap: 34px; }
.navlinks { display: flex; gap: 26px; font-size: 15.5px; }
.navlinks a { position: relative; padding-block: 6px; }
.navlinks a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transition: transform .25s var(--ease); }
.navlinks a:hover::after, .navlinks a.is-active::after { transform: scaleX(1); }
.navlinks a.is-active { font-weight: 700; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__logo { width: 52px; height: 52px; border-radius: 50%; }
.brand__name { font-size: 22px; font-weight: 500; white-space: nowrap; }
.header__tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.tool { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 42px; height: 42px; justify-content: center; padding-inline: 8px; }
.tool .icon { width: 22px; height: 22px; }
.tool__label { font-size: 14.5px; }
.tool__count { position: absolute; top: 3px; inset-inline-end: 1px; min-width: 18px; height: 18px; padding-inline: 4px; border-radius: 9px; background: var(--store-accent); color: var(--store-primary-dark); font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.menu-toggle { display: none; }
.search-panel { border-top: 1px solid var(--line); background: var(--store-bg); padding-block: 20px; box-shadow: 0 18px 30px rgba(40, 28, 18, .08); position: absolute; inset-inline: 0; top: 100%; }
.search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; border: 1px solid var(--store-primary); border-radius: var(--radius-sm); background: var(--white); overflow: hidden; }
.search__select { border: 0; border-inline-end: 1px solid var(--line); background: transparent; padding-inline: 16px 12px; font-size: 14.5px; max-width: 190px; }
.search__input { border: 0; padding: 0 18px; min-height: 52px; min-width: 0; background: transparent; }
.search__input:focus, .search__select:focus { outline: none; }
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-accent) 55%, transparent); }
.search__btn { display: inline-flex; align-items: center; gap: 8px; background: var(--store-primary); color: var(--on-dark); padding-inline: 26px; font-weight: 500; }
.search__btn .icon { width: 19px; height: 19px; }
.search-panel__pop { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
.search-panel__pop a { color: var(--store-text); border-bottom: 1px solid var(--line); }
.search-panel__pop a:hover { border-color: currentColor; }

/* ---------- الدرج الجانبيّ ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(30, 22, 16, .5); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer__panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(340px, 88vw); background: var(--store-bg); overflow-y: auto; padding: 18px 20px 28px; transform: translateX(100%); transition: transform .3s var(--ease); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.drawer__head .brand__logo { width: 40px; height: 40px; }
.drawer__head .brand__name { font-size: 18px; }
.drawer__close { width: 40px; height: 40px; display: grid; place-items: center; }
.drawer__close .icon { width: 22px; height: 22px; }
.drawer__title { font-size: 13px; color: var(--muted); margin: 20px 0 6px; }
.drawer__list a { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.drawer__list .icon { width: 16px; height: 16px; color: var(--muted); }
.drawer__foot { display: grid; gap: 12px; margin-top: 22px; font-size: 14.5px; }
.drawer__foot a { display: inline-flex; align-items: center; gap: 10px; }
.drawer__foot .icon { width: 18px; height: 18px; }
body.is-locked { overflow: hidden; }

/* ---------- التبويبات ---------- */
.tabs { display: flex; gap: 28px; flex-wrap: wrap; }
.tab { position: relative; padding: 4px 0 8px; color: var(--muted); font-size: 16px; }
.tab::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: var(--store-accent); transform: scaleX(0); transition: transform .25s var(--ease); }
.tab:is(.is-active, [aria-selected="true"]) { color: var(--store-text); font-weight: 500; }
.tab:is(.is-active, [aria-selected="true"])::after, .tab:hover::after { transform: scaleX(1); }

/* ---------- بطاقة الكتاب ---------- */
.book-grid { --per-row: 4; display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 44px 28px; }
body[data-books-per-row="3"] .book-grid { --per-row: 3; }
body[data-books-per-row="5"] .book-grid { --per-row: 5; }
body[data-books-per-row="6"] .book-grid { --per-row: 6; }
.book-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.book-card__media { position: relative; background: var(--surface); padding: 30px 14% 26px; border-radius: var(--radius); transition: background-color .3s; }
.book-card:hover .book-card__media { background: var(--cream); }
.cover { display: block; position: relative; aspect-ratio: 2 / 3; }
.cover img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 14px 26px rgba(40, 28, 18, .22); transition: transform .35s var(--ease); }
.book-card:hover .cover img { transform: translateY(-4px); }
.type-dot { position: absolute; bottom: 10px; inset-inline-end: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--white); box-shadow: 0 0 0 3px var(--store-bg); }
.type-dot .icon { width: 16px; height: 16px; stroke-width: 1.9; }
.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); }
.cover .type-dot { bottom: 6px; inset-inline-end: 6px; width: 24px; height: 24px; box-shadow: 0 0 0 2px var(--white); }
.cover .type-dot .icon { width: 13px; height: 13px; }
.badge { position: absolute; top: 12px; inset-inline-start: 12px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; line-height: 1.7; z-index: 2; }
.badge--sale { background: var(--store-accent); color: var(--store-primary-dark); }
.badge--new { background: var(--store-primary); color: var(--on-dark); }
.soldout { position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%); background: color-mix(in srgb, var(--store-bg) 90%, transparent); text-align: center; padding: 8px; font-weight: 700; font-size: 14px; z-index: 2; }
.is-soldout .cover img { filter: grayscale(.7); opacity: .75; }
.wish-btn { position: absolute; top: 10px; inset-inline-end: 10px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--store-bg); color: var(--store-text); opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; z-index: 2; }
.wish-btn .icon { width: 19px; height: 19px; }
.book-card:hover .wish-btn, .wish-btn:focus-visible, .wish-btn[aria-pressed="true"] { opacity: 1; transform: none; }
.wish-btn[aria-pressed="true"] .icon { fill: var(--sale); stroke: var(--sale); }
@media (hover: none) { .wish-btn { opacity: 1; transform: none; } }
.book-card__body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding-top: 18px; flex: 1; }
.book-card__title { font-size: 19px; font-weight: 400; 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-underline-offset: 4px; text-decoration-thickness: 1px; }
.book-card__author { color: var(--muted); font-size: 14.5px; }
.book-card__desc { display: none; }
.rating { display: inline-flex; align-items: center; gap: 6px; }
.rating__count { color: var(--muted); font-size: 13px; }
.stars { display: inline-flex; gap: 1px; }
.stars .icon { width: 14px; height: 14px; color: color-mix(in srgb, var(--store-text) 22%, var(--store-bg)); }
.stars .icon.is-on { color: var(--star); }
.stars--lg .icon { width: 18px; height: 18px; }
.price { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.price__now { font-weight: 700; font-size: 17px; }
.price--sale .price__now { color: var(--sale); }
.price__old { color: var(--muted); text-decoration: line-through; font-size: 14.5px; }
.btn-add { margin-top: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; border: 1px solid var(--store-primary); border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 500; transition: background-color .2s, color .2s; margin-top: auto; }
.book-card__body .price { margin-bottom: 14px; }
.btn-add .icon { width: 18px; height: 18px; }
.btn-add:hover:not(:disabled) { background: var(--store-primary); color: var(--on-dark); }
/* شكل البطاقة */
body[data-card-style="framed"] .book-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 16px; background: var(--white); }
body[data-card-style="framed"] .book-card__media { border-radius: var(--radius-sm); }
body[data-card-style="minimal"] .book-card__media { background: none; padding: 0; }
body[data-card-style="minimal"] .btn-add { border-color: transparent; min-height: 36px; text-decoration: underline; text-underline-offset: 5px; }

/* ---------- البطاقة الصغيرة و«شاهدتَه مؤخّرًا» ---------- */
.mini-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; }
.mini-card .cover img { box-shadow: 0 6px 12px rgba(40, 28, 18, .18); }
.mini-card__body { display: grid; gap: 1px; min-width: 0; }
.mini-card__title { font-size: 15.5px; font-weight: 500; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-card__author { color: var(--muted); font-size: 13.5px; }
.mini-card .price { justify-content: flex-start; margin: 0; gap: 8px; }
.mini-card .price__now { font-size: 15px; }
.mini-card .price__old { font-size: 13px; }
.recent { border-top: 1px solid var(--line); }
.recent__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }

/* ---------- التصنيفات ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 26px; }
.cat-tile { display: grid; gap: 4px; justify-items: center; text-align: center; }
.cat-tile__img { display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); margin-bottom: 12px; }
.cat-tile__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.cat-tile:hover .cat-tile__img img { transform: scale(1.05); }
.cat-tile__name { font-size: 22px; font-weight: 300; line-height: 1.3; }
.cat-tile__count { color: var(--muted); font-size: 14px; }

/* ---------- شريط الثقة والقسم البنّيّ ---------- */
.cocoa { background: var(--cocoa); color: var(--on-dark); }
.cocoa .heading { color: var(--on-dark); }
.cocoa p { color: var(--on-dark-muted); }
.cocoa .eyebrow { color: var(--store-primary-dark); }
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.trust__item { display: flex; gap: 16px; align-items: flex-start; }
.trust__icon { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border: 1px solid var(--store-accent); border-radius: 50%; color: var(--store-accent); }
.trust__icon .icon { width: 24px; height: 24px; }
.trust__title { font-size: 20px; font-weight: 400; color: inherit; }
.trust__text { font-size: 14.5px; }
.cocoa .trust__title { color: var(--on-dark); }
.trust--light .trust__icon { border-color: var(--store-primary); color: var(--store-primary); }
.trust--light .trust__text { color: var(--muted); }

/* ---------- المؤلّفون في الشريط الداكن ---------- */
.dark-band { background: var(--store-primary); color: var(--on-dark); position: relative; overflow: hidden; }
.dark-band .heading { color: var(--on-dark); }
.dark-band .section-head__lead { color: var(--on-dark-muted); }
.scroller { position: relative; }
.scroller__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 24px) / 4); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.scroller__track::-webkit-scrollbar { display: none; }
.scroller__track > * { scroll-snap-align: start; }
.author-card { background: var(--cream); color: var(--store-text); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.author-card__img { display: block; aspect-ratio: 1; overflow: hidden; }
.author-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.author-card:hover .author-card__img img { transform: scale(1.04); }
.author-card__body { padding: 20px 22px 24px; display: grid; gap: 6px; }
.author-card__meta { font-size: 13px; font-weight: 700; color: var(--muted); }
.author-card__name { font-size: 21px; font-weight: 500; }
.author-card__bio { font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.arrows { display: flex; gap: 8px; }
.arrow { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: background-color .2s, color .2s; }
.arrow .icon { width: 20px; height: 20px; }
.arrow:hover:not(:disabled) { background: var(--store-primary); color: var(--on-dark); border-color: var(--store-primary); }
.arrow:disabled { opacity: .35; cursor: default; }
.dark-band .arrow { border-color: rgba(255, 255, 255, .35); color: var(--on-dark); }
.dark-band .arrow:hover:not(:disabled) { background: var(--store-accent); color: var(--store-primary-dark); border-color: var(--store-accent); }
.dark-band .ornament { position: absolute; opacity: .55; width: 260px; height: 130px; }

/* ---------- الآراء ---------- */
.quote { text-align: center; max-width: 900px; margin: 0 auto 56px; display: grid; justify-items: center; gap: 22px; }
.quote blockquote p { font-size: clamp(22px, 2.6vw, 34px); font-weight: 300; line-height: 1.6; text-wrap: balance; }
.quote figcaption { display: grid; justify-items: center; gap: 6px; font-size: 14.5px; color: var(--muted); }
.quote figcaption strong { display: block; color: var(--store-text); font-weight: 700; font-size: 16px; }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.review-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: grid; gap: 14px; align-content: start; background: color-mix(in srgb, var(--white) 55%, transparent); }
.review-card__text { font-size: 15.5px; }
.review-card__who { display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.review-card__name { font-weight: 700; }
.review-card__role { font-size: 13.5px; color: var(--muted); }

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

/* ---------- الحقول والكمّيّة وترقيم الصفحات ---------- */
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.input, .select { min-height: 50px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); padding: 0 16px; width: 100%; }
.input:focus, .select:focus { outline: none; border-color: var(--store-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-accent) 45%, transparent); }
.qty { display: inline-grid; grid-template-columns: 44px 52px 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); height: 50px; }
.qty button { display: grid; place-items: center; }
.qty button .icon { width: 17px; height: 17px; }
.qty input { border: 0; text-align: center; width: 100%; background: transparent; -moz-appearance: textfield; font-weight: 700; }
.qty input:focus { outline: none; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; padding-inline: 6px; }
.pagination a:hover { border-color: var(--store-primary); }
.pagination .is-current { background: var(--store-primary); color: var(--on-dark); border-color: var(--store-primary); }
.pagination .is-gap { border: 0; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }
.pagination .icon { width: 18px; height: 18px; }

/* ---------- التذييل والنشرة ---------- */
.footer { background: var(--deep); color: var(--on-dark-muted); font-size: 15px; }
.footer__news { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 30px; align-items: center; padding-block: 56px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer__news-text { display: grid; gap: 6px; }
.footer__news-title { font-size: clamp(26px, 3vw, 38px); font-weight: 300; color: var(--on-dark); }
.newsletter-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius-sm); overflow: hidden; }
.newsletter-form input { border: 0; background: transparent; color: var(--on-dark); padding: 0 18px; min-height: 54px; min-width: 0; }
.newsletter-form input::placeholder { color: var(--on-dark-muted); }
.newsletter-form input:focus { outline: none; }
.newsletter-form:focus-within { border-color: var(--store-accent); }
.newsletter-form .btn { border-radius: 0; }
.footer__main { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 36px; padding-block: 56px; }
.footer__about { display: grid; gap: 16px; align-content: start; }
.brand--light .brand__name { color: var(--on-dark); }
.footer__title { color: var(--store-accent); font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.footer__links { display: grid; gap: 10px; }
.footer__links a:hover, .footer__contact a:hover { color: var(--on-dark); }
.footer__contact { display: grid; gap: 12px; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact .icon { width: 18px; height: 18px; margin-top: 4px; color: var(--store-accent); }
.socials { display: flex; gap: 8px; }
.socials a { width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; display: grid; place-items: center; color: var(--on-dark); transition: background-color .2s, color .2s; }
.socials a:hover { background: var(--store-accent); color: var(--store-primary-dark); border-color: var(--store-accent); }
.socials .icon { width: 18px; height: 18px; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 64px; padding-block: 12px; }
.pay-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .22); padding: 3px 10px; font-size: 13px; color: var(--on-dark); }
.pay-chip .icon { width: 16px; height: 16px; color: var(--store-accent); }

/* ---------- التجاوب ---------- */
@media (max-width: 1200px) {
  .header__inner { grid-template-columns: auto 1fr auto; }
  .header__nav .navlinks, .store-info { display: none; }
  .header__nav { justify-content: center; }
  .menu-toggle { display: inline-flex; }
  .footer__main { grid-template-columns: 1fr 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
  .book-grid { --per-row: 3 !important; }
  .scroller__track { grid-auto-columns: calc((100% - 2 * 24px) / 3); }
}
@media (max-width: 900px) {
  .header__nav { justify-content: flex-start; }
  .section { padding-block: 60px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trust, .reviews { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .footer__news { grid-template-columns: minmax(0, 1fr); }
  .recent__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .recent__list > :nth-child(n+4) { display: none; }
}
@media (max-width: 640px) {
  .section { padding-block: 48px; }
  .section-head { margin-bottom: 26px; }
  .header__inner { min-height: 70px; gap: 8px; }
  .brand__logo { width: 42px; height: 42px; }
  .brand__name { font-size: 18px; }
  .header__nav .brand__name { display: none; }
  .hide-sm, .tool__label { display: none; }
  .tool { min-width: 38px; padding-inline: 4px; }
  .topbar__arrow { display: none; }
  .topbar__msgs { font-size: 12.5px; }
  .book-grid { --per-row: 2 !important; gap: 30px 14px; }
  .book-card__media { padding: 20px 12% 18px; }
  .book-card__title { font-size: 16px; }
  .btn-add span { display: none; }
  .btn-add { min-height: 40px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .cat-tile__name { font-size: 19px; }
  .scroller__track { grid-auto-columns: 78%; gap: 16px; }
  .search { grid-template-columns: minmax(0, 1fr) auto; }
  .search__select { display: none; }
  .search__btn span { display: none; }
  .search__btn { padding-inline: 18px; }
  .footer__main { grid-template-columns: 1fr 1fr; gap: 28px; }
  .recent__list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .btn { padding: 0 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================
   صفحة المكوّنات فقط (kit-*) — للمراجعة، تُحذف عند التحويل
   ========================================================== */
.kit-options { position: relative; z-index: 60; background: var(--store-primary-dark); color: var(--on-dark); 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: 3px 12px; border: 1px solid rgba(255, 255, 255, .35); color: var(--on-dark); font-size: 13px; }
.kit-options button[aria-pressed="true"] { background: var(--store-accent); color: var(--store-primary-dark); border-color: var(--store-accent); font-weight: 700; }
.kit-hero { border-bottom: 1px solid var(--line); padding-block: 40px; }
.kit-hero h1 { font-size: 40px; font-weight: 300; }
.kit-hero p { color: var(--muted); max-width: 720px; }
.kit-block { padding-block: 44px; border-bottom: 1px dashed var(--line); }
.kit-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); margin-bottom: 22px; }
.kit-label::before { content: ""; width: 10px; height: 10px; background: var(--store-accent); transform: rotate(45deg); }
.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: 22px; }
.kit-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--line); background: var(--white); }
.swatch__color { height: 64px; border-bottom: 1px solid var(--line); }
.swatch__meta { padding: 8px 10px; font-size: 13px; display: grid; }
.swatch__meta code { font-size: 11.5px; color: var(--muted); direction: ltr; text-align: right; }
.kit-dark { padding: 36px; margin-top: 22px; }
@media (max-width: 900px) { .kit-cols { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================
   الرئيسيّة
   ========================================================== */
.section--soft { background: var(--surface); }
.tabs-center { display: flex; justify-content: center; margin: -14px 0 40px; }
/* السلايدر */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero__leaf { position: absolute; z-index: 0; pointer-events: none; }
.hero__leaf--a { width: 420px; height: 210px; top: -60px; inset-inline-start: -130px; transform: rotate(-32deg); opacity: .6; }
.hero__leaf--b { width: 300px; height: 150px; bottom: 30px; inset-inline-end: -60px; transform: rotate(150deg); opacity: .7; }
.slider { position: relative; z-index: 1; min-height: 600px; display: grid; }
.slide { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 40px; padding-block: 70px 110px; opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide__title { font-size: clamp(36px, 5.2vw, 74px); font-weight: 300; line-height: 1.18; margin-bottom: 18px; text-wrap: balance; }
.slide__title mark { background: none; color: inherit; font-weight: 500; }
.slide__text { font-size: 18px; color: var(--muted); max-width: 46ch; margin-bottom: 20px; }
.slide__price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 28px; }
.slide__price small { color: var(--muted); font-size: 15px; }
.slide__price strong { font-size: 30px; font-weight: 500; }
.slide__media { position: relative; display: grid; place-items: center; min-height: 460px; }
.slide__media::before { content: ""; position: absolute; width: min(420px, 80%); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--store-accent); }
.slide__cover { position: relative; width: min(290px, 60%); aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 30px 50px rgba(40, 28, 18, .32); transform: rotate(-3deg); transition: transform .9s var(--ease); }
.slide__back { position: absolute; width: min(240px, 50%); aspect-ratio: 2 / 3; transform: translate(-46%, 6%) rotate(8deg); opacity: .95; }
.slide__back img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 20px 36px rgba(40, 28, 18, .25); }
.slide.is-active .slide__cover { transform: rotate(-3deg) translateY(-6px); }
.slider__nav { position: absolute; bottom: 36px; inset-inline-start: 0; display: flex; align-items: center; gap: 14px; z-index: 3; }
.slider__dots { display: flex; gap: 8px; }
.slider__dot { width: 10px; height: 10px; border: 1px solid var(--store-primary); transform: rotate(45deg); transition: background-color .25s; }
.slider__dot.is-active { background: var(--store-primary); }
/* عن الدار */
.about { padding-block: 90px 70px; position: relative; overflow: hidden; }
.about__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 70px; align-items: center; }
.about__text { display: grid; gap: 18px; justify-items: start; }
.about__text .eyebrow { margin-bottom: 0; }
.about__lead { font-size: 17.5px; max-width: 54ch; }
.about__media { position: relative; }
.about__media img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: var(--radius); }
.about__leaf { position: absolute; width: 200px; height: 100px; bottom: -34px; inset-inline-start: -60px; }
.about__trust { margin-top: 80px; padding-top: 50px; border-top: 1px solid rgba(255, 255, 255, .16); }
.about__trust-title { font-size: 28px; font-weight: 300; color: var(--on-dark); margin-bottom: 30px; }
/* الشريط الداكن */
.band__leaf--a { top: 30px; inset-inline-end: -40px; transform: rotate(160deg); }
.band__leaf--b { bottom: 40px; inset-inline-start: -70px; transform: rotate(-20deg); }
.dark-band .container { position: relative; z-index: 1; }
@media (max-width: 1200px) {
  .slide { gap: 20px; }
}
@media (max-width: 900px) {
  .slider { min-height: 0; }
  .slide { grid-template-columns: minmax(0, 1fr); text-align: center; padding-block: 44px 100px; gap: 10px; }
  .slide__text-col { display: grid; justify-items: center; }
  .slide__text { margin-inline: auto; }
  .slide__media { min-height: 340px; order: -1; }
  .slider__nav { inset-inline: 0; justify-content: center; bottom: 30px; }
  .about__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .about__media { max-width: 460px; }
  .hero__leaf--a { width: 260px; height: 130px; }
}
@media (max-width: 640px) {
  .slide__media { min-height: 280px; }
  .slide__cover { width: 170px; }
  .slide__back { width: 140px; }
  .slide__text { font-size: 16px; }
  .slide__price strong { font-size: 24px; }
  .about { padding-block: 56px; }
  .about__trust { margin-top: 50px; padding-top: 36px; }
  .tabs { gap: 18px; }
  .tabs-center { margin-bottom: 26px; }
}

/* ==========================================================
   رأس الصفحات الداخليّة، والتصنيف
   ========================================================== */
.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding-block: 46px 50px; text-align: center; }
.page-hero__inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 12px; }
.page-hero__leaf { position: absolute; width: 340px; height: 170px; top: -30px; inset-inline-end: -70px; transform: rotate(155deg); opacity: .7; }
.page-hero__title { font-size: clamp(36px, 4.6vw, 62px); font-weight: 300; line-height: 1.2; }
.page-hero__sub { color: var(--muted); font-size: 17px; max-width: 60ch; }
.breadcrumb ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line); }
.breadcrumb a:hover { color: var(--store-text); }
.breadcrumb [aria-current] { color: var(--store-text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: color-mix(in srgb, var(--white) 60%, transparent); padding: 4px 16px; font-size: 14.5px; border-radius: var(--radius-sm); }
.chip:hover { border-color: var(--store-primary); }
.chip.is-active { background: var(--store-primary); color: var(--on-dark); border-color: var(--store-primary); }
.chip button { display: grid; place-items: center; }
.chip .icon { width: 14px; height: 14px; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn--block { width: 100%; }
.shop-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; padding-block: 50px 80px; align-items: start; }
.drawer--filters { position: static; visibility: visible; z-index: auto; }
.drawer--filters .drawer__overlay, .drawer--filters .drawer__head .drawer__close { display: none; }
.drawer--filters .drawer__panel { position: static; transform: none; width: auto; padding: 0; background: none; overflow: visible; }
.drawer--filters .drawer__head { padding-bottom: 12px; }
.drawer--filters .drawer__head h2 { font-size: 22px; font-weight: 300; }
.filter-block { padding-block: 20px; border-bottom: 1px solid var(--line); }
.filter-block h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.filter-list { display: grid; gap: 4px; }
.filter-list a { display: flex; justify-content: space-between; padding: 5px 0; color: var(--muted); }
.filter-list a:hover, .filter-list a.is-active { color: var(--store-text); }
.filter-list a.is-active { font-weight: 700; }
.count { color: var(--muted); font-size: 13px; margin-inline-start: auto; }
.check { display: flex; align-items: center; gap: 10px; padding: 4px 0; cursor: pointer; font-size: 15px; }
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; flex: none; border: 1px solid var(--store-text); border-radius: var(--radius-sm); 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: 9px; height: 5px; border: 2px solid var(--on-dark); border-top: 0; border-inline-end: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check .type-dot { position: static; width: 24px; height: 24px; box-shadow: none; }
.check .type-dot .icon { width: 13px; height: 13px; }
.price-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 12px; }
.price-range .input { min-height: 44px; text-align: center; padding: 0 8px; }
.filters-actions { display: none; }
.filters-btn { display: none; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.toolbar__count { color: var(--muted); }
.toolbar__count strong { color: var(--store-text); }
.toolbar__tools { display: flex; align-items: center; gap: 10px; }
.toolbar .select { min-height: 44px; width: auto; min-width: 190px; }
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button { width: 44px; height: 42px; display: grid; place-items: center; color: var(--muted); }
.view-toggle button[aria-pressed="true"] { background: var(--store-primary); color: var(--on-dark); }
.view-toggle .icon { width: 19px; height: 19px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 30px; }
.active-filters__clear { font-size: 14px; border-bottom: 1px solid currentColor; }
.shop-grid { --per-row: 3 !important; margin-bottom: 50px; }
.shop-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
.shop-grid.is-list .book-card { flex-direction: row; gap: 28px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.shop-grid.is-list .book-card__media { width: 200px; flex: none; padding: 20px 26px; }
.shop-grid.is-list .book-card__body { align-items: flex-start; text-align: start; padding-top: 6px; }
.shop-grid.is-list .book-card__desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 15px; margin-block: 6px; max-width: 60ch; }
.shop-grid.is-list .price { justify-content: flex-start; }
.shop-grid.is-list .btn-add { width: auto; padding-inline: 28px; margin-top: 0; }
@media (max-width: 1200px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); }
  .drawer--filters { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
  .drawer--filters.is-open { visibility: visible; }
  .drawer--filters .drawer__overlay, .drawer--filters .drawer__head .drawer__close { display: grid; }
  .drawer--filters .drawer__overlay { display: block; }
  .drawer--filters .drawer__panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(360px, 90vw); background: var(--store-bg); overflow-y: auto; padding: 18px 20px 0; transform: translateX(100%); }
  .drawer--filters.is-open .drawer__panel { transform: none; }
  .filters-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: sticky; bottom: 0; background: var(--store-bg); padding-block: 14px; border-top: 1px solid var(--line); }
  .filters-btn { display: inline-flex; }
  .shop-grid { --per-row: 3 !important; }
}
@media (max-width: 640px) {
  .page-hero { padding-block: 32px 34px; }
  .page-hero__leaf { width: 200px; height: 100px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; max-width: 100%; padding-bottom: 4px; scrollbar-width: none; }
  .chip { white-space: nowrap; }
  .shop-layout { padding-block: 26px 50px; }
  .toolbar__tools { width: 100%; }
  .toolbar .select { min-width: 0; flex: 1; }
  .shop-grid { --per-row: 2 !important; }
  .shop-grid.is-list .book-card { gap: 16px; }
  .shop-grid.is-list .book-card__media { width: 120px; padding: 12px 14px; }
  .shop-grid.is-list .book-card__desc { display: none; }
  .shop-grid.is-list .btn-add { padding-inline: 14px; }
}

/* ==========================================================
   صفحات الكتب الأربع
   ========================================================== */
.product-crumbs { padding-top: 26px; }
.breadcrumb--start ol { justify-content: flex-start; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) 340px; gap: 44px; padding-block: 22px 70px; align-items: start; }
.product__gallery { display: grid; gap: 16px; position: sticky; top: 112px; }
.product__stage { position: relative; overflow: hidden; background: var(--surface); padding: 56px 18% 50px; border-radius: var(--radius); }
.product__stage .cover img { box-shadow: 0 30px 50px rgba(40, 28, 18, .28); }
.product__stage .badge { top: 18px; inset-inline-start: 18px; }
.product__leaf { position: absolute; width: 220px; height: 110px; bottom: -14px; inset-inline-end: -50px; transform: rotate(-25deg); opacity: .75; }
.product__info { display: grid; gap: 18px; align-content: start; }
.product__author { color: var(--muted); }
.product__author a { color: var(--store-text); border-bottom: 1px solid var(--line); }
.product__title { font-size: clamp(32px, 3.4vw, 48px); font-weight: 300; line-height: 1.2; }
.product__meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.product__meta .rating span { color: var(--muted); }
.type-label, .meta-chip { display: inline-flex; align-items: center; gap: 8px; }
.type-label .type-dot { position: static; width: 26px; height: 26px; box-shadow: none; }
.type-label .type-dot .icon { width: 14px; height: 14px; }
.meta-chip { border: 1px solid var(--line); padding: 2px 12px; }
.meta-chip .icon { width: 16px; height: 16px; }
.product__lead { font-size: 17.5px; }
.spec-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.spec-list div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; font-weight: 500; text-align: end; }
.formats h3 { font-size: 15px; font-weight: 700; 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; border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius-sm); transition: border-color .2s; }
.format:hover { border-color: var(--store-primary); }
.format.is-current { border-color: var(--store-primary); background: var(--cream); }
.format .type-dot { position: static; width: 28px; height: 28px; box-shadow: none; flex: none; }
.format .type-dot .icon { width: 15px; height: 15px; }
.format__text { display: grid; line-height: 1.4; font-size: 13.5px; min-width: 0; }
.format__text strong { font-weight: 500; }
.format__text span { color: var(--muted); }
/* صندوق الشراء الداكن */
.buybox { background: var(--store-primary); color: var(--on-dark); padding: 30px 26px; border-radius: var(--radius); display: grid; gap: 14px; position: sticky; top: 112px; }
.buybox .price { justify-content: flex-start; margin: 0; }
.buybox .price__now { font-size: 32px; font-weight: 500; }
.buybox .price--sale .price__now { color: var(--store-accent); }
.buybox .price__old { color: var(--on-dark-muted); font-size: 16px; }
.save-note { color: var(--store-accent); font-size: 14px; font-weight: 500; }
.stock { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; }
.stock::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #5DBB63; flex: none; }
.stock--low::before { background: #F0A030; }
.stock--out::before { background: #E5534B; }
.buybox__row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.buybox .qty { border-color: transparent; }
.buybox .qty input { color: var(--store-text); }
.buybox .qty button { color: var(--store-text); }
.buybox__perks { display: grid; gap: 12px; padding-top: 16px; margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, .16); }
.buybox__perks li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.buybox__perks .icon { width: 20px; height: 20px; color: var(--store-accent); margin-top: 2px; }
.buybox__perks strong { display: block; font-weight: 500; }
.buybox__perks span { color: var(--on-dark-muted); font-size: 13.5px; }
.buybox__links { display: flex; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 14px; }
.buybox__links button { display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark); }
.buybox__links .icon { width: 17px; height: 17px; }
.buybox__links [aria-pressed="true"] .icon { fill: #E5534B; stroke: #E5534B; }
/* عيّنة الصوت */
.sample-player { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); padding: 14px 16px; border-radius: var(--radius); background: var(--white); }
.sample-player__btn { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--store-primary); color: var(--on-dark); 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; display: grid; gap: 6px; }
.sample-player__label { font-size: 14px; font-weight: 500; }
.sample-player__time { font-size: 13px; color: var(--muted); direction: ltr; white-space: nowrap; }
.wave { display: flex; align-items: center; gap: 2px; height: 26px; }
.wave span { flex: 1; min-width: 2px; background: var(--line); }
.wave span.is-played { background: var(--store-accent); }
/* الوسيلة التعليميّة */
.edu-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.edu-fact { display: flex; gap: 10px; align-items: center; background: var(--cream); padding: 12px; border-radius: var(--radius-sm); }
.edu-fact__icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1px solid var(--store-primary); border-radius: 50%; }
.edu-fact__icon .icon { width: 19px; height: 19px; }
.edu-fact small { display: block; color: var(--muted); font-size: 12.5px; }
.edu-fact strong { font-weight: 700; font-size: 15px; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; }
.safety-note { display: flex; gap: 10px; align-items: flex-start; border-inline-start: 3px solid var(--store-accent); background: var(--surface); padding: 12px 14px; font-size: 14.5px; }
.safety-note .icon { width: 20px; height: 20px; color: var(--sale); margin-top: 3px; }
/* التبويبات والتفاصيل */
.details { padding-block: 30px 70px; }
.details > .tabs { border-bottom: 1px solid var(--line); margin-bottom: 36px; gap: 34px; }
.details > .tabs .tab { font-size: 19px; font-weight: 300; padding-bottom: 14px; }
.details > .tabs .tab.is-active { font-weight: 500; }
.prose { max-width: 72ch; font-size: 17px; display: grid; gap: 14px; }
.prose h3 { font-size: 24px; font-weight: 400; margin-top: 10px; }
.spec-table { width: 100%; max-width: 760px; border-collapse: collapse; font-size: 15.5px; }
.spec-table th, .spec-table td { text-align: start; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.spec-table th { width: 38%; font-weight: 500; color: var(--muted); background: var(--surface); }
.chapters { display: grid; max-width: 760px; }
.chapters li { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.chapters__num { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 1px solid var(--store-accent); border-radius: 50%; font-size: 14px; }
.chapters__title { flex: 1; min-width: 0; }
.chapters__free { background: var(--store-accent); color: var(--store-primary-dark); font-size: 12.5px; font-weight: 700; padding: 1px 10px; }
.chapters__lock { width: 17px; height: 17px; color: var(--muted); }
.chapters__time { color: var(--muted); font-size: 14px; direction: ltr; }
.reviews-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 40px; align-items: start; }
.rating-box { background: var(--cream); padding: 26px; border-radius: var(--radius); display: grid; gap: 8px; justify-items: start; }
.rating-box__score { font-size: 56px; font-weight: 300; line-height: 1; }
.rating-bars { display: grid; gap: 6px; width: 100%; margin-top: 8px; font-size: 13.5px; }
.rating-bars__row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 28px; gap: 10px; align-items: center; }
.rating-bars__track { height: 6px; background: color-mix(in srgb, var(--store-text) 12%, var(--store-bg)); overflow: hidden; }
.rating-bars__fill { display: block; height: 100%; background: var(--star); }
.review-form { border: 1px solid var(--line); padding: 22px; border-radius: var(--radius); display: grid; gap: 12px; }
.review-form h3 { font-size: 20px; font-weight: 400; }
.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: color-mix(in srgb, var(--store-text) 25%, var(--store-bg)); }
.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); }
.textarea { min-height: 110px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); padding: 12px 14px; resize: vertical; width: 100%; }
.textarea:focus { outline: none; border-color: var(--store-primary); }
.reviews-list { display: grid; gap: 16px; }
.author-box { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 30px; align-items: center; background: var(--cream); padding: 32px; border-radius: var(--radius); position: relative; overflow: hidden; }
.author-box img { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; }
.author-box h2 { font-size: 30px; font-weight: 300; margin-bottom: 6px; }
.author-box p:not(.eyebrow) { color: var(--muted); max-width: 64ch; }
.scroller__track--books { --per-row: 4; grid-auto-columns: calc((100% - (var(--per-row) - 1) * 28px) / var(--per-row)); gap: 28px; }
body[data-books-per-row="3"] .scroller__track--books { --per-row: 3; }
body[data-books-per-row="5"] .scroller__track--books { --per-row: 5; }
body[data-books-per-row="6"] .scroller__track--books { --per-row: 6; }
.sticky-buy { display: none; }
@media (max-width: 1200px) {
  .product { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .buybox { grid-column: 1 / -1; position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .buybox > .price, .buybox > .save-note, .buybox > .stock { grid-column: 1; }
  .buybox__perks, .buybox__links { grid-column: 1 / -1; }
  .reviews-layout { grid-template-columns: minmax(0, 1fr); }
  .scroller__track--books { --per-row: 3 !important; }
}
@media (max-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .product__gallery { position: static; max-width: 460px; width: 100%; justify-self: center; }
  .buybox { grid-template-columns: minmax(0, 1fr); }
  .author-box { grid-template-columns: 110px minmax(0, 1fr); }
  .author-box img { width: 110px; height: 110px; }
  .author-box .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 640px) {
  .product__stage { padding: 36px 20% 34px; }
  .spec-list { grid-template-columns: minmax(0, 1fr); }
  .formats__list { grid-template-columns: minmax(0, 1fr); }
  .edu-facts { grid-template-columns: minmax(0, 1fr); }
  .details > .tabs { gap: 20px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .details > .tabs .tab { font-size: 16.5px; white-space: nowrap; }
  .author-box { grid-template-columns: minmax(0, 1fr); padding: 24px; text-align: start; }
  .scroller__track--books { --per-row: 2 !important; gap: 14px; }
  body.has-sticky-buy { padding-bottom: 76px; }
  .has-sticky-buy .sticky-buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: fixed; inset-inline: 0; bottom: 0; z-index: 50; background: var(--store-bg); border-top: 1px solid var(--line); padding: 10px var(--gutter); box-shadow: 0 -10px 24px rgba(40, 28, 18, .1); }
  .sticky-buy .price { margin: 0; flex-direction: column; align-items: flex-start; gap: 0; }
  .sticky-buy .price__now { font-size: 17px; }
  .sticky-buy .price__old { font-size: 13px; }
  .sticky-buy .btn { min-height: 46px; padding: 0 16px; }
  .sticky-buy > div:last-child, .sticky-buy { flex-wrap: nowrap; }
}

/* ==========================================================
   المؤلّف
   ========================================================== */
.page-hero--author { text-align: start; }
.page-hero--author .page-hero__inner { justify-items: stretch; }
.page-hero--author .breadcrumb ol { justify-content: flex-start; }
.author-hero { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; align-items: center; margin-top: 18px; }
.author-hero__photo { position: relative; }
.author-hero__photo::after { content: ""; position: absolute; inset: -12px; border: 1px solid var(--store-accent); border-radius: 50%; }
.author-hero__photo img { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; }
.author-hero__text { display: grid; gap: 12px; justify-items: start; }
.author-hero__text .eyebrow { margin-bottom: 0; }
.author-hero__bio { color: var(--muted); font-size: 17px; max-width: 68ch; }
.author-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.author-stat { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: color-mix(in srgb, var(--white) 60%, transparent); padding: 6px 14px; font-size: 14px; border-radius: var(--radius-sm); }
.author-stat .icon { width: 17px; height: 17px; }
.author-stat strong { font-weight: 700; }
@media (max-width: 640px) {
  .author-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 26px; }
  .author-hero__text { justify-items: center; }
  .author-stats { justify-content: center; }
  .author-hero__photo img { width: 160px; height: 160px; }
  .page-hero--author .breadcrumb ol { justify-content: center; }
}

/* ==========================================================
   السلّة
   ========================================================== */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 44px; padding-block: 50px 80px; align-items: start; }
.cart-steps { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; counter-reset: none; }
.cart-steps li { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.cart-steps li + li::before { content: ""; width: 40px; height: 1px; background: var(--line); }
.cart-steps__num { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 13.5px; }
.cart-steps .is-current { color: var(--store-text); font-weight: 500; }
.cart-steps .is-current .cart-steps__num { background: var(--store-primary); color: var(--on-dark); border-color: var(--store-primary); }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: start; font-size: 14px; font-weight: 500; color: var(--muted); padding: 0 10px 12px; border-bottom: 1px solid var(--store-text); }
.cart-table td { padding: 20px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item__product { display: flex; gap: 16px; align-items: center; }
.cart-item__product .cover { width: 76px; flex: none; }
.cart-item__product .cover img { box-shadow: 0 8px 16px rgba(40, 28, 18, .2); }
.cart-item__info { display: grid; gap: 2px; min-width: 0; }
.cart-item__title { font-size: 17px; font-weight: 500; }
.cart-item__author { color: var(--muted); font-size: 14px; }
.cart-item__type { justify-self: start; font-size: 12.5px; font-weight: 700; padding: 1px 10px; color: var(--white); margin-top: 4px; }
.cart-item__type--paper { background: #B5533B; }
.cart-item__type--ebook { background: #46628C; }
.cart-item__type--audio { background: #7D5394; }
.cart-item__type--edu { background: #2F7356; }
.cart-item__total { font-weight: 700; white-space: nowrap; }
.qty-fixed { font-size: 13.5px; color: var(--muted); }
.cart-table .qty { grid-template-columns: 38px 44px 38px; height: 44px; }
.remove-btn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.remove-btn:hover { color: var(--sale); }
.remove-btn .icon { width: 19px; height: 19px; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.coupon { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--white); min-width: min(380px, 100%); }
.coupon input { border: 0; padding: 0 16px; min-height: 50px; min-width: 0; background: transparent; }
.coupon input:focus { outline: none; }
.coupon .btn { border-radius: 0; }
.cart-actions__links { display: flex; gap: 20px; font-size: 14.5px; }
.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 { background: var(--cream); padding: 30px 26px; border-radius: var(--radius); display: grid; gap: 18px; position: sticky; top: 20px; }
.summary h2 { font-size: 26px; font-weight: 300; }
.ship-progress p { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-bottom: 8px; }
.ship-progress .icon { width: 19px; height: 19px; margin-top: 2px; }
.ship-bar { height: 5px; background: color-mix(in srgb, var(--store-text) 12%, var(--store-bg)); }
.ship-bar span { display: block; height: 100%; background: var(--store-primary); }
.summary__rows { display: grid; gap: 12px; padding-block: 16px; border-block: 1px solid color-mix(in srgb, var(--store-text) 14%, var(--cream)); }
.summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.summary__row--discount > span:last-child { color: var(--sale); font-weight: 700; }
.summary__row--muted > span:last-child { color: var(--muted); font-size: 13.5px; text-align: end; }
.applied-coupon { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 8px; background: var(--store-bg); border: 1px dashed var(--store-text); padding: 0 6px 0 8px; font-size: 12.5px; font-weight: 700; direction: ltr; }
.applied-coupon button { display: grid; place-items: center; }
.applied-coupon .icon { width: 13px; height: 13px; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; }
.summary__total strong { font-size: 28px; font-weight: 500; }
.summary__note { display: flex; gap: 8px; font-size: 13.5px; color: var(--muted); }
.summary__note .icon { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.cart-empty { text-align: center; padding-block: 80px; display: grid; justify-items: center; gap: 12px; }
.cart-empty__icon { width: 90px; height: 90px; border: 1px solid var(--store-accent); border-radius: 50%; display: grid; place-items: center; }
.cart-empty__icon .icon { width: 38px; height: 38px; }
.cart-empty h2 { font-size: 32px; font-weight: 300; }
.cart-empty p { color: var(--muted); }
@media (max-width: 1200px) {
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
}
@media (max-width: 760px) {
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; }
  .cart-item { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 10px; padding-block: 18px; border-bottom: 1px solid var(--line); position: relative; }
  .cart-table td { padding: 0; border: 0; }
  .col-product { grid-column: 1 / -1; padding-inline-end: 44px !important; }
  .col-price { display: none !important; }
  .col-qty { grid-column: 1; }
  .col-total { grid-column: 2; align-self: center; }
  .col-remove { position: absolute; top: 14px; inset-inline-end: 0; }
  .cart-item__product .cover { width: 64px; }
  .coupon { min-width: 0; width: 100%; }
  .cart-actions { flex-direction: column; align-items: stretch; }
  .cart-actions__links { justify-content: space-between; }
}

/* ==========================================================
   404
   ========================================================== */
.notfound { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding-block: 70px 80px; text-align: center; }
.notfound__inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 16px; max-width: 760px; }
.notfound__code { font-size: clamp(110px, 18vw, 220px); font-weight: 300; line-height: .9; color: var(--store-primary); letter-spacing: .04em; }
.notfound__inner .eyebrow { margin-bottom: 0; }
.notfound h1 { font-size: clamp(28px, 3.4vw, 44px); font-weight: 300; line-height: 1.3; }
.notfound h1 mark { background: none; color: inherit; font-weight: 500; }
.notfound__text { color: var(--muted); font-size: 17px; }
.notfound .search { width: 100%; grid-template-columns: minmax(0, 1fr) auto; margin-top: 6px; }
.notfound__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.notfound__leaf { position: absolute; width: 360px; height: 180px; }
.notfound__leaf--a { top: 40px; inset-inline-start: -80px; transform: rotate(-30deg); }
.notfound__leaf--b { bottom: 30px; inset-inline-end: -80px; transform: rotate(150deg); opacity: .7; }
@media (max-width: 640px) {
  .notfound { padding-block: 44px 54px; }
  .notfound__leaf { width: 200px; height: 100px; }
  .notfound .search__btn span { display: none; }
}

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

/* ==================== المدوّنة والأسئلة الشائعة (ميزات المنصّة) ==================== */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.posts--page { row-gap: 50px; }
.post { display: flex; flex-direction: column; }
.post__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post:hover .post__media img { transform: scale(1.04); }
.post__body { padding-top: 18px; display: grid; gap: 8px; justify-items: start; }
.post__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13.5px; color: var(--muted); }
.post__cat { background: var(--cream); color: var(--store-text); padding: 0 10px; font-weight: 500; }
.post__title { font-size: 21px; font-weight: 400; line-height: 1.4; }
.post__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post__excerpt { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-list .pagination { margin-top: 56px; }
.post-hero__title { font-size: clamp(30px, 3.8vw, 50px); max-width: 22ch; text-wrap: balance; }
.post-hero .eyebrow { margin-bottom: 0; }
.article { max-width: calc(760px + 2 * var(--gutter)); padding-block: 50px 70px; }
.article__media { margin: 0 0 36px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.article__media img { width: 100%; height: 100%; object-fit: cover; }
.article__body { display: grid; gap: 20px; font-size: 18px; line-height: 2; }
.article__body p:first-child::first-letter { font-size: 1.15em; font-weight: 700; }
.article__back { margin-top: 36px; }
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 60px; align-items: start; }
.faq__head .heading { margin-bottom: 4px; }
.faq__list { display: grid; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 0; cursor: pointer; font-size: 18px; font-weight: 500; }
.faq__q::-webkit-details-marker { display: none; }
.faq__icon { position: relative; flex: none; width: 30px; height: 30px; border: 1px solid var(--store-accent); border-radius: 50%; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 11px; height: 1.5px; background: var(--store-text); transform: translate(-50%, -50%); transition: transform .25s var(--ease); }
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__icon { background: var(--store-accent); }
.faq__item[open] .faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__a { color: var(--muted); padding: 0 0 22px; max-width: 62ch; }
@media (max-width: 900px) {
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .faq { grid-template-columns: minmax(0, 1fr); gap: 26px; }
}
@media (max-width: 640px) {
  .posts { grid-template-columns: minmax(0, 1fr); }
  .posts--page { row-gap: 36px; }
  .article { padding-block: 32px 50px; }
  .article__body { font-size: 16.5px; line-height: 1.95; }
  .faq__q { font-size: 16.5px; padding: 16px 0; }
}

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

/* ==================== تطوير المتجر: النظرة السريعة، والدوّار، والعروض، وكتاب الموسم ==================== */
/* النظرة السريعة: تطفو تحت المفضّلة فوق الغلاف ولا تحجز مكانًا */
.qv-btn { position: absolute; top: 56px; inset-inline-end: 10px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--store-bg); color: var(--store-text); opacity: 0; transform: translateY(-4px); transition: opacity .2s .05s, transform .2s .05s; z-index: 2; }
.qv-btn .icon { width: 19px; height: 19px; }
.qv-btn:hover, .wish-btn:hover { background: var(--store-primary); color: var(--on-dark); }
.book-card:hover .qv-btn, .qv-btn:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .qv-btn { opacity: 1; transform: none; } }

/* رأس القسم بأداتين: «كلّ الجديد» والسهمان */
.section-head__tools { display: flex; align-items: center; gap: 22px; }

/* «وصل حديثًا» دوّارٌ أفقيّ بعدد كتب الصفّ */
.scroller--books .scroller__track { --per-row: 4; grid-auto-columns: calc((100% - (var(--per-row) - 1) * 28px) / var(--per-row)); gap: 28px; padding-bottom: 4px; }
body[data-books-per-row="3"] .scroller--books .scroller__track { --per-row: 3; }
body[data-books-per-row="5"] .scroller--books .scroller__track { --per-row: 5; }
body[data-books-per-row="6"] .scroller--books .scroller__track { --per-row: 6; }

/* عروض الموسم: عدّادٌ واحد وبطاقاتٌ أفقيّة مدمجة */
.deals { border-block: 1px solid var(--line); }
.deals__head { align-items: center; }
.countdown { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.countdown__label { font-size: 14.5px; color: var(--muted); margin-inline-end: 4px; }
.countdown__unit { display: grid; justify-items: center; min-width: 66px; padding: 8px 6px 6px; background: var(--store-primary); color: var(--on-dark); border-bottom: 3px solid var(--store-accent); border-radius: var(--radius-sm); line-height: 1.1; }
.countdown__unit b { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.countdown__unit small { font-size: 12px; color: var(--on-dark-muted); margin-top: 4px; }
.deal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.deal-card { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; background: color-mix(in srgb, var(--white) 70%, transparent); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: border-color .2s, box-shadow .2s; }
.deal-card:hover { border-color: var(--store-accent); box-shadow: 0 16px 30px rgba(40, 28, 18, .08); }
.deal-card__cover img { box-shadow: 0 10px 18px rgba(40, 28, 18, .2); }
.deal-card__body { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.deal-card__badge { background: var(--store-accent); color: var(--store-primary-dark); font-size: 12.5px; font-weight: 700; padding: 1px 10px; margin-bottom: 4px; }
.deal-card__title { font-size: 18px; padding-inline-end: 34px; font-weight: 400; line-height: 1.4; }
.deal-card__title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.deal-card__foot { display: grid; gap: 10px; width: 100%; margin-top: 2px; }
.deal-card__foot .price { margin: 0; justify-content: flex-start; flex-wrap: wrap; line-height: 1.5; }
.deal-card__foot .btn-add { margin-top: 0; min-height: 40px; }
.deal-card .wish-btn { top: 10px; inset-inline-end: 10px; width: 34px; height: 34px; background: var(--surface); }
.deal-card:hover .wish-btn { opacity: 1; transform: none; }

/* كتاب الموسم: غلافٌ كبير على سطحٍ كريميّ */
.feature-band { background: var(--cream); position: relative; overflow: hidden; }
.feature { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; align-items: center; }
.feature__stage { position: relative; display: grid; place-items: center; padding: 54px 20px; background: color-mix(in srgb, var(--white) 45%, transparent); border-radius: var(--radius); }
.feature__stage::before { content: ""; position: absolute; width: min(380px, 78%); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--store-accent); }
.feature__cover { width: min(270px, 62%); }
.feature__cover img { box-shadow: 0 30px 50px rgba(40, 28, 18, .3); transform: rotate(-2deg); }
.feature__cover .type-dot { bottom: 10px; inset-inline-end: 10px; width: 30px; height: 30px; }
.feature__leaf { position: absolute; width: 220px; height: 110px; bottom: 16px; inset-inline-start: -40px; transform: rotate(-24deg); }
.feature__body { display: grid; gap: 12px; justify-items: start; }
.feature__body .eyebrow { margin-bottom: 4px; }
.feature__title { font-size: clamp(32px, 4vw, 54px); font-weight: 300; line-height: 1.2; }
.feature__author { color: var(--muted); font-size: 16px; }
.feature__author a { color: var(--store-text); font-weight: 500; border-bottom: 1px solid var(--line); }
.feature__desc { display: grid; gap: 10px; color: var(--muted); font-size: 16.5px; max-width: 56ch; }
.feature__buy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-block: -4px 6px; }
.feature__buy .price { margin: 0 6px 0 0; order: -1; }
.feature__buy .price__now { font-size: 26px; font-weight: 500; }
.feature__wish { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--store-primary); border-radius: var(--radius-sm); }
.feature__wish .icon { width: 20px; height: 20px; }
.feature__wish[aria-pressed="true"] .icon { fill: var(--sale); stroke: var(--sale); }

/* البانر العريض: النصّ فوق الصورة لا داخلها */
.banner-section { padding-block: 0; }
.banner-wide { position: relative; background: var(--deep); }
.banner-wide img { aspect-ratio: 16 / 5; object-fit: cover; }
.banner-wide__text { position: absolute; inset-block: 0; inset-inline-start: 0; width: 50%; display: grid; align-content: center; justify-items: start; gap: 10px; padding-inline: 64px 24px; color: var(--on-dark); }
.banner-wide__title { font-size: clamp(28px, 3.4vw, 48px); font-weight: 300; line-height: 1.2; }
.banner-wide__sub { color: var(--on-dark-muted); font-size: 17px; max-width: 34ch; }
.banner-wide__cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; background: var(--store-accent); color: var(--store-primary-dark); font-weight: 500; min-height: 46px; padding: 0 24px; border-radius: var(--radius-sm); }
.banner-wide__cta .icon { width: 18px; height: 18px; }

@media (max-width: 1200px) {
  .scroller--books .scroller__track { --per-row: 3 !important; }
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { gap: 44px; }
}
@media (max-width: 900px) {
  .deal-grid { grid-template-columns: minmax(0, 1fr); }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .feature__stage { padding: 36px 20px; }
  .banner-wide__text { width: 62%; padding-inline: 36px 18px; }
}
@media (max-width: 640px) {
  .section-head__tools { width: 100%; justify-content: space-between; }
  .scroller--books .scroller__track { grid-auto-columns: calc((100% - 14px) / 2.15); gap: 14px; }
  .countdown { width: 100%; gap: 6px; }
  .countdown__label { width: 100%; }
  .countdown__unit { min-width: 0; flex: 1; }
  .countdown__unit b { font-size: 22px; }
  .deal-card { grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 14px; }
  .deal-card__title { font-size: 17px; }
    .deal-card .wish-btn { top: 10px; inset-inline-end: 10px; }
  .feature__stage { padding: 28px 16px; }
  .feature__cover { width: 180px; }
  .feature__desc { font-size: 15.5px; }
  .feature__buy .price { flex-basis: 100%; }
  .feature__buy .btn { flex: 1; }
  /* البانر: الصورة فوق والنصّ تحتها على الداكن */
  .banner-wide img { aspect-ratio: 16 / 9; object-position: 4% center; }
  .banner-wide__text { position: static; width: auto; padding: 22px 20px 26px; gap: 8px; }
  .banner-wide__sub { font-size: 15px; }
  /* شريط الثقة: شريطٌ واحد يُمرَّر أفقيًّا */
  .about__trust-title { font-size: 22px; margin-bottom: 18px; }
  .about .trust { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .about .trust::-webkit-scrollbar { display: none; }
  .about .trust__item { scroll-snap-align: start; border: 1px solid rgba(255, 255, 255, .18); padding: 14px; gap: 12px; align-items: center; }
  .about .trust__icon { width: 42px; height: 42px; }
  .about .trust__title { font-size: 17px; }
  .about .trust__text { font-size: 13.5px; line-height: 1.6; }
  .about__media img { aspect-ratio: 4 / 3; }
  /* التصنيفات والآراء: صفٌّ يُمرَّر باللمس بدل أعمدةٍ طويلة */
  .cat-grid, .reviews { grid-template-columns: none; grid-auto-flow: column; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .cat-grid { grid-auto-columns: 40%; gap: 14px; }
  .reviews { grid-auto-columns: 84%; gap: 14px; }
  .cat-grid::-webkit-scrollbar, .reviews::-webkit-scrollbar { display: none; }
  .cat-grid > *, .reviews > * { scroll-snap-align: start; }
  .cat-tile__name { font-size: 17px; }
  .cat-tile__img { margin-bottom: 8px; }
  .quote { margin-bottom: 32px; }
  .dark-band .ornament { opacity: .22; width: 180px; height: 90px; }
}

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