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

:root {
	--store-primary: #1F6FB2;
	--store-primary-dark: #17507F;
	--store-accent: #212E47;
	--store-bg: #FFFFFF;
	--store-text: #14202E;

	/* محايدات */
	--ink: #111827;
	--muted: #535D6B;
	--line: #E3E7ED;
	--soft: #F6F8FA;
	--tile: #EEF1F5;
	--white: #FFFFFF;
	--gold: #F5B000;
	--gold-chip: #FFD25C;

	/* ألوان أنواع الكتب (ثابتة) */
	--t-print: #DB7056;
	--t-ebook: #5675A3;
	--t-audio: #986AB0;
	--t-edu: #3f8f6b;

	--tint: color-mix(in srgb, var(--store-primary) 10%, #fff);
	--tint-2: color-mix(in srgb, var(--store-primary) 26%, #fff);
	--accent-tint: color-mix(in srgb, var(--store-accent) 8%, #fff);

	--radius: 12px;
	--radius-sm: 8px;
	--radius-lg: 20px;
	--shadow: 0 6px 24px rgba(17, 24, 39, .08);
	--shadow-lg: 0 16px 40px rgba(17, 24, 39, .14);
	--container: 1296px;
	--gutter: 20px;
	--cols: 4;
	--slant: 44px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: "Tajawal", system-ui, sans-serif;
	font-size: 15.5px;
	line-height: 1.7;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: hidden;
}

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; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
del { color: var(--muted); font-weight: 500; }
bdi { unicode-bidi: isolate; }
:focus-visible { outline: 3px solid var(--store-primary); outline-offset: 2px; }

.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--store-accent); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
	font-weight: 700; font-size: 15px; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-primary); color: #fff; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-dark { background: var(--store-accent); color: #fff; }
.btn-dark:hover { background: color-mix(in srgb, var(--store-accent) 82%, #000); }
.btn-outline { background: #fff; color: var(--store-text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--store-primary); color: var(--store-primary-dark); }
.btn-light { background: #fff; color: var(--store-accent); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-arrow { transform: none; }

.icon-btn {
	position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px;
	border-radius: 50%; border: 0; background: transparent; color: var(--store-text);
}
.icon-btn:hover { background: var(--soft); color: var(--store-primary-dark); }
.icon-btn .icon { width: 21px; height: 21px; }
.count-badge {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 4px;
	border-radius: 999px; background: var(--store-primary); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

.field {
	width: 100%; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
	background: #fff; color: var(--store-text);
}
.field:focus { outline: none; border-color: var(--store-primary); }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 18px 50%, 13px 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 34px; }
textarea.field { min-height: 120px; padding: 12px 14px; resize: vertical; }

/* ---------------------------------------------------------------- الرأس العائم */
.site-header { position: sticky; top: 0; z-index: 40; padding-top: 18px; background: var(--soft); padding-bottom: 18px; }
/* حين تبدأ الصفحة بواجهةٍ صوريّة يطفو الرأس فوقها (ارتفاعه صفرٌ فلا يأخذ مكانًا)؛ وإن أُخفيت بقي في مكانه.
   وفي الحالين يبقى مثبّتًا أعلى الشاشة عند التمرير. */
body:has(.hero) .site-header,
body:has(.page-head) .site-header { height: 0; background: transparent; padding-bottom: 0; }

.hbar {
	position: relative; display: flex; align-items: center; gap: 18px;
	min-height: 64px; padding: 8px 12px 8px 12px; padding-inline-start: 20px;
	background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(17, 24, 39, .10);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-name { font-size: 21px; font-weight: 800; color: var(--store-accent); }

.main-nav { margin-inline: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a,
.main-nav > ul > li > button {
	position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border: 0; background: none;
	font-weight: 700; font-size: 15px; color: var(--store-text); border-radius: 8px;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > button:hover { color: var(--store-primary-dark); }
.main-nav .icon { width: 16px; height: 16px; }
.main-nav a.is-current { color: var(--store-primary-dark); }
/* النقاط الثلاث تحت الرابط الحاليّ */
.main-nav a.is-current::after {
	content: ""; position: absolute; inset-inline: 0; bottom: 2px; margin-inline: auto; width: 18px; height: 4px;
	background: radial-gradient(circle, var(--store-primary) 1.8px, transparent 2.2px) 0 0 / 6px 4px repeat-x;
}
.drop {
	position: absolute; top: calc(100% + 10px); inset-inline-start: 0; min-width: 230px; padding: 10px;
	background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-drop:hover .drop,
.has-drop:focus-within .drop,
.has-drop.open .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: block; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.drop a:hover { background: var(--tint); color: var(--store-primary-dark); }

.header-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.header-actions .btn { margin-inline-start: 6px; }
.menu-toggle { display: none; }

.header-search { position: absolute; inset-inline: 0; top: calc(100% + 8px); padding: 12px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); display: none; }
.header-search.open { display: flex; gap: 10px; }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(17, 24, 39, .5); opacity: 0; visibility: hidden; transition: .25s; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(340px, 88vw); padding: 18px;
	background: #fff; overflow-y: auto; transform: translateX(105%); transition: transform .3s; visibility: hidden;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-search { display: flex; gap: 6px; margin-bottom: 14px; }
.drawer-nav > li { border-bottom: 1px solid var(--line); }
.drawer-nav > li > a, .drawer-label { display: block; padding: 12px 4px; font-weight: 700; }
.drawer-label { color: var(--muted); font-size: 13px; padding-bottom: 4px; }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; }
.drawer-cats a { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--soft); font-size: 14px; }
.drawer-contact { display: grid; gap: 8px; margin-top: 16px; }
.drawer-contact a { display: flex; align-items: center; gap: 8px; color: var(--muted); }

/* ---------------------------------------------------------------- الواجهة */
.hero { position: relative; isolation: isolate; color: #fff; background: var(--store-accent); padding: 150px 0 92px; min-height: 640px; }
.hero-slides { display: grid; }
.slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s; }
.slide.is-active { opacity: 1; visibility: visible; }
html:not(.js) .slide:first-child { opacity: 1; visibility: visible; }
.slide-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.slide-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, rgba(11, 20, 36, .78) 0%, rgba(11, 20, 36, .45) 45%, rgba(11, 20, 36, .05) 80%); }
.slide-copy { position: relative; max-width: calc(var(--container) + var(--gutter) * 2); }
.slide-copy > * { max-width: 600px; }
.slide-copy h2 { font-size: 46px; line-height: 1.2; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.slide-copy p { margin-top: 14px; font-size: 17px; color: #F1F5FA; }
.slide-copy .btn { margin-top: 22px; }

.hero-search-wrap { position: relative; z-index: 2; margin-top: 30px; }
.hero-search { background: #fff; color: var(--store-text); border-radius: 12px; padding: 18px 20px 20px; box-shadow: var(--shadow-lg); }
.hs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hs-title { font-weight: 800; font-size: 17px; }
.hs-radios { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hs-radio { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); cursor: pointer; }
.hs-radio input { appearance: none; width: 16px; height: 16px; margin: 0; border-radius: 50%; border: 1.5px solid #C4CBD5; display: grid; place-items: center; }
.hs-radio input:checked { border-color: var(--store-primary); }
.hs-radio input:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--store-primary); }
.hs-radio:has(input:checked) { color: var(--store-text); font-weight: 700; }
.hs-fields { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 0; }
.hs-cell { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); margin-inline-start: -1px; min-width: 0; }
.hs-cell:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; margin-inline-start: 0; }
.hs-cell:nth-child(3) { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.hs-cell label { font-size: 13px; color: var(--muted); }
.hs-cell input, .hs-cell select { border: 0; padding: 0; background: transparent; font-weight: 700; font-size: 16px; min-width: 0; width: 100%; }
.hs-cell input:focus, .hs-cell select:focus { outline: none; }
.hs-cell:focus-within { border-color: var(--store-primary); position: relative; z-index: 1; }
.hs-go { margin-inline-start: 14px; min-height: 78px; border-radius: 10px; padding: 0 28px; }

.slider-dots { position: absolute; z-index: 3; bottom: 54px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.slider-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .6); transition: width .25s; }
.slider-dots button[aria-current="true"] { width: 26px; background: #fff; }

/* الشريط الكحليّ المائل المتحرّك */
.marquee-wrap { position: relative; z-index: 5; padding: 18px 0; overflow: hidden; }
.hero + .marquee-wrap { margin-top: -40px; }
.marquee { background: var(--store-accent); color: #fff; transform: rotate(-1.4deg); margin-inline: -20px; padding: 14px 0; overflow: hidden; }
.marquee-track { display: flex; width: max-content; gap: 34px; animation: shati-marquee 38s linear infinite; padding-inline-start: 34px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-item { display: inline-flex; align-items: center; gap: 34px; font-weight: 800; font-size: 19px; white-space: nowrap; }
.mq-item .icon { width: 20px; height: 20px; color: #fff; }
@keyframes shati-marquee { to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------------------------------------------------------------- الأقسام */
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.sec-mark { display: inline-flex; align-items: flex-end; gap: 0; color: var(--store-primary); margin-bottom: 4px; }
.sec-mark::before { content: ""; width: 54px; height: 1.5px; background: currentColor; margin-bottom: 3px; }
.sec-mark .icon { width: 26px; height: 26px; stroke-width: 1.5; }
.sec-title { font-size: 32px; color: var(--store-text); }
.sec-sub { margin-top: 10px; color: var(--muted); font-size: 16px; }
.sec-foot { display: flex; justify-content: center; margin-top: 34px; }
.sec-head-light .sec-title { color: #fff; }
.sec-head-light .sec-sub { color: #C9D2DE; }
.sec-head-light .sec-mark { color: #8FC1EA; }

/* شريط الثقة: ثلاث بطاقاتٍ باستيل */
.trust { padding: 34px 0 10px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trust-card { position: relative; padding: 22px 22px 22px 22px; padding-inline-end: 80px; border-radius: 12px; background: var(--tint); }
.trust-card:nth-child(2) { background: var(--accent-tint); }
.trust-card:nth-child(3) { background: #F5EFE4; }
.trust-card h3 { font-size: 19px; margin-bottom: 8px; }
.trust-card p { color: var(--muted); font-size: 15px; }
.trust-ico { position: absolute; top: 20px; inset-inline-end: 20px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--store-primary); color: #fff; }
.trust-card:nth-child(2) .trust-ico { background: var(--store-accent); }
.trust-card:nth-child(3) .trust-ico { background: var(--store-primary-dark); }
.trust-ico .icon { width: 22px; height: 22px; }
[data-show-trust-bar="false"] .trust { display: none; }

/* التصنيفات: خاناتٌ رماديّة بصورٍ مقصوصة */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.ct-media { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--tile); display: grid; place-items: center; padding: 10px; transition: background .2s, transform .25s; }
.ct-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.cat-tile:hover .ct-media { background: var(--tint); }
.cat-tile:hover .ct-media img { transform: scale(1.06); }
.ct-name { font-weight: 800; font-size: 16px; }
.ct-count { color: var(--muted); font-size: 13px; margin-top: -8px; }

/* قصّة المتجر */
.story { background: var(--soft); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.story-media { position: relative; }
.story-frame { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 140px 0 140px 0; }
.story-frame img { width: 100%; height: 100%; object-fit: cover; }
/* شقّان أبيضان يقسمان الصورة أربعة أرباعٍ كالمرجع */
.story-frame::before, .story-frame::after { content: ""; position: absolute; background: var(--soft); }
.story-frame::before { top: 0; bottom: 0; inset-inline-start: calc(50% - 5px); width: 10px; }
.story-frame::after { inset-inline: 0; top: calc(50% - 5px); height: 10px; }
.story-badge {
	position: absolute; z-index: 2; top: 50%; inset-inline-start: 50%; transform: translate(50%, -50%);
	width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 16px;
	background: var(--store-primary); color: #fff; font-weight: 800; font-size: 17px; line-height: 1.35; box-shadow: 0 0 0 10px var(--soft);
}
.story-badge:empty { display: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--store-primary-dark); font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.eyebrow .icon { width: 16px; height: 16px; }
.story-copy h2 { font-size: 32px; }
.story-copy > p { margin-top: 14px; color: var(--muted); font-size: 16px; }
.story-points { margin: 22px 0 26px; padding-bottom: 24px; border-bottom: 1px solid var(--line); display: grid; gap: 14px; }
.story-points li { display: grid; grid-template-columns: 24px 1fr; gap: 2px 10px; }
.story-points .ck { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--store-primary); color: #fff; margin-top: 3px; }
.story-points li:nth-child(2) .ck { background: var(--store-accent); }
.story-points li:nth-child(3) .ck { background: var(--store-primary-dark); }
.story-points .ck .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.story-points b { font-size: 16px; }
.story-points span { color: var(--muted); font-size: 15px; }
.story-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 24px; }
[data-books-per-row="3"] { --cols: 3; }
[data-books-per-row="4"] { --cols: 4; }
[data-books-per-row="5"] { --cols: 5; }
[data-books-per-row="6"] { --cols: 6; }

.book-card { position: relative; color: var(--store-text); display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; min-width: 0; }
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
[data-card-style="framed"] .book-card { box-shadow: none; border: 1.5px solid var(--line); }
[data-card-style="framed"] .book-card:hover { border-color: var(--store-primary); }
[data-card-style="flat"] .book-card { box-shadow: none; background: transparent; }
[data-card-style="flat"] .book-card .bc-body { padding-inline: 2px; }
[data-card-style="flat"] .book-card:hover { transform: none; }

.bc-media { position: relative; padding: 14px 14px 0; }
.bc-cover { display: block; border-radius: 10px; overflow: hidden; background: var(--tile); aspect-ratio: 2 / 3; }
[data-card-style="flat"] .bc-media { padding: 0; }
.bc-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.book-card:hover .bc-cover img { transform: scale(1.04); }
.bc-wish {
	position: absolute; top: 24px; inset-inline-start: 24px; width: 34px; height: 34px; border-radius: 50%; border: 0;
	background: #fff; color: var(--store-text); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.bc-wish .icon { width: 17px; height: 17px; }
.bc-wish[aria-pressed="true"] { color: #D33A2C; }
.bc-wish[aria-pressed="true"] .icon { fill: currentColor; }
[data-card-style="flat"] .bc-wish { top: 10px; inset-inline-start: 10px; }
.type-dot {
	display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff;
	box-shadow: 0 0 0 3px #fff;
}
.type-dot .icon { width: 17px; height: 17px; }
.type-dot[data-type="print"] { background: var(--t-print); }
.type-dot[data-type="ebook"] { background: var(--t-ebook); }
.type-dot[data-type="audio"] { background: var(--t-audio); }
.type-dot[data-type="educational"] { background: var(--t-edu); }
.bc-media > .type-dot { position: absolute; top: 24px; inset-inline-end: 24px; }
[data-card-style="flat"] .bc-media > .type-dot { top: 10px; inset-inline-end: 10px; }
.badge {
	display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
	font-size: 12.5px; font-weight: 700; line-height: 1.5; color: #fff;
}
.badge .icon { width: 13px; height: 13px; }
.badge-sale { background: var(--store-accent); }
.badge-new { background: var(--store-primary); }
.bc-media > .badge { position: absolute; top: 66px; inset-inline-end: 22px; }
[data-card-style="flat"] .bc-media > .badge { top: 52px; inset-inline-end: 8px; }
.stock-band { position: absolute; inset-inline: 14px; bottom: 34%; padding: 6px; text-align: center; background: rgba(17, 24, 39, .85); color: #fff; font-weight: 700; font-size: 14px; }
[data-card-style="flat"] .stock-band { inset-inline: 0; }
.is-out .bc-cover img { filter: grayscale(.7); opacity: .8; }
.bc-add {
	position: absolute; bottom: -20px; inset-inline-end: 26px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
	border: 3px solid #fff; background: var(--store-primary); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(17, 24, 39, .18);
}
.bc-add:hover { background: var(--store-primary-dark); }
.bc-add .icon { width: 19px; height: 19px; }
.bc-add[disabled] { background: #8A94A3; cursor: not-allowed; }
.bc-body { display: flex; flex-direction: column; flex: 1; padding: 16px 16px 16px; min-width: 0; }
.bc-cat { align-self: flex-start; padding: 1px 9px; border-radius: 4px; background: var(--accent-tint); color: var(--store-accent); font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.book-title { font-size: 17px; font-weight: 800; line-height: 1.4; }
.book-title a:hover { color: var(--store-primary-dark); }
.book-author { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.book-author .icon { width: 15px; height: 15px; }
.spec-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: auto; border: 1px solid var(--line); border-radius: 8px; }
.spec-row li { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; min-width: 0; }
.spec-row li + li { border-inline-start: 1px solid var(--line); }
.spec-row small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.spec-row small .icon { width: 13px; height: 13px; }
.spec-row b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* السعر والتقييم تحت المؤلّف مباشرةً، وصفّ المواصفات في أسفل البطاقة يُدفع إليه (البند 7) */
.bc-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px 8px; flex-wrap: wrap; margin-top: 10px; margin-bottom: 12px; }
.price { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-weight: 800; font-size: 18px; color: var(--store-primary); }
.price del { font-size: 13.5px; }
.rate { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.rate-chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 4px; background: var(--gold-chip); color: #1D1A0F; font-weight: 800; font-size: 13px; }
.rate-chip .icon { width: 12px; height: 12px; color: #1D1A0F; }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars .icon { width: 16px; height: 16px; }
.stars .off { color: #D9DEE5; }
.rating { display: inline-flex; align-items: center; gap: 6px; }

/* البطاقة المصغّرة (شاهدتَه مؤخّرًا) */
.mini-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.mini-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mc-cover { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 2 / 3; background: var(--tile); }
.mc-cover img { width: 100%; height: 100%; object-fit: cover; }
.mc-cover .type-dot { position: absolute; top: 8px; inset-inline-end: 8px; width: 28px; height: 28px; box-shadow: 0 0 0 2px #fff; }
.mc-cover .type-dot .icon { width: 14px; height: 14px; }
.mini-card .book-title { font-size: 15px; }
.mini-card .book-author { font-size: 13px; margin-top: 0; }
.mini-card .price { font-size: 15px; }

/* ---------------------------------------------------------------- كيف تطلب */
.steps-sec { background: var(--soft); }
.steps-layout { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 34px; align-items: center; }
.steps-col { display: grid; gap: 46px; }
.step { display: grid; grid-template-columns: 1fr 46px; gap: 14px; align-items: start; text-align: end; }
.steps-col-end .step { grid-template-columns: 46px 1fr; text-align: start; }
.steps-col-end .step .step-ico { order: -1; }
.step small { display: block; color: var(--muted); font-weight: 700; font-size: 14px; }
.step h3 { font-size: 19px; margin: 2px 0 6px; }
.step p { color: var(--muted); font-size: 15px; }
.step-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--store-primary); color: #fff; margin-top: 20px; }
.step-ico .icon { width: 21px; height: 21px; }
.steps-art { position: relative; display: grid; place-items: center; padding: 30px 10px; }
.steps-art::before { content: ""; position: absolute; top: 6%; inset-inline-end: 16%; width: 52%; height: 58%; background: var(--store-primary); border-start-end-radius: 170px; }
.steps-art::after { content: ""; position: absolute; bottom: 6%; inset-inline-start: 18%; width: 44%; height: 40%; background: var(--tint-2); border-end-start-radius: 150px; }
.steps-art img { position: relative; z-index: 1; width: 100%; max-width: 520px; filter: drop-shadow(0 18px 24px rgba(17, 24, 39, .18)); }
[data-show-steps="false"] .steps-sec { display: none; }

/* ---------------------------------------------------------------- المؤلّفون */
.author-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.author-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .25s, transform .25s; }
.author-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.ac-media { position: relative; display: block; aspect-ratio: 1 / .78; overflow: hidden; }
.ac-media img { width: 100%; height: 100%; object-fit: cover; }
.ac-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 20, 36, .72), rgba(11, 20, 36, .15) 55%, transparent); }
.ac-name { position: absolute; z-index: 1; inset-inline: 10px; bottom: 14px; text-align: center; color: #fff; font-size: 18px; font-weight: 800; }
.ac-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; }
.ac-foot b { font-size: 16px; }
.ac-foot small { display: block; color: var(--muted); font-size: 13.5px; }
.ac-go { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; color: var(--muted); transition: .2s; }
.author-card:hover .ac-go { background: var(--store-primary); color: #fff; }
.ac-go .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- آراء القرّاء */
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.review { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rv-quote { width: 30px; height: 30px; color: var(--store-primary); }
.rv-top { display: flex; align-items: center; gap: 8px; margin: 12px 0 10px; }
.rv-score { font-weight: 700; font-size: 14px; }
.rv-text { color: var(--muted); font-size: 15.5px; flex: 1; }
.rv-who { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.rv-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--store-primary-dark); font-weight: 800; }
.rv-name { font-size: 15.5px; }
.rv-what { color: var(--muted); font-size: 13.5px; }
.rv-what::before { content: "•"; margin-inline-end: 8px; }
[data-show-reviews="false"] .reviews-sec { display: none; }

/* ---------------------------------------------------------------- القسم الداكن المائل */
.dark-sec { position: relative; background: var(--ink); color: #fff; padding: calc(var(--slant) + 72px) 0 calc(var(--slant) + 72px);
	clip-path: polygon(0 var(--slant), 50% 0, 100% var(--slant), 100% calc(100% - var(--slant) * 1.4), 0 100%); }
[data-edges="straight"] .dark-sec { clip-path: none; padding-block: 76px; }
.dark-sec::before { content: ""; position: absolute; inset-inline-start: -160px; top: 30%; width: 380px; height: 380px; border: 1.5px solid rgba(255, 255, 255, .22); border-radius: 50%; pointer-events: none; }
.dark-grid { position: relative; display: grid; grid-template-columns: 2.2fr 1fr; gap: 56px; align-items: center; }
.dark-copy { order: 2; }
.dark-copy h2 { font-size: 32px; color: #fff; }
.dark-copy p { margin-top: 12px; color: #C9D2DE; font-size: 16px; }
.dark-list { margin: 22px 0 26px; display: grid; gap: 12px; }
.dark-list li { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .14); font-weight: 700; color: #E8EDF4; }
.dark-list .num { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); font-size: 13px; font-weight: 800; }
.dark-sec .book-grid { --cols: 3; }
.dark-sec .book-card:first-child { box-shadow: 0 0 0 3px var(--store-primary), var(--shadow-lg); }
.dark-sec .book-card:first-child .bc-cat { background: var(--store-primary); color: #fff; }
[data-card-style="flat"] .dark-sec .book-card { background: #fff; }
[data-card-style="flat"] .dark-sec .book-card .bc-body { padding-inline: 14px; }
[data-card-style="flat"] .dark-sec .bc-media { padding: 12px 12px 0; }

/* ---------------------------------------------------------------- البانر العريض */
.wide-banner { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 380px; border-radius: 14px; background: #E7EDF3; margin-bottom: 40px; }
.wb-copy { position: relative; z-index: 2; padding: 50px 44px; }
.wb-copy h2 { font-size: 38px; line-height: 1.25; color: var(--store-text); }
.wb-copy p { margin-top: 14px; color: var(--muted); font-size: 16px; }
.wb-copy .btn { margin-top: 22px; }
.wb-art { position: relative; align-self: stretch; }
.wb-clip { position: absolute; inset: 0; overflow: hidden; border-start-end-radius: 14px; border-end-end-radius: 14px; }
.wb-clip::before { content: ""; position: absolute; top: -22%; inset-inline-end: 8%; width: 76%; aspect-ratio: 1; border-radius: 50%; background: var(--store-primary); }
.wb-clip::after { content: ""; position: absolute; bottom: -26%; inset-inline-end: 64%; width: 40%; aspect-ratio: 1; border-radius: 50%; background: var(--tint-2); }
.wb-art img { position: absolute; z-index: 1; inset-inline-end: 8%; bottom: -40px; width: 80%; max-width: 520px; filter: drop-shadow(0 20px 26px rgba(17, 24, 39, .22)); }

/* ---------------------------------------------------------------- التذييل الداكن */
.site-footer { background: var(--ink); color: #C3CBD6; margin-top: 0; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 64px 0 40px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand > p { margin-top: 14px; font-size: 15px; max-width: 420px; }
.nl h3 { margin-top: 26px; color: #fff; font-size: 18px; }
.nl p { font-size: 14.5px; margin-top: 4px; }
.nl-field { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px; padding-inline-start: 16px; background: #fff; border-radius: 999px; max-width: 420px; }
.nl-field .icon { color: var(--muted); }
.nl-field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--store-text); min-height: 38px; }
.nl-field input:focus { outline: none; }
[data-show-newsletter="false"] .nl { display: none; }
.footer-social { display: flex; gap: 10px; margin-top: 26px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); transition: .2s; }
.footer-social a:hover { background: var(--store-primary); color: #fff; }
.footer-social .icon { width: 17px; height: 17px; }
.footer-col h3 { color: #fff; font-size: 18px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.footer-col li + li { margin-top: 8px; }
.footer-col a { font-size: 15px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0 0 34px; }
.footer-contact li { display: flex; align-items: center; gap: 12px; }
.fc-icon { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--store-primary); color: #fff; }
.footer-contact li:nth-child(2) .fc-icon { background: #fff; color: var(--ink); }
.footer-contact li:nth-child(3) .fc-icon { background: var(--store-primary-dark); }
.fc-icon .icon { width: 21px; height: 21px; }
.footer-contact small { display: block; font-size: 13px; color: #A7B1BF; }
.footer-contact b, .footer-contact bdi { color: #fff; font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.fb-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px var(--gutter); font-size: 14.5px; }
.fb-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.fb-links a:hover { color: #fff; }

/* ---------------------------------------------------------------- رأس الصفحات الداخليّة */
.page-head { position: relative; isolation: isolate; padding: 140px 0 60px; color: #fff; text-align: center; background: var(--store-accent); }
.page-head > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(11, 20, 36, .55), rgba(11, 20, 36, .72)); }
.ph-title { font-size: 38px; font-weight: 800; color: #fff; }
.ph-lead { margin: 8px auto 0; max-width: 620px; color: #E7EDF5; }
.breadcrumb { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; font-size: 14.5px; color: #E7EDF5; margin-bottom: 10px; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; opacity: .7; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.page-head .chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); color: #fff; font-size: 14px; font-weight: 700; }
.chip:hover { background: #fff; color: var(--store-accent); }

/* شريط التصنيفات في صفحة التصنيف */
.cat-strip { padding: 30px 0 0; }
.cat-strip .cat-grid { gap: 16px; }
.cat-strip .ct-media { aspect-ratio: 5 / 3; }
.cat-strip .ct-name { font-size: 15px; }

/* ---------------------------------------------------------------- صفحة التصنيف */
.listing { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: start; }
.filters { position: sticky; top: 104px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.filters-head h2 { font-size: 19px; }
.f-group { padding: 14px 0; border-bottom: 1px solid var(--line); }
.f-group h3 { font-size: 15.5px; margin-bottom: 10px; }
.f-check { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14.5px; cursor: pointer; }
.f-check input { width: 17px; height: 17px; accent-color: var(--store-primary); }
.f-check .type-dot { width: 22px; height: 22px; box-shadow: none; }
.f-check .type-dot .icon { width: 12px; height: 12px; }
.f-check small { margin-inline-start: auto; color: var(--muted); }
.f-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters .btn { margin-top: 16px; }
.filters-close { display: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 12px; }
.toolbar p { color: var(--muted); }
.toolbar p b { color: var(--store-text); }
.tb-side { display: flex; align-items: center; gap: 10px; }
.tb-side label { color: var(--muted); font-size: 14px; white-space: nowrap; }
.tb-side .field { min-height: 40px; width: 190px; }
.filters-toggle { display: none; }
.listing .book-grid { --cols: 3; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; }
.pagination a:hover { border-color: var(--store-primary); color: var(--store-primary-dark); }
.pagination [aria-current="page"] { background: var(--store-accent); border-color: var(--store-accent); color: #fff; }
.pagination .gap { border: 0; min-width: 20px; }
.pagination .icon { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- صفحة الكتاب */
.pdp { display: grid; grid-template-columns: 380px 1fr 320px; gap: 36px; align-items: start; }
.gallery { position: relative; }
.g-main { position: relative; border-radius: 14px; overflow: hidden; background: var(--tile); padding: 26px; }
.g-main img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 16px 30px rgba(17, 24, 39, .2); }
.g-main .type-dot { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 1; }
.g-main .badge { position: absolute; top: 58px; inset-inline-end: 12px; z-index: 1; }
.g-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.g-thumbs button { width: 70px; padding: 4px; border-radius: 8px; border: 2px solid var(--line); background: #fff; }
.g-thumbs button[aria-pressed="true"] { border-color: var(--store-primary); }
.g-thumbs img { aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.pdp-info h1 { font-size: 32px; margin-top: 4px; }
.pdp-author { margin-top: 8px; color: var(--muted); font-size: 16px; }
.pdp-author a { color: var(--store-primary-dark); font-weight: 700; }
.pdp-rate { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 14.5px; }
.pdp-rate b { color: var(--store-text); }
.pdp-lead { margin-top: 16px; color: var(--muted); font-size: 16px; }
.spec-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spec-boxes li { display: flex; align-items: center; gap: 10px; padding: 14px; min-width: 0; border-bottom: 1px solid var(--line); }
.spec-boxes li:not(:nth-child(3n + 1)) { border-inline-start: 1px solid var(--line); }
.spec-boxes li:nth-last-child(-n + 3) { border-bottom: 0; }
.sb-ico { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--store-primary-dark); }
.sb-ico .icon { width: 18px; height: 18px; }
.spec-boxes small { display: block; color: var(--muted); font-size: 13px; }
.spec-boxes b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.sample-box { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--tint); flex-wrap: wrap; }
.sample-box p { flex: 1; min-width: 180px; color: var(--store-text); font-size: 15px; }
.player { display: flex; align-items: center; gap: 12px; flex: 1 1 100%; }
.player-bar { position: relative; flex: 1; height: 6px; border-radius: 999px; background: #fff; }
.player-bar::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 18%; border-radius: inherit; background: var(--store-primary); }
.player small { color: var(--store-text); font-size: 13px; }

.buybox { position: sticky; top: 104px; padding: 22px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.buybox .price { font-size: 28px; }
.buybox .price del { font-size: 16px; }
.bb-save { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 4px; background: var(--accent-tint); color: var(--store-accent); font-size: 13px; font-weight: 700; }
.stock { display: flex; align-items: center; gap: 6px; margin: 14px 0; font-weight: 700; color: #1E7A4C; }
.stock .icon { width: 17px; height: 17px; }
.bb-actions { display: grid; gap: 10px; }
.bb-row { display: flex; gap: 10px; }
.bb-row .btn { flex: 1; }
.bb-wish { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; }
.bb-wish[aria-pressed="true"] { color: #D33A2C; border-color: currentColor; }
.bb-wish[aria-pressed="true"] .icon { fill: currentColor; }

.pdp-tabs { margin-top: 56px; }
.tabs-nav { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs-nav button { padding: 12px 18px; border: 0; background: none; font-weight: 700; font-size: 16px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-nav button[aria-selected="true"] { color: var(--store-text); border-color: var(--store-primary); }
.tab-panel { padding: 26px 0 0; }
.js .tab-panel[hidden] { display: none; }
.prose { max-width: 820px; color: var(--store-text); font-size: 16px; }
.prose p + p { margin-top: 12px; }
.spec-table { width: 100%; max-width: 820px; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: start; font-size: 15px; }
.spec-table th { width: 200px; color: var(--muted); font-weight: 500; background: var(--soft); }
.reviews-layout { display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: start; }
.rv-summary { padding: 22px; border-radius: 12px; background: var(--soft); text-align: center; }
.rv-big { font-size: 46px; font-weight: 800; line-height: 1; }
.rv-summary .stars { margin: 8px 0; }
.rv-summary .stars .icon { width: 20px; height: 20px; }
.rv-summary p { color: var(--muted); font-size: 14.5px; }
.rv-list { display: grid; gap: 16px; }
.rv-list .review { padding: 20px; }
.review-form { margin-top: 18px; padding: 20px; border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; }
.review-form h3 { font-size: 18px; margin-bottom: 4px; }
.review-form > p { color: var(--muted); font-size: 14.5px; margin-bottom: 12px; }
.star-pick { display: flex; gap: 4px; margin-bottom: 12px; }
.star-pick button { padding: 2px; border: 0; background: none; color: #D9DEE5; }
.star-pick button.on { color: var(--gold); }
.star-pick .icon { width: 24px; height: 24px; }
.review-form .btn { margin-top: 12px; }

/* ---------------------------------------------------------------- صفحة المؤلّف */
.author-hero { display: grid; grid-template-columns: 340px 1fr; gap: 50px; align-items: center; }
.author-frame { aspect-ratio: 1; overflow: hidden; border-radius: 110px 0 110px 0; box-shadow: var(--shadow-lg); }
.author-frame img { width: 100%; height: 100%; object-fit: cover; }
.author-hero h1 { font-size: 36px; margin-top: 2px; }
.author-bio { margin-top: 14px; color: var(--muted); font-size: 16px; max-width: 720px; }
.author-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.author-stats li { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; }
.author-stats b { font-size: 20px; }
.author-stats small { color: var(--muted); }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; }
.cart-list { display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 92px 1fr auto auto auto; gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ci-cover { position: relative; border-radius: 8px; overflow: hidden; }
.ci-cover img { aspect-ratio: 2 / 3; object-fit: cover; }
.ci-cover .type-dot { position: absolute; top: 5px; inset-inline-end: 5px; width: 24px; height: 24px; box-shadow: 0 0 0 2px #fff; }
.ci-cover .type-dot .icon { width: 12px; height: 12px; }
.ci-info { min-width: 0; }
.ci-info .book-title { font-size: 16.5px; }
.ci-info .price { font-size: 15px; margin-top: 6px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; }
.qty button { width: 36px; height: 38px; border: 0; background: none; font-size: 18px; font-weight: 700; }
.qty input { width: 40px; border: 0; text-align: center; font-weight: 700; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ci-total { font-weight: 800; font-size: 16.5px; min-width: 96px; text-align: end; }
.ci-remove { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--soft); display: grid; place-items: center; color: var(--muted); }
.ci-remove:hover { background: #FDECEA; color: #B3261E; }
.ci-remove .icon { width: 17px; height: 17px; }
.cart-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.empty-cart { padding: 50px 20px; text-align: center; border: 1.5px dashed var(--line); border-radius: 14px; }
.empty-cart .icon { width: 50px; height: 50px; color: var(--store-primary); }
.empty-cart h2 { margin: 12px 0 6px; font-size: 24px; }
.empty-cart p { color: var(--muted); margin-bottom: 18px; }
.summary { position: sticky; top: 104px; padding: 22px; border-radius: 14px; background: var(--soft); }
.summary h2 { font-size: 21px; margin-bottom: 14px; }
.coupon { display: flex; gap: 8px; }
.coupon .field { min-height: 44px; }
.coupon-on { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #fff; font-size: 14px; }
.coupon-on button { border: 0; background: none; color: #B3261E; font-weight: 700; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 15.5px; }
.sum-row:first-of-type { margin-top: 12px; }
.sum-row span { color: var(--muted); }
.sum-total { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 19px; font-weight: 800; }
.sum-total span { color: var(--store-text); }
.summary .btn { margin-top: 14px; }
.sum-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- 404 */
.nf { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; padding: 30px 0; }
.nf-art { position: relative; height: 380px; }
.nf-art::before { content: ""; position: absolute; top: 0; inset-inline-end: 10%; width: 300px; height: 300px; border-radius: 50%; background: var(--store-primary); }
.nf-art::after { content: ""; position: absolute; bottom: 10px; inset-inline-end: 52%; width: 170px; height: 170px; border-radius: 50%; background: var(--tint-2); }
.nf-num { position: absolute; z-index: 2; top: 92px; inset-inline-end: 6%; font-size: 150px; font-weight: 800; line-height: 1; color: #fff; text-shadow: 0 10px 30px rgba(17, 24, 39, .25); letter-spacing: 4px; }
.nf-book { position: absolute; z-index: 1; bottom: 30px; inset-inline-end: 28%; width: 220px; height: 70px; }
.nf-book i { position: absolute; inset-inline: 0; height: 22px; border-radius: 4px; }
.nf-book i:nth-child(1) { bottom: 0; background: var(--store-accent); }
.nf-book i:nth-child(2) { bottom: 22px; inset-inline: 14px -10px; background: #F2B233; }
.nf-book i:nth-child(3) { bottom: 44px; inset-inline: -6px 20px; background: #E07A5F; }
.nf-copy h1 { font-size: 36px; }
.nf-copy p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.nf-search { display: flex; gap: 8px; margin: 22px 0 16px; max-width: 480px; }
.nf-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- صفحة المكوّنات */
.kit-sec { padding: 40px 0; border-bottom: 1px solid var(--line); }
.kit-sec > .container > h2 { font-size: 22px; margin-bottom: 18px; }
.kit-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.kit-note { color: var(--muted); font-size: 14.5px; margin-top: 10px; }
.kit-head-demo { position: relative; padding: 30px 0 90px; background: var(--store-accent); }
.kit-buybox { position: static; max-width: 340px; }
.kit-posts { grid-template-columns: minmax(0, 380px); }
.kit-head-demo .site-header { position: relative !important; padding: 0; background: transparent !important; }

/* ---------------------------------------------------------------- ظهورٌ هادئ */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* ================================================================ العروض */
@media (max-width: 1200px) {
	.main-nav > ul > li.nav-extra { display: none; }
	.pdp { grid-template-columns: 320px 1fr; }
	.buybox { grid-column: 1 / -1; position: static; }
	[data-books-per-row="5"], [data-books-per-row="6"] { --cols: 4; }
	.author-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.author-grid > :nth-child(5) { display: none; }
}

@media (max-width: 1080px) {
	.main-nav, .header-actions .hide-md { display: none; }
	.menu-toggle { display: inline-grid; }
	.hbar { justify-content: space-between; }
	.header-actions { margin-inline-start: auto; }
	.book-grid, [data-books-per-row] .book-grid { --cols: 3; }
	.dark-sec .book-grid { --cols: 3; }
	.cat-grid { grid-template-columns: repeat(3, 1fr); }
	.mini-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.mini-row > :nth-child(n + 5) { display: none; }
	.steps-layout { grid-template-columns: 1fr 1fr; }
	.steps-art { grid-column: 1 / -1; order: -1; max-width: 520px; margin-inline: auto; }
	.dark-grid { grid-template-columns: 1fr; gap: 30px; }
	.dark-copy { order: 0; }
	.footer-top { grid-template-columns: 1fr 1fr 1fr; }
	.footer-brand { grid-column: 1 / -1; }
	.listing { grid-template-columns: 1fr; }
	.filters { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(330px, 88vw); border-radius: 0; overflow-y: auto; transform: translateX(105%); transition: transform .3s; visibility: hidden; }
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-close { display: inline-grid; }
	.filters-toggle { display: inline-flex; }
	.reviews-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
	.story-grid { grid-template-columns: 1fr; gap: 40px; }
	.story-media { max-width: 460px; width: 100%; margin-inline: auto; }
	.hs-fields { grid-template-columns: 1fr 1fr; gap: 8px; }
	.hs-cell, .hs-cell:first-child, .hs-cell:nth-child(3) { margin: 0; border-radius: 10px; }
	.hs-cell:first-child { grid-column: 1 / -1; }
	.hs-go { grid-column: 1 / -1; margin: 0; min-height: 50px; }
	.wide-banner { grid-template-columns: 1fr; }
	.wb-art { min-height: 300px; }
	.wb-clip { border-radius: 0 0 14px 14px; }
	.wb-art img { width: 80%; inset-inline-end: 10%; bottom: -36px; }
	.pdp { grid-template-columns: 1fr; }
	.gallery { max-width: 380px; width: 100%; margin-inline: auto; }
	.author-hero { grid-template-columns: 1fr; gap: 26px; text-align: center; }
	.author-frame { max-width: 280px; width: 100%; margin-inline: auto; }
	.author-bio { margin-inline: auto; }
	.author-stats { justify-content: center; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.nf { grid-template-columns: 1fr; text-align: center; }
	.nf-search, .nf-actions { margin-inline: auto; justify-content: center; }
	.nf-art { max-width: 420px; width: 100%; margin-inline: auto; height: 340px; }
}

@media (max-width: 640px) {
	:root { --gutter: 16px; --slant: 26px; }
	body { font-size: 15px; }
	.site-header { padding-top: 12px; }
	.hbar { min-height: 58px; padding: 6px 8px; padding-inline-start: 12px; gap: 8px; }
	.brand img { width: 34px; height: 34px; }
	.brand-name { font-size: 18px; }
	.header-actions .hide-sm { display: none; }
	.icon-btn { width: 38px; height: 38px; }
	.hero { padding: 108px 0 80px; min-height: 0; }
	.slide-copy h2 { font-size: 30px; }
	.slide-copy p { font-size: 15.5px; }
	.slide-shade { background: linear-gradient(rgba(11, 20, 36, .35), rgba(11, 20, 36, .78)); }
	.hero-search { padding: 14px; }
	.hs-radios { gap: 6px 12px; }
	.slider-dots { bottom: 46px; }
	.mq-item { font-size: 16px; gap: 24px; }
	.marquee-track { gap: 24px; }
	.section { padding: 52px 0; }
	.sec-title { font-size: 25px; }
	.sec-sub { font-size: 15px; }
	.book-grid, [data-books-per-row] .book-grid, .dark-sec .book-grid, .listing .book-grid, .works-grid { --cols: 2; gap: 14px; }
	.bc-media { padding: 8px 8px 0; }
	.bc-wish { top: 14px; inset-inline-start: 14px; width: 30px; height: 30px; }
	.bc-media > .type-dot { top: 14px; inset-inline-end: 14px; width: 30px; height: 30px; }
	.bc-media > .badge { top: 52px; inset-inline-end: 12px; font-size: 11.5px; padding: 2px 7px; }
	.bc-add { width: 38px; height: 38px; inset-inline-end: 14px; bottom: -16px; }
	.stock-band { inset-inline: 8px; font-size: 12.5px; }
	.bc-body { padding: 12px 10px 12px; }
	.book-title { font-size: 15px; }
	.book-author { font-size: 13px; }
	.price { font-size: 16px; }
	.price del { font-size: 12px; }
	.bc-foot { gap: 6px; }
	.cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
	.ct-name { font-size: 14px; }
	.ct-count { font-size: 12px; }
	.ct-badge { top: 6px; inset-inline-start: 6px; padding: 0 8px; font-size: 11.5px; }
	.cat-strip .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
	.cat-strip .ct-name { font-size: 13px; }
	.mini-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mini-row > :nth-child(n + 5) { display: none; }
	.steps-layout { grid-template-columns: 1fr; }
	.steps-col { gap: 26px; }
	.step, .steps-col-end .step { grid-template-columns: 46px 1fr; text-align: start; }
	.step .step-ico { order: -1; margin-top: 4px; }
	.story-frame { border-radius: 90px 0 90px 0; }
	.story-badge { width: 112px; height: 112px; font-size: 14px; }
	.story-copy h2, .dark-copy h2 { font-size: 25px; }
	.author-grid { gap: 12px; }
	.ac-foot { padding: 10px 12px; }
	.ac-name { font-size: 15px; }
	.wb-copy { padding: 30px 22px 10px; }
	.wb-copy h2 { font-size: 26px; }
	.wb-art { min-height: 240px; }
	.footer-top { grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 48px; }
	.footer-contact { grid-template-columns: 1fr; gap: 14px; }
	.fb-in { justify-content: center; text-align: center; }
	.fb-links { justify-content: center; }
	.page-head { padding: 104px 0 40px; }
	.ph-title { font-size: 28px; }
	.toolbar { padding: 10px 12px; }
	.tb-side .field { width: 150px; }
	.pdp-info h1 { font-size: 26px; }
	.spec-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.spec-boxes li { border-inline-start: 0 !important; border-bottom: 1px solid var(--line) !important; }
	.spec-boxes li:nth-child(even) { border-inline-start: 1px solid var(--line) !important; }
	.spec-boxes li:nth-last-child(-n + 2) { border-bottom: 0 !important; }
	.spec-table th { width: 120px; }
	.cart-item { grid-template-columns: 74px 1fr auto; gap: 10px 14px; }
	.cart-item .qty { grid-column: 2; justify-self: start; }
	.ci-total { grid-column: 3; grid-row: 2; min-width: 0; }
	.ci-remove { grid-column: 3; grid-row: 1; align-self: start; }
	.ci-cover { grid-row: span 2; }
	.nf-art { height: 280px; }
	.nf-art::before { width: 220px; height: 220px; }
	.nf-art::after { width: 120px; height: 120px; }
	.nf-num { font-size: 104px; top: 66px; }
	.nf-book { width: 170px; }
	.nf-copy h1 { font-size: 28px; }
	.author-hero h1 { font-size: 28px; }
}

/* ================================================================ ميزات المنصّة المعتمدة */
/* وسم التصنيف على الخانة (category.badge) */
.ct-media { position: relative; }
.ct-badge { position: absolute; top: 10px; inset-inline-start: 10px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; line-height: 1.7; background: var(--store-primary); color: #fff; }
.ct-badge[data-badge="new"] { background: var(--store-accent); }

/* الأسئلة الشائعة في القسم الداكن (home_faq) */
.dark-sec:not(:has([data-region]:not([hidden]))) { display: none; }
.dark-faq { position: relative; display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; margin-top: 64px; padding-top: 56px; border-top: 1px solid rgba(255, 255, 255, .14); }
.dark-sec > .dark-faq:first-child, .dark-grid[hidden] + .dark-faq { margin-top: 0; padding-top: 0; border-top: 0; }
.faq-copy h2 { font-size: 30px; color: #fff; }
.faq-copy p:not(.eyebrow) { margin-top: 12px; color: #C9D2DE; font-size: 16px; }
.faq-list { display: grid; }
.faq-item { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.faq-item summary { display: flex; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; list-style: none; font-weight: 800; font-size: 16.5px; color: #fff; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-sign { position: relative; width: 22px; height: 22px; flex: none; border-radius: 50%; background: #fff; }
.faq-sign::before, .faq-sign::after { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 2px; margin: -1px 0 0 -5px; background: var(--ink); border-radius: 2px; transition: transform .25s; }
.faq-sign::after { transform: rotate(90deg); }
.faq-item[open] .faq-sign { background: #8FC1EA; }
.faq-item[open] .faq-sign::after { transform: rotate(0); }
.faq-item p { margin: 0 11px 18px 0; padding-inline-start: 22px; border-inline-start: 1.5px solid rgba(255, 255, 255, .22); color: #C9D2DE; font-size: 15px; line-height: 1.85; }

/* المدوّنة (home_latest_posts وblog وpost) */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
[data-card-style="framed"] .post-card { box-shadow: none; border: 1.5px solid var(--line); }
.pc-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--tile); }
.pc-media img { width: 100%; height: 100%; object-fit: cover; }
.pc-tag { position: absolute; bottom: 12px; inset-inline-start: 12px; padding: 2px 10px; border-radius: 6px; background: #fff; color: var(--store-text); font-size: 13px; font-weight: 800; }
.pc-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.pc-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; }
.pc-meta .icon { width: 16px; height: 16px; }
.pc-title { font-size: 18px; line-height: 1.45; }
.pc-title a:hover { color: var(--store-primary); }
.pc-excerpt { color: var(--muted); font-size: 14.5px; line-height: 1.75; }
.post-date { display: inline-flex; align-items: center; gap: 6px; }
.post-date .icon { width: 18px; height: 18px; }
.post-wrap { max-width: 820px; }
.post-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.post-body { margin-top: 30px; display: grid; gap: 16px; font-size: 17.5px; line-height: 1.95; }
.post-body p:first-child { font-size: 19px; font-weight: 500; }
.post-back { margin-top: 30px; }
.post-back .icon { transform: scaleX(-1); }

/* بانر التطبيق (home_app وstore.app_links) */
.app-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.app-badge { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 800; font-size: 16px; line-height: 1.2; direction: ltr; transition: background .2s, transform .2s; }
.app-badge:hover { background: var(--store-accent); transform: translateY(-2px); }
.app-badge .icon { width: 24px; height: 24px; }
.app-badge span { display: grid; text-align: start; }
.app-badge small { font-size: 11.5px; font-weight: 500; color: #D5DCE6; direction: rtl; text-align: left; }

@media (max-width: 1080px) {
	.dark-faq { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
	.faq-copy h2 { font-size: 24px; }
	.dark-faq { margin-top: 44px; padding-top: 40px; }
	.post-body { font-size: 16.5px; }
}

/* ================================================================ الإصدار الثاني */
/* الشريط المائل يختفي كلّه إن فرغت قائمة عباراته */
.marquee-wrap:not(:has(.mq-item)) { display: none; }

/* النظرة السريعة: تطفو تحت المفضّلة، تظهر عند التحويم في الحاسوب ودائمًا في اللمس، ولا تحجز مكانًا */
.bc-quick {
	position: absolute; top: 66px; inset-inline-start: 24px; width: 34px; height: 34px; border-radius: 50%; border: 0;
	background: #fff; color: var(--store-text); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); transition: opacity .2s, transform .2s;
}
.bc-quick .icon { width: 17px; height: 17px; }
.bc-quick:hover, .bc-wish:hover { color: var(--store-primary-dark); }
[data-card-style="flat"] .bc-quick { top: 52px; inset-inline-start: 10px; }
@media (hover: hover) {
	.bc-quick { opacity: 0; transform: translateY(-4px); }
	.book-card:hover .bc-quick, .book-card:focus-within .bc-quick { opacity: 1; transform: none; }
}

/* البطاقة الضيّقة (عمودان في الهاتف، والشرائط الأفقيّة): أيقونات المواصفات بلا عناوينها */
.book-card { container-type: inline-size; }
@container (max-width: 280px) {
	.rate-count { display: none; }
}
@container (max-width: 236px) {
	.spec-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.spec-row li:nth-child(3) { display: none; }
	.spec-row li { flex-direction: row; align-items: center; justify-content: center; gap: 3px; padding: 6px 2px; }
	.spec-row small { font-size: 0; gap: 0; }
	.spec-row small .icon { width: 12px; height: 12px; }
	.spec-row b { font-size: 12px; }
}

/* تبويبات «الأكثر رواجًا»: نصوصٌ والنقاط الثلاث تحت المختار، كالرابط الحاليّ في الرأس */
.sec-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: -16px auto 30px; }
.sec-tabs [role="tab"] { position: relative; min-height: 42px; padding: 6px 18px 10px; border: 0; border-radius: 999px; background: none; font-weight: 700; font-size: 15.5px; color: var(--muted); white-space: nowrap; }
.sec-tabs [role="tab"]:hover { color: var(--store-primary-dark); }
.sec-tabs [role="tab"][aria-selected="true"] { color: var(--store-text); background: var(--tint); }
.sec-tabs [role="tab"][aria-selected="true"]::after {
	content: ""; position: absolute; inset-inline: 0; bottom: 3px; margin-inline: auto; width: 18px; height: 4px;
	background: radial-gradient(circle, var(--store-primary) 1.8px, transparent 2.2px) 0 0 / 6px 4px repeat-x;
}
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* صفوفٌ كاملة: صفٌّ واحد (اقتراحات الصفحات الداخليّة) أو صفّان (الأكثر رواجًا) بحسب عدد الكتب في الصفّ */
body:not([data-books-per-row]) .grid-1row > :nth-child(n + 5), [data-books-per-row="4"] .grid-1row > :nth-child(n + 5),
[data-books-per-row="3"] .grid-1row > :nth-child(n + 4), [data-books-per-row="5"] .grid-1row > :nth-child(n + 6), [data-books-per-row="6"] .grid-1row > :nth-child(n + 7),
body:not([data-books-per-row]) .grid-2rows > :nth-child(n + 9), [data-books-per-row="4"] .grid-2rows > :nth-child(n + 9),
[data-books-per-row="3"] .grid-2rows > :nth-child(n + 7), [data-books-per-row="5"] .grid-2rows > :nth-child(n + 11) { display: none; }

/* أعمال المؤلّف: ستّة في صفٍّ واحد، ثمّ ثلاثة، ثمّ اثنان */
.works-grid { --cols: 6; gap: 18px; }

/* وصل حديثًا: عنوانٌ في البداية وسهمان، وشريطٌ أفقيّ */
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.row-head .eyebrow { margin-bottom: 2px; }
.row-nav { display: flex; align-items: center; gap: 8px; }
.row-all { margin-inline-end: 8px; font-weight: 700; color: var(--store-primary-dark); }
.row-all:hover { text-decoration: underline; }
.row-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--store-text); display: grid; place-items: center; transition: .2s; }
.row-btn:hover { background: var(--store-accent); border-color: var(--store-accent); color: #fff; }
.book-scroller {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 20px) / 5); gap: 20px;
	overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 8px 16px; margin: -8px -8px 0; scrollbar-width: thin; scrollbar-color: var(--tint-2) transparent;
}
.book-scroller > * { scroll-snap-align: start; }
.book-scroller .spec-row { display: none; }
.book-scroller .bc-foot { margin-bottom: 0; }

/* عرض الأسبوع: كتابٌ واحد كبير فوق دائرةٍ بلون المتجر، وعدّاد */
.deal-sec { position: relative; overflow: hidden; background: var(--tint); }
.deal-sec::before { content: ""; position: absolute; inset-inline-end: -140px; top: -160px; width: 420px; aspect-ratio: 1; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--store-primary) 30%, transparent); pointer-events: none; }
.deal { position: relative; display: grid; gap: 26px; }
.deal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.deal-head .eyebrow { margin-bottom: 2px; }
.deal-head > div:first-child { display: grid; }
.deal-heading { font-size: 32px; }
.countdown { display: flex; align-items: center; gap: 8px; }
.countdown[hidden] { display: none; }
.cd-label { margin-inline-end: 4px; color: var(--store-text); font-weight: 700; font-size: 14.5px; }
.cd-unit { display: grid; place-items: center; min-width: 64px; padding: 8px 6px 6px; border-radius: 10px; background: var(--store-accent); color: #fff; line-height: 1.15; }
.cd-unit b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: #D5DCE6; }
.deal-book { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 56px; align-items: center; padding: 34px 40px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.deal-media { position: relative; display: grid; place-items: center; padding: 26px 0; }
.deal-ring { position: absolute; width: 88%; aspect-ratio: 1; border-radius: 50%; background: var(--store-primary); }
.deal-ring::after { content: ""; position: absolute; bottom: -4%; inset-inline-end: -8%; width: 38%; aspect-ratio: 1; border-radius: 50%; background: var(--tint-2); }
.deal-cover { position: relative; width: 60%; border-radius: 8px; overflow: hidden; box-shadow: 0 24px 40px rgba(17, 24, 39, .3); transform: rotate(-3deg); transition: transform .3s; }
.deal-cover:hover { transform: rotate(0); }
.deal-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.deal-media .type-dot { position: absolute; z-index: 1; top: 14px; inset-inline-end: 10%; }
.deal-media .badge { position: absolute; z-index: 1; top: 18px; inset-inline-start: 8%; padding: 5px 12px; font-size: 14px; }
.deal-title { font-size: 30px; margin-top: 4px; }
.deal-title a:hover { color: var(--store-primary-dark); }
.deal-body .book-author { font-size: 16px; margin-top: 6px; }
.deal-rate { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 14.5px; }
.deal-rate b { color: var(--store-text); }
.deal-desc { display: grid; gap: 8px; max-width: 620px; margin-top: 14px; color: var(--muted); font-size: 16px; }
.deal-buy { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.deal-price { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; }
.deal-price .price { font-size: 28px; }
.deal-price .price del { font-size: 16px; }
.deal-price .bb-save { margin-top: 0; }
.deal-buy .btn { min-height: 52px; }
.deal-more { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; font-weight: 700; color: var(--store-primary-dark); }
.deal-more:hover { text-decoration: underline; }

/* صفحة الكتاب: الوصف بجانب الغلاف، واختيار الصيغة، والكمّيّة، وصندوق التوصيل والدفع */
.pdp-desc { margin-top: 24px; }
.pdp-sub { font-size: 18px; margin-bottom: 8px; }
.pdp-desc .prose { color: var(--muted); font-size: 15.5px; line-height: 1.9; }
.pdp-desc .prose p + p { margin-top: 8px; }
.bb-formats { margin: 0 0 16px; }
.bb-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 14px; font-weight: 700; }
.fmt-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.fmt { display: grid; justify-items: center; gap: 2px; padding: 10px 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; text-align: center; transition: border-color .2s, background .2s; }
.fmt:hover { border-color: var(--store-primary); }
.fmt.is-current { border-color: var(--store-primary); background: var(--tint); }
.fmt .type-dot { width: 26px; height: 26px; box-shadow: none; margin-bottom: 2px; }
.fmt .type-dot .icon { width: 13px; height: 13px; }
.fmt-name { font-weight: 800; font-size: 14px; }
.fmt-price { color: var(--store-primary-dark); font-size: 13px; font-weight: 700; }
.bb-buy { display: flex; gap: 10px; }
.bb-buy .btn { flex: 1; min-width: 0; padding-inline: 10px; font-size: 15px; }
.bb-buy .qty button { width: 32px; }
.bb-buy .qty input { width: 30px; }
.bb-buy .qty { flex: none; }
.bb-buy .qty button { display: grid; place-items: center; }
.bb-info { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--soft); }
.bb-info h3 { font-size: 15.5px; margin-bottom: 8px; }
.bb-info ul { display: grid; gap: 7px; font-size: 14px; color: var(--muted); }
.bb-info li { display: flex; align-items: flex-start; gap: 8px; line-height: 1.6; }
.bb-info .icon { width: 17px; height: 17px; margin-top: 2px; color: var(--store-primary-dark); }
.bb-info a { color: var(--store-primary-dark); font-weight: 700; }

/* صفحة التصنيف: التصفية المختارة، والشبكة أو القائمة */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 22px; }
.af-label { color: var(--muted); font-size: 14px; font-weight: 700; }
.af-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: 999px; background: var(--tint); color: var(--store-primary-dark); font-size: 14px; font-weight: 700; }
.af-chip .icon { width: 14px; height: 14px; }
.af-chip:hover { background: var(--tint-2); }
.af-clear { margin-inline-start: 4px; color: var(--muted); font-size: 14px; text-decoration: underline; }
.view-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1.5px solid var(--line); border-radius: 999px; }
.view-switch button { width: 40px; height: 36px; border: 0; border-radius: 999px; background: none; color: var(--muted); display: grid; place-items: center; }
.view-switch button[aria-pressed="true"] { background: var(--store-accent); color: #fff; }
.listing .book-grid.is-list { grid-template-columns: 1fr; }
.is-list .book-card { flex-direction: row; }
.is-list .bc-media { flex: none; width: 190px; padding-bottom: 14px; }
.is-list .bc-body { justify-content: center; padding: 18px 22px; }
.is-list .spec-row { margin-top: 4px; max-width: 460px; }
.is-list .bc-add { bottom: 6px; }

@media (max-width: 1200px) {
	[data-books-per-row="5"] .grid-1row > :nth-child(n + 5), [data-books-per-row="6"] .grid-1row > :nth-child(n + 5),
	[data-books-per-row="5"] .grid-2rows > :nth-child(n + 9), [data-books-per-row="6"] .grid-2rows > :nth-child(n + 9) { display: none; }
	.works-grid { --cols: 3; }
}
@media (max-width: 1080px) {
	.grid-1row > :nth-child(n + 4), .grid-2rows > :nth-child(n + 7) { display: none; }
	.book-scroller { grid-auto-columns: calc((100% - 3 * 16px) / 3.4); gap: 16px; }
	.deal-book { grid-template-columns: minmax(0, 300px) 1fr; gap: 34px; padding: 28px; }
}
@media (max-width: 860px) {
	/* شريط الثقة: صفٌّ واحد يُسحب */
	.trust { padding-top: 24px; }
	.trust-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-card { padding: 14px 16px; padding-inline-end: 64px; scroll-snap-align: start; }
	.trust-card h3 { font-size: 16px; margin-bottom: 2px; }
	.trust-card p { font-size: 13.5px; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
	.trust-ico { top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; }
	/* المؤلّفون والآراء والمقالات: شرائط أفقيّة بدل صفوفٍ ناقصة */
	.author-grid, .review-grid, [data-region] .post-grid { grid-template-columns: none; grid-auto-flow: column; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--tint-2) transparent; padding: 6px 2px 12px; margin: -6px -2px 0; }
	.author-grid { grid-auto-columns: 40%; gap: 14px; }
	.author-grid > :nth-child(5) { display: flex; }
	.review-grid { grid-auto-columns: 72%; gap: 14px; }
	[data-region] .post-grid { grid-auto-columns: 64%; gap: 16px; }
	.author-grid > *, .review-grid > *, .post-grid > * { scroll-snap-align: start; }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.deal-book { grid-template-columns: 1fr; gap: 10px; }
	.deal-media { max-width: 340px; width: 100%; margin-inline: auto; }
}
@media (max-width: 640px) {
	/* الواجهة: الصورة فوق النصّ لا خلفه، والبحث خانةٌ واحدة */
	.hero { padding: 0 0 52px; background: var(--store-accent); }
	.slide-img { position: relative; inset: auto; z-index: 0; height: 270px; object-position: 24% 50%; }
	.slide-shade { display: none; }
	.slide-copy { padding-top: 20px; }
	.slide-copy h2 { font-size: 28px; text-shadow: none; }
	.slide-copy .btn { margin-top: 16px; }
	.hero-search-wrap { margin-top: 20px; }
	.hero-search { padding: 10px; }
	.hs-top, .hs-fields .hs-cell:nth-child(2), .hs-fields .hs-cell:nth-child(3) { display: none; }
	.hs-fields { grid-template-columns: 1fr auto; }
	.hs-cell:first-child { grid-column: auto; }
	.hs-go { grid-column: auto; min-height: 0; padding: 0 18px; }
	.slider-dots { bottom: 30px; }
	.grid-1row > :nth-child(4), [data-books-per-row] .grid-1row > :nth-child(4) { display: flex; }
	.grid-2rows > :nth-child(n + 5) { display: none; }
	.sec-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: -14px calc(var(--gutter) * -1) 22px; padding-inline: var(--gutter); scrollbar-width: none; }
	.sec-tabs [role="tab"] { font-size: 14.5px; padding-inline: 14px; }
	.row-head { align-items: center; margin-bottom: 18px; }
	.row-all { display: none; }
	.row-btn { width: 40px; height: 40px; }
	.book-scroller { grid-auto-columns: 46%; gap: 12px; }
	.bc-quick { top: 50px; inset-inline-start: 14px; width: 30px; height: 30px; }
	.dark-sec .book-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 12px; margin: -6px -4px 0; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .3) transparent; }
	.dark-sec .book-grid > * { scroll-snap-align: start; }
	.author-grid { grid-auto-columns: 44%; gap: 12px; }
	.review-grid { grid-auto-columns: 86%; }
	[data-region] .post-grid { grid-auto-columns: 84%; gap: 14px; }
	.post-grid { grid-template-columns: 1fr; }
	.deal-heading { font-size: 25px; }
	.deal-head { align-items: flex-start; flex-direction: column; }
	.countdown { flex-wrap: wrap; gap: 6px; }
	.cd-label { flex-basis: 100%; }
	.cd-unit { min-width: 0; flex: 1; }
	.cd-unit b { font-size: 21px; }
	.deal-book { padding: 18px 16px 20px; }
	.deal-media { max-width: 260px; padding: 16px 0; }
	.deal-title { font-size: 24px; }
	.deal-desc { font-size: 15px; }
	.deal-desc p + p { display: none; }
	.deal-price .price { font-size: 24px; }
	.deal-buy .btn { flex: 1; }
	.deal-more { flex-basis: 100%; justify-content: center; min-height: 40px; }
	.bb-buy .btn { font-size: 15px; }
	.active-filters { margin-top: -10px; }
	.is-list .bc-media { width: 120px; padding: 8px; }
	.is-list .bc-body { padding: 12px; }
}

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