/* ================================================================
   وَهَج — قالب متجر كتب لمنصّة «ناشر»
   خلفيّة رماديّة فاتحة وصناديق بيضاء، ولونٌ قانٍ صارخ للأسعار
   والأزرار والشارات، وعناوين ثقيلة كبيرة. CSS خالص بلا مكتبات.
   ================================================================ */

:root {
	/* ألوان المتجر (القاعدة 4): قيمٌ تجريبيّة يغيّرها الناشر */
	--store-primary: #D81B45;
	--store-primary-dark: #B3143A;
	--store-accent: #333745;
	--store-bg: #F7F7F7;
	--store-text: #333745;

	/* محايدات */
	--box: #FFFFFF;
	--muted: #6B6B6B;
	--line: #E4E4E6;
	--soft: #EFEFEF;
	--gold: #F2A626;
	--star-off: #D7D7DA;
	--on-primary: #FFFFFF;
	--on-accent: #FFFFFF;
	--primary-text: color-mix(in srgb, var(--store-primary) 88%, #000);

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

	--f-head: "Cairo", "Tajawal", system-ui, sans-serif;
	--f-body: "Tajawal", system-ui, sans-serif;
	--r: 0px;
	--r-sm: 0px;
	--gap: 20px;
	--wrap: 1200px;
	--cols: 4;
	--shadow: 0 6px 24px rgba(20, 22, 30, .08);
}

body[data-corners="rounded"] { --r: 10px; --r-sm: 6px; }

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

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-fill { fill: currentColor; stroke: none; }

.container { width: 100%; max-width: calc(var(--wrap) + 32px); margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 860px; }
.narrow-wide { max-width: 940px; }
.box { background: var(--box); border-radius: var(--r); }

/* ---------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 22px;
	font-family: var(--f-head); font-weight: 700; font-size: 15px;
	border-radius: var(--r-sm); border: 2px solid transparent;
	transition: background .2s, color .2s, border-color .2s;
	white-space: nowrap;
}
.btn .icon { width: 19px; height: 19px; }
.btn-primary { background: var(--store-primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-dark { background: var(--store-accent); color: var(--on-accent); }
.btn-dark:hover { background: color-mix(in srgb, var(--store-accent) 82%, #000); }
.btn-outline { border-color: var(--store-accent); color: var(--store-accent); background: var(--box); }
.btn-outline:hover { background: var(--store-accent); color: var(--on-accent); }
.btn-light { background: var(--soft); color: var(--store-text); }
.btn-light:hover { background: var(--line); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 17px; }
.btn-grow { flex: 1; }
.btn:disabled { background: var(--soft); color: var(--muted); cursor: not-allowed; border-color: transparent; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; position: relative; color: var(--store-text); border-radius: var(--r-sm); }
.icon-btn:hover { color: var(--store-primary); }
.icon-btn-box { border: 2px solid var(--line); width: 50px; height: 50px; background: var(--box); }
.icon-btn[aria-pressed="true"], .tool[aria-pressed="true"] { color: var(--store-primary); }
.icon-btn[aria-pressed="true"] .icon, .tool[aria-pressed="true"] .icon { fill: currentColor; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-text); font-weight: 700; font-size: 14px; }
.bubble {
	position: absolute; top: 2px; inset-inline-end: 0;
	min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
	background: var(--store-primary); color: var(--on-primary);
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ---------------- شريط الخدمات */
.svc-bar { background: var(--store-accent); color: var(--on-accent); font-size: 13px; }
.svc-in { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 12px; }
.svc-bar p { display: flex; gap: 18px; align-items: center; }
.svc-bar a { display: inline-flex; align-items: center; gap: 6px; color: var(--on-accent); }
.svc-bar a:hover { text-decoration: underline; }

/* ---------------- الرأس */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--box); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-stuck { box-shadow: 0 4px 18px rgba(20, 22, 30, .08); }
.hdr { display: flex; align-items: center; gap: 8px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: var(--r-sm); }
.brand-name { font-family: var(--f-head); font-weight: 800; font-size: 22px; color: var(--primary-text); letter-spacing: -.2px; white-space: nowrap; }
.menu-btn { display: none; }
.hdr-nav { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; }
.nav-cats { display: flex; gap: 4px; }
.nav-cats a, .nav-link, .nav-home {
	position: relative; display: inline-flex; align-items: center; gap: 4px;
	padding: 8px 12px; font-family: var(--f-head); font-weight: 700; font-size: 15px; color: var(--store-text);
}
.nav-cats a:hover, .nav-link:hover, .nav-home:hover { color: var(--primary-text); }
.nav-badge {
	display: inline-block; padding: 0 6px; font-family: var(--f-body); font-size: 10px; font-weight: 700; line-height: 16px;
	background: var(--store-accent); color: var(--on-accent); border-radius: var(--r-sm);
}
.nav-badge[data-badge="trending"] { background: var(--store-primary); color: var(--on-primary); }
.hdr-nav .nav-badge { position: absolute; top: -6px; inset-inline-start: 50%; transform: translateX(50%); }
.hdr-actions { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.hdr-pop { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--box); border-top: 1px solid var(--line); box-shadow: var(--shadow); }
body.search-open .hdr-pop { display: block; }
.hdr-pop-in { display: flex; gap: 10px; padding-block: 14px; }
.hdr-pop input, .m-search input, .nf-search input, .nl-field input, .coupon input, .rv-form textarea, .price-range input {
	flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; background: var(--box);
	border: 2px solid var(--line); border-radius: var(--r-sm); outline: none;
}
.hdr-pop input:focus, .m-search input:focus, .nf-search input:focus, .nl-field input:focus, .coupon input:focus, .rv-form textarea:focus { border-color: var(--store-primary); }
.m-search { display: none; background: var(--box); border-bottom: 1px solid var(--line); }
.m-search-in { display: flex; padding-block: 10px; }
.m-search input { border-color: var(--store-primary); border-inline-end: 0; border-start-end-radius: 0; border-end-end-radius: 0; min-height: 44px; }
.m-search-go { width: 48px; display: grid; place-items: center; background: var(--store-primary); color: var(--on-primary); border-start-end-radius: var(--r-sm); border-end-end-radius: var(--r-sm); }

/* الدرج */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 22, 30, .45); z-index: 80; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(320px, 86vw); z-index: 90;
	background: var(--box); display: flex; flex-direction: column; overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .28s, visibility .28s;
}
body.drawer-open .drawer { transform: none; visibility: visible; }
body.drawer-open .drawer-backdrop:not(.filters-backdrop), body.filters-open .filters-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head .brand-name { font-size: 19px; }
.drawer-nav { display: flex; flex-direction: column; padding: 8px 0; }
.drawer-nav > a { padding: 12px 18px; font-family: var(--f-head); font-weight: 700; border-bottom: 1px solid var(--soft); }
.drawer-label { padding: 14px 18px 4px; font-size: 13px; color: var(--muted); }
.drawer-cats { display: flex; flex-direction: column; padding-bottom: 6px; border-bottom: 1px solid var(--soft); }
.drawer-cats a { display: flex; align-items: center; gap: 8px; padding: 8px 30px 8px 18px; }
.drawer-call { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 16px 18px; background: var(--store-bg); font-size: 14px; }
.drawer-call .icon { color: var(--primary-text); }

/* ---------------- رؤوس الأقسام */
.section { padding-block: 44px; }
.section-tight { padding-block: 28px; }
.section-top { padding-top: 24px; }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.sec-title { font-size: 24px; font-weight: 800; }
.sh-line { flex: 1; height: 1px; background: var(--line); min-width: 24px; }
.see-all { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; color: var(--primary-text); }
.see-all:hover { text-decoration: underline; }
.sh-arrows { display: flex; gap: 4px; }
.sq-arrow { width: 30px; height: 30px; display: grid; place-items: center; background: var(--store-accent); color: var(--on-accent); border-radius: var(--r-sm); }
.sq-arrow .icon { width: 17px; height: 17px; }
.sq-arrow:hover { background: var(--store-primary); color: var(--on-primary); }
.sq-arrow:disabled { opacity: .35; cursor: default; background: var(--store-accent); }
.title-rule { display: block; width: 64px; height: 2px; margin: 14px auto 18px; background: var(--line); }

/* ---------------- السلايدر */
.hero { background: var(--box); }
.hero-in { position: relative; overflow: hidden; }
.slides { position: relative; height: clamp(300px, 39vw, 560px); }
.slide { position: absolute; inset: 0; display: block; opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-copy {
	position: absolute; top: 50%; inset-inline-start: max(16px, calc((100% - var(--wrap)) / 2));
	transform: translateY(-50%); width: min(520px, 46%);
	display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
	padding: 28px 30px; background: color-mix(in srgb, var(--box) 92%, transparent);
	border-inline-start: 5px solid var(--store-primary); border-radius: var(--r);
}
.slide-title { font-family: var(--f-head); font-weight: 800; font-size: clamp(28px, 3.6vw, 50px); line-height: 1.15; color: var(--store-text); }
.slide-text { color: var(--muted); font-size: 16px; }
.slide-btn { margin-top: 8px; }
.hero-dots { position: absolute; inset-inline-end: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.hero-dots button { position: relative; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--store-accent); background: var(--box); }
.hero-dots button::after { content: ""; position: absolute; inset: -14px; }
.hero-dots button[aria-selected="true"] { background: var(--store-primary); border-color: var(--store-primary); }

/* ---------------- مرحبًا بك */
.welcome { padding: 54px 0 10px; text-align: center; }
.welcome:has([data-slot="store.about"]:empty), .welcome:not(:has([data-slot="store.about"])) { display: none; }
.welcome-title { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; }
.welcome-title .hl { color: var(--primary-text); }
.welcome p { color: var(--muted); max-width: 760px; margin-inline: auto; }

/* ---------------- شريط الثقة */
.trust { padding: 26px 0 0; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.trust-item {
	display: flex; align-items: center; gap: 14px; text-align: start;
	padding: 14px 18px; border: 4px solid var(--box); border-radius: var(--r);
}
.t-txt { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.trust-item.t1 { background: color-mix(in srgb, var(--store-primary) 5%, #fff); }
.trust-item.t2 { background: color-mix(in srgb, var(--store-accent) 8%, #fff); }
.trust-item.t3 { background: color-mix(in srgb, var(--store-primary) 9%, #fff); }
.t-ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; background: var(--store-primary); color: var(--on-primary); border-radius: var(--r-sm); }
.t-ico .icon { width: 24px; height: 24px; }
.trust-item b { font-family: var(--f-head); font-weight: 800; font-size: 16px; }
.t-txt span { color: var(--muted); font-size: 14px; }
body[data-show-trust-bar="false"] .trust { display: none; }

/* ---------------- التصنيفات */
.ctile-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); }
.ctile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 12px 16px; background: var(--box); border-radius: var(--r); text-align: center; transition: box-shadow .2s, transform .2s; }
.ctile:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.ctile-img { position: relative; width: 100%; margin-bottom: 10px; }
.ctile-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); }
.ctile-badge { position: absolute; top: 8px; inset-inline-start: 8px; padding: 0 8px; font-size: 12px; font-weight: 700; line-height: 22px; background: var(--store-accent); color: var(--on-accent); border-radius: var(--r-sm); }
.ctile-badge[data-badge="trending"] { background: var(--store-primary); color: var(--on-primary); }
.ctile b { font-family: var(--f-head); font-weight: 800; font-size: 16px; }
.ctile small { color: var(--muted); font-size: 13px; }

/* ---------------- التبويبات */
.row-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }
.row-tab { padding: 4px 18px; font-family: var(--f-head); font-weight: 700; font-size: 21px; color: var(--store-text); border-radius: var(--r-sm); transition: background .2s, color .2s; }
.row-tab:hover { color: var(--primary-text); }
.row-tab[aria-selected="true"] { background: var(--store-primary); color: var(--on-primary); }

/* ---------------- شبكة الكتب */
.book-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: var(--gap); }
body[data-books-per-row="3"] .book-grid:not(.grid-fixed) { --cols: 3; }
body[data-books-per-row="5"] .book-grid:not(.grid-fixed) { --cols: 5; }
/* صفوفٌ كاملة: اثنا عشر كتابًا لا تملأ خمسة أعمدة، فيُكتفى بعشرة */
@media (min-width: 1024px) {
	body[data-books-per-row="5"] .book-grid:not(.grid-fixed):not(.is-list) > .bcard:nth-child(n+11) { display: none; }
}

/* ---------------- بطاقة الكتاب */
.bcard { position: relative; display: flex; flex-direction: column; background: var(--box); border-radius: var(--r); overflow: hidden; transition: box-shadow .2s; }
.bcard:hover { box-shadow: var(--shadow); }
body[data-card-style="framed"] .bcard { border: 1px solid var(--line); }
body[data-card-style="plain"] .bcard { background: transparent; overflow: visible; }
body[data-card-style="plain"] .bcard:hover { box-shadow: none; }
body[data-card-style="plain"] .bcard-media { background: var(--box); border-radius: var(--r); overflow: hidden; }
.bcard-media { position: relative; background: color-mix(in srgb, var(--store-text) 4%, #fff); }
.bcard-cover { display: block; padding: 18px 18px 0; }
.bcard-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 8px 18px rgba(20, 22, 30, .18); transition: transform .3s; }
.bcard:hover .bcard-cover img { transform: translateY(-4px); }
.bcard-media::after { content: ""; display: block; height: 18px; }
.bcard-flags { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; z-index: 1; }
.flag { display: inline-block; padding: 0 7px; font-size: 12px; font-weight: 700; line-height: 24px; border-radius: var(--r-sm); white-space: nowrap; }
.flag-sale { background: var(--store-primary); color: var(--on-primary); }
.flag-new { background: var(--store-accent); color: var(--on-accent); }
.type-dot { position: absolute; bottom: 10px; inset-inline-end: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 2px #fff; z-index: 1; }
.type-dot .icon { width: 17px; height: 17px; }
.type-dot[data-type="print"] { background: var(--type-print); }
.type-dot[data-type="ebook"] { background: var(--type-ebook); }
.type-dot[data-type="audio"] { background: var(--type-audio); }
.type-dot[data-type="educational"] { background: var(--type-edu); }
.kit-row .type-dot, .chk .type-dot { position: static; box-shadow: none; }
.bcard-tools { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.tool { width: 36px; height: 36px; display: grid; place-items: center; background: var(--box); color: var(--store-text); border-radius: var(--r-sm); box-shadow: 0 2px 8px rgba(20, 22, 30, .12); transition: opacity .2s, color .2s; }
.tool .icon { width: 18px; height: 18px; }
.tool:hover { color: var(--store-primary); }
@media (hover: hover) {
	.tool-qv { opacity: 0; }
	.bcard:hover .tool-qv, .tool-qv:focus-visible { opacity: 1; }
}
.bcard-out { position: absolute; top: 42%; inset-inline: 18%; padding: 8px 4px; background: var(--box); color: var(--store-text); text-align: center; font-family: var(--f-head); font-weight: 800; font-size: 14px; box-shadow: var(--shadow); border-radius: var(--r-sm); }
.bcard.is-out .bcard-cover img { opacity: .55; }
.bcard-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 12px 14px; text-align: center; }
.bcard-title { font-size: 15px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-title a:hover { color: var(--primary-text); }
.bcard-author { color: var(--muted); font-size: 13px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .icon { width: 14px; height: 14px; fill: var(--gold); stroke: none; }
.stars .icon.off { fill: var(--star-off); }
.price { font-family: var(--f-head); font-weight: 800; color: var(--primary-text); font-size: 17px; }
.price del { font-family: var(--f-body); font-weight: 500; color: var(--muted); font-size: 13px; margin-inline-start: 4px; }
.price-lg { font-size: 30px; }
.price-lg del { font-size: 17px; }
.bcard-add {
	margin-top: auto; width: 100%; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	background: var(--soft); color: var(--store-text); font-family: var(--f-head); font-weight: 700; font-size: 14px; border-radius: var(--r-sm);
	transition: background .2s, color .2s;
}
.bcard-body .price + .bcard-add { margin-top: auto; }
.bcard-body > .price { margin-bottom: 10px; }
.bcard-add .icon { width: 18px; height: 18px; }
.bcard-add:hover { background: var(--store-primary); color: var(--on-primary); }
.bcard-add:disabled { cursor: not-allowed; color: var(--muted); }
.bcard-add:disabled:hover { background: var(--soft); color: var(--muted); }

/* ---------------- المسارات الأفقيّة */
.track {
	--n: 4; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--n) - 1) * var(--gap)) / var(--n));
	gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.track-duo { --n: 2; }
.track-new { --n: 5; }
.track-works { --n: 4; }
.track-reviews { --n: 3; }
.track-authors { --n: 6; }
.track-posts { --n: 3; }

/* ---------------- شاهدتَه مؤخّرًا: بطاقاتٌ أفقيّة مدمجة، أربعٌ تملأ الصفّ */
.track-sm { --n: 4; }
.track-sm .bcard { flex-direction: row; align-items: stretch; }
.track-sm .bcard-media { width: 38%; flex: none; align-self: flex-start; }
.track-sm .bcard-cover { padding: 12px 12px 0; }
.track-sm .bcard-media::after { height: 12px; }
.track-sm .bcard-tools, .track-sm .bcard-flags { display: none; }
.track-sm .type-dot { width: 26px; height: 26px; bottom: 6px; inset-inline-end: 6px; }
.track-sm .type-dot .icon { width: 14px; height: 14px; }
.track-sm .bcard-body { align-items: flex-start; text-align: start; justify-content: center; padding: 12px 14px; }
.track-sm .bcard-body > .price { margin-bottom: 8px; }
/* زرّ السلّة هنا بشكل القالب نفسه: الزرّ النصّيّ الرماديّ الفاتح بزوايا البطاقة، بعرض محتواه */
.track-sm .bcard-body .bcard-add { margin-top: 0; width: auto; padding: 0 12px; font-size: 13px; }
.track-sm .price del { display: block; margin: 0; }

/* ---------------- خلفيّاتٌ متناوبة للأقسام */
.band-white { background: var(--box); }
.band-white .bcard { background: var(--store-bg); }
body[data-card-style="plain"] .band-white .bcard { background: transparent; }

/* ---------------- كتاب الأسبوع (home_featured) */
.feature-band { background: var(--store-accent); color: var(--on-accent); padding: 50px 0; overflow: hidden; }
.feature-wrap { position: relative; }
.feature-kicker { position: absolute; top: 4px; inset-inline-start: calc(16px + 330px + 56px); display: inline-block; padding: 2px 14px; background: var(--store-primary); color: var(--on-primary); font-size: 15px; font-weight: 800; border-radius: var(--r-sm); z-index: 1; }
.feature { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 56px; align-items: center; }
.feature-media { position: relative; padding: 26px; }
.feature-media::before { content: ""; position: absolute; inset: 0 34px 34px 0; background: var(--store-primary); border-radius: var(--r); }
.feature-cover { position: relative; display: block; }
.feature-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.feature-media .type-dot { width: 40px; height: 40px; bottom: 40px; inset-inline-end: 40px; }
.feature-media .type-dot .icon { width: 21px; height: 21px; }
.feature-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 44px; }
.feature-title { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; line-height: 1.2; color: var(--on-accent); }
.feature-title a:hover { text-decoration: underline; text-decoration-color: var(--store-primary); text-underline-offset: 6px; }
.feature-by { color: color-mix(in srgb, var(--on-accent) 80%, var(--store-accent)); }
.feature-by a { color: var(--on-accent); font-weight: 700; }
.feature-band .rating { color: color-mix(in srgb, var(--on-accent) 80%, var(--store-accent)); }
.feature-desc { max-width: 620px; color: color-mix(in srgb, var(--on-accent) 86%, var(--store-accent)); }
.feature-desc p + p { margin-top: 8px; }
.feature-buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.feature-price { color: var(--on-accent); }
.feature-buy .btn { min-height: 50px; }
.feature-wish { background: transparent; border-color: color-mix(in srgb, var(--on-accent) 40%, transparent); color: var(--on-accent); }
.feature-wish:hover { color: var(--on-accent); border-color: var(--on-accent); }

/* ---------------- آراء القرّاء (show_reviews) */
.reviews-band { background: color-mix(in srgb, var(--store-primary) 6%, #fff); }
.store-rate { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.store-rate b { font-family: var(--f-head); font-weight: 800; font-size: 22px; color: var(--store-text); }
.rcard { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px 24px; background: var(--box); border-radius: var(--r); border-top: 4px solid var(--store-primary); }
.rcard-q { color: var(--primary-text); }
.rcard-q .icon { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.rcard-text { color: var(--store-text); }
.rcard-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--soft); width: 100%; }
.rcard-foot > span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.rcard-foot small { color: var(--muted); font-size: 13px; }
.rcard .rv-ava { width: 38px; height: 38px; font-size: 16px; }
body[data-show-reviews="false"] .reviews-band { display: none; }

/* ---------------- مقالات المدوّنة بجانب عرض اليوم: ثلاث بطاقاتٍ أفقيّة تملأ العمود */
.duo-col.posts { display: flex; flex-direction: column; }
.post-list { flex: 1; display: grid; grid-template-rows: repeat(3, 1fr); gap: 16px; }
.pcard.pcard-row { flex-direction: row; }
.pcard-row .pcard-img { width: 40%; flex: none; }
.pcard-row .pcard-img img { height: 100%; aspect-ratio: auto; min-height: 150px; }
.pcard-row .pcard-body { text-align: start; padding: 14px 18px; justify-content: center; }
.pcard-row .pcard-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-row .pcard-meta { margin-top: 4px; }

/* ---------------- فسيفساء البانرات */
.mosaic { display: grid; grid-template-columns: 1.45fr 1fr; grid-template-rows: repeat(5, 104px); gap: var(--gap); }
.mbanner { position: relative; display: block; overflow: hidden; border-radius: var(--r); background: var(--store-accent); }
.mbanner:nth-child(1) { grid-column: 1; grid-row: 1 / 4; }
.mbanner:nth-child(2) { grid-column: 2; grid-row: 1 / 3; }
.mbanner:nth-child(3) { grid-column: 2; grid-row: 3 / 6; }
.mbanner:nth-child(4) { grid-column: 1; grid-row: 4 / 6; }
.mbanner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mbanner:hover img { transform: scale(1.04); }
.mb-copy { position: absolute; inset-inline-start: 24px; bottom: 24px; max-width: 70%; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.mbanner:nth-child(2) .mb-copy { bottom: auto; top: 22px; }
.mb-title { padding: 6px 16px; background: var(--store-accent); color: var(--on-accent); font-family: var(--f-head); font-weight: 800; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.3; }
.mb-text { padding: 4px 16px 6px; background: color-mix(in srgb, var(--store-accent) 88%, transparent); color: var(--on-accent); font-size: 14px; }
.mb-btn { margin-top: 10px; padding: 6px 16px; background: var(--store-primary); color: var(--on-primary); font-family: var(--f-head); font-weight: 700; font-size: 14px; border-radius: var(--r-sm); }
.mbanner:hover .mb-btn { background: var(--store-primary-dark); }

/* ---------------- عرض اليوم ومن المدوّنة */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.duo-col { min-width: 0; }
.deals .sec-title { color: var(--primary-text); }
.countdown { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -8px 0 16px; }
.cd-label { font-family: var(--f-head); font-weight: 700; font-size: 14px; margin-inline-end: 6px; }
.cd-box { display: inline-flex; flex-direction: column; align-items: center; min-width: 50px; padding: 3px 4px; background: var(--box); border-radius: var(--r-sm); line-height: 1.2; }
.cd-box b { font-family: var(--f-head); font-weight: 800; font-size: 18px; color: var(--primary-text); }
.cd-box small { font-size: 11px; color: var(--muted); }

/* بطاقة المقال */
.pcard { display: flex; flex-direction: column; background: var(--box); border-radius: var(--r); overflow: hidden; }
.pcard-img { position: relative; display: block; overflow: hidden; }
.pcard-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s; }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-tag { position: absolute; top: 10px; inset-inline-start: 10px; padding: 0 8px; background: var(--store-primary); color: var(--on-primary); font-size: 12px; font-weight: 700; line-height: 24px; border-radius: var(--r-sm); }
.pcard-tag-static { position: static; display: inline-block; }
.pcard-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; text-align: center; }
.pcard h3 { font-size: 16px; font-weight: 800; }
.pcard h3 a:hover { color: var(--primary-text); }
.pcard-text { color: var(--muted); font-size: 14px; line-height: 1.7; }
.pcard-meta { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--soft); }
.pcard-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.read-more { display: inline-flex; align-items: center; gap: 2px; color: var(--primary-text); font-weight: 700; }

/* ---------------- المؤلّفون */
.acard { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 14px 16px; background: var(--box); border-radius: var(--r); transition: box-shadow .2s; }
.acard:hover { box-shadow: var(--shadow); }
.acard img { width: 100%; aspect-ratio: 1; object-fit: cover; margin-bottom: 10px; filter: grayscale(.2); border-radius: var(--r-sm); }
.acard b { font-family: var(--f-head); font-weight: 800; font-size: 15px; line-height: 1.4; }
.acard small { color: var(--muted); font-size: 13px; }

/* ---------------- النشرة */
.newsletter { padding: 10px 0 44px; }
.nl-in { display: grid; grid-template-columns: auto 1fr 1.2fr; gap: 24px; align-items: center; background: var(--box); padding: 26px 28px; border-radius: var(--r); max-width: var(--wrap); }
.nl-ico { width: 60px; height: 60px; display: grid; place-items: center; background: var(--store-primary); color: var(--on-primary); border-radius: var(--r-sm); }
.nl-ico .icon { width: 30px; height: 30px; }
.nl-copy h2 { font-size: 22px; font-weight: 800; }
.nl-copy p { color: var(--muted); font-size: 14px; }
.nl-field { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-offer { flex-basis: 100%; font-size: 13px; font-weight: 700; color: var(--primary-text); }
body[data-show-newsletter="false"] .newsletter { display: none; }

/* ---------------- التذييل */
.site-footer { background: var(--box); border-top: 1px solid var(--line); }
.foot-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 30px; padding-block: 44px 34px; }
.foot-col h3 { font-size: 15px; font-weight: 800; margin-bottom: 14px; padding-bottom: 8px; position: relative; }
.foot-col h3::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 30px; height: 2px; background: var(--store-primary); }
.foot-col li { margin-bottom: 6px; }
.foot-col li a, .foot-contact p { color: var(--muted); font-size: 14px; }
.foot-col li a:hover, .foot-contact a:hover { color: var(--primary-text); }
.foot-contact p { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-direction: row-reverse; justify-content: flex-end; }
.foot-contact p .icon { color: var(--primary-text); }
.foot-social { display: flex; gap: 8px; margin-top: 12px; }
.foot-social a { width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid var(--store-primary); color: var(--primary-text); border-radius: 50%; transition: background .2s, color .2s; }
.foot-social a:hover { background: var(--store-primary); color: var(--on-primary); }
.foot-social .icon { width: 17px; height: 17px; }
.foot-bottom { background: var(--store-bg); border-top: 1px solid var(--line); }
.foot-bottom-in { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 18px; }
.foot-legal { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.pay { display: flex; gap: 8px; }
.pay span { display: grid; place-items: center; width: 44px; height: 30px; background: var(--box); border: 1px solid var(--line); color: var(--store-text); border-radius: 4px; }
.pay .icon { width: 20px; height: 20px; }
.foot-banner { position: relative; display: block; width: min(560px, 100%); flex: none; overflow: hidden; border-radius: var(--r-sm); }
.foot-banner img { width: 100%; aspect-ratio: 820 / 100; object-fit: cover; }
.fb-text { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 16px; display: flex; flex-direction: column; line-height: 1.3; color: var(--store-text); }
.fb-text b { font-family: var(--f-head); font-weight: 800; font-size: 17px; }
.fb-text small { font-size: 12px; color: var(--primary-text); font-weight: 700; }
.fb-btn { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 16px; padding: 3px 12px; border: 2px solid #fff; color: #fff; font-family: var(--f-head); font-weight: 700; font-size: 13px; }

/* ---------------- رأس الصفحات الداخليّة */
.page-band { background: var(--box); border-bottom: 1px solid var(--line); padding: 18px 0 24px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a:hover { color: var(--primary-text); }
.crumbs [aria-current] { color: var(--store-text); font-weight: 700; }
.section-top > .container > .crumbs { margin-bottom: 14px; }
.page-title { font-size: clamp(26px, 3vw, 36px); font-weight: 800; }
.page-count { font-family: var(--f-body); font-size: 15px; font-weight: 500; color: var(--muted); }
.page-sub { color: var(--muted); margin-top: 4px; }

/* ---------------- التصنيف */
.listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.filters { background: var(--box); border-radius: var(--r); padding: 6px 18px 18px; position: sticky; top: 96px; }
.filters-head { display: none; }
.f-box { padding: 14px 0; border-bottom: 1px solid var(--soft); }
.f-box h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.chk { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.chk input { width: 17px; height: 17px; accent-color: var(--store-primary); margin: 0; }
.chk .type-dot { width: 22px; height: 22px; }
.chk .type-dot .icon { width: 13px; height: 13px; }
.f-links { display: flex; flex-direction: column; }
.f-links a { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.f-links a:hover { color: var(--primary-text); }
.f-links small { color: var(--muted); }
.price-range { display: flex; gap: 8px; }
.price-range label { flex: 1; display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.price-range input { min-height: 40px; width: 100%; }
.filters > .btn { margin-top: 16px; display: none; }
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--box); padding: 10px 16px; margin-bottom: var(--gap); border-radius: var(--r); }
.count-text { color: var(--muted); font-size: 14px; }
.count-text b { color: var(--store-text); }
.sort { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select { min-height: 40px; padding: 0 12px; border: 2px solid var(--line); background: var(--box); color: var(--store-text); border-radius: var(--r-sm); }
.filters-btn { display: none; min-height: 40px; padding: 0 14px; }
.view-switch { display: flex; gap: 4px; }
.view-switch button { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--line); background: var(--box); color: var(--muted); border-radius: var(--r-sm); }
.view-switch button[aria-pressed="true"] { border-color: var(--store-accent); background: var(--store-accent); color: var(--on-accent); }
.view-switch .icon { width: 18px; height: 18px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: calc(var(--gap) * -0.4) 0 var(--gap); }
.active-filters:not(:has(.chip)) { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px 0 12px; background: var(--box); border: 1px solid var(--line); font-size: 14px; font-weight: 700; border-radius: var(--r-sm); }
.chip .icon { width: 15px; height: 15px; color: var(--primary-text); }
.chip:hover { border-color: var(--store-primary); }
.chips-clear { font-size: 14px; font-weight: 700; color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; }
.book-grid.is-list { grid-template-columns: 1fr; }
.is-list .bcard { flex-direction: row; }
.is-list .bcard-media { width: 170px; flex: none; }
.is-list .bcard-body { align-items: flex-start; text-align: start; padding: 18px 22px; }
.is-list .bcard-title { font-size: 18px; }
.is-list .bcard-add { margin-top: 12px; width: auto; padding: 0 18px; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 34px; flex-wrap: wrap; }
.pg { min-width: 42px; height: 42px; display: grid; place-items: center; padding: 0 8px; background: var(--box); border: 1px solid var(--line); font-weight: 700; border-radius: var(--r-sm); }
a.pg:hover { border-color: var(--store-primary); color: var(--primary-text); }
.pg[aria-current] { background: var(--store-primary); border-color: var(--store-primary); color: var(--on-primary); }
.pg.dots { border-color: transparent; background: transparent; }

/* ---------------- صفحة الكتاب */
.pd { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 40px; padding: 30px; }
.pd-gallery { min-width: 0; }
.pd-stage { position: relative; padding: 34px; background: color-mix(in srgb, var(--store-text) 4%, #fff); border-radius: var(--r-sm); }
.pd-main { width: min(320px, 100%); margin-inline: auto; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 14px 30px rgba(20, 22, 30, .22); }
.pd-stage .type-dot { width: 40px; height: 40px; bottom: 14px; inset-inline-end: 14px; }
.pd-stage .type-dot .icon { width: 21px; height: 21px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumb { width: 66px; padding: 4px; border: 2px solid var(--line); background: var(--box); border-radius: var(--r-sm); }
.thumb.is-active { border-color: var(--store-primary); }
.thumb img { aspect-ratio: 2 / 3; object-fit: cover; }
.pd-info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.pd-cat { padding: 0 10px; font-size: 13px; font-weight: 700; line-height: 26px; background: var(--soft); color: var(--store-text); border-radius: var(--r-sm); }
.pd-title { font-size: clamp(26px, 3vw, 38px); font-weight: 800; line-height: 1.25; }
.pd-by { color: var(--muted); }
.pd-by a { color: var(--store-text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--store-primary); text-underline-offset: 4px; }
.pd-rate { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.pd-rate a { color: var(--primary-text); font-weight: 700; }
.pd-price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-block: 1px solid var(--soft); width: 100%; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: #2B6E4F; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.fact { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); }
.fact.f1 { background: color-mix(in srgb, var(--store-primary) 6%, #fff); }
.fact.f2 { background: color-mix(in srgb, var(--store-accent) 8%, #fff); }
.fact.f3 { background: color-mix(in srgb, var(--store-accent) 8%, #fff); }
.fact.f4 { background: color-mix(in srgb, var(--store-primary) 6%, #fff); }
.f-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--store-primary); color: var(--on-primary); border-radius: var(--r-sm); }
.f-ico .icon { width: 20px; height: 20px; }
.fact small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.fact b { font-size: 14px; line-height: 1.4; }
.buy-row { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: stretch; border: 2px solid var(--line); background: var(--box); border-radius: var(--r-sm); height: 50px; }
.qty button { width: 38px; font-size: 20px; font-weight: 700; }
.qty button:hover { color: var(--primary-text); }
.qty input { width: 46px; border: 0; text-align: center; font-weight: 700; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row .btn { min-height: 50px; }
.formats-box { width: 100%; }
.formats-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.formats { display: flex; flex-wrap: wrap; gap: 8px; }
.format-opt { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 14px 6px 10px; border: 2px solid var(--line); background: var(--box); border-radius: var(--r-sm); transition: border-color .2s; }
.format-opt:hover { border-color: var(--store-accent); }
.format-opt.is-current { border-color: var(--store-primary); background: color-mix(in srgb, var(--store-primary) 5%, #fff); }
.format-opt .type-dot { position: static; width: 26px; height: 26px; box-shadow: none; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-opt > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.format-name { font-family: var(--f-head); font-weight: 700; font-size: 14px; }
.format-price { font-size: 13px; color: var(--muted); }
.format-opt.is-current .format-price { color: var(--primary-text); font-weight: 700; }
.pd-service { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-sm); }
.pd-service li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.pd-service li + li { border-inline-start: 1px solid var(--line); }
.pd-service .icon { color: var(--primary-text); margin-top: 1px; }
.pd-service b { display: block; color: var(--store-text); font-size: 14px; }
.pd-service li:has([data-option]:empty) { display: none; }
.sample-bar { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: var(--store-bg); border-radius: var(--r-sm); }
.sb-play { width: 38px; height: 38px; display: grid; place-items: center; background: var(--store-primary); color: var(--on-primary); border-radius: var(--r-sm); }
.sb-play .icon { fill: currentColor; width: 18px; height: 18px; }
.sb-track { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.sb-track span { display: block; height: 100%; background: var(--store-primary); }
.sb-time { font-size: 13px; color: var(--muted); direction: ltr; }

.pd-tabs { margin-top: 24px; padding: 0 30px 30px; }
.ptabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-top: 20px; margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.ptab { padding: 6px 16px 8px; font-family: var(--f-head); font-weight: 700; font-size: 18px; white-space: nowrap; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.ptab:hover { color: var(--primary-text); }
.ptab[aria-selected="true"] { background: var(--store-primary); color: var(--on-primary); }
.prose { max-width: 820px; }
.prose p { margin-bottom: 14px; color: var(--store-text); }
.prose h2 { font-size: 22px; font-weight: 800; margin: 24px 0 8px; }
.prose blockquote { margin: 20px 0; padding: 14px 20px; border-inline-start: 4px solid var(--store-primary); background: var(--store-bg); font-family: var(--f-head); font-weight: 700; font-size: 18px; }
.spec { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 15px; }
.spec th, .spec td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--soft); }
.spec th { width: 40%; color: var(--muted); font-weight: 500; }
.rv-summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--soft); }
.rv-score { display: flex; align-items: baseline; gap: 6px; }
.rv-score b { font-family: var(--f-head); font-size: 40px; font-weight: 800; line-height: 1; }
.rv-score span, .rv-note { color: var(--muted); font-size: 14px; }
.rv-list { display: flex; flex-direction: column; }
.review { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--soft); }
.rv-ava { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--store-accent); color: var(--on-accent); font-family: var(--f-head); font-weight: 800; font-size: 18px; border-radius: var(--r-sm); }
.rv-body { display: flex; flex-direction: column; gap: 4px; }
.rv-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.rv-head time { color: var(--muted); font-size: 13px; }
.rv-form { margin-top: 22px; padding: 20px; background: var(--store-bg); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; border-radius: var(--r-sm); }
.rv-form h3 { font-size: 18px; font-weight: 800; }
.rv-form textarea { width: 100%; padding: 12px 14px; resize: vertical; }
.rv-stars { display: flex; gap: 2px; }
.rv-stars button { color: var(--star-off); }
.rv-stars button .icon { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.rv-stars button[aria-checked="true"], .rv-stars button.on { color: var(--gold); }

/* ---------------- المؤلّف */
.author-head { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 30px; align-items: center; margin-bottom: 34px; }
.author-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); border: 6px solid var(--store-bg); }
.author-count { color: var(--primary-text); font-weight: 700; margin: 4px 0 12px; }
.author-bio { color: var(--muted); max-width: 760px; }
.sec-head-page { margin-top: 10px; }

/* ---------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; }
.cart-box { padding: 22px 26px; }
.cart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 20px; font-weight: 800; }
.cart-cols, .cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 120px 42px; gap: 16px; align-items: center; }
.cart-cols { padding: 12px 0; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--soft); }
.cart-row { grid-template-columns: 80px minmax(0, 1fr) 130px 120px 42px; padding: 16px 0; border-bottom: 1px solid var(--soft); }
.cart-thumb { position: relative; display: block; }
.cart-thumb img { aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 4px 10px rgba(20, 22, 30, .16); }
.cart-thumb .type-dot { width: 24px; height: 24px; bottom: -6px; inset-inline-end: -6px; }
.cart-thumb .type-dot .icon { width: 13px; height: 13px; }
.cart-info h3 { font-size: 16px; font-weight: 800; }
.cart-info h3 a:hover { color: var(--primary-text); }
.cart-info > p:not(.price) { color: var(--muted); font-size: 13px; }
.cart-info .price { font-size: 15px; }
.cart-row .qty { height: 44px; justify-self: start; }
.cart-row .qty button { width: 34px; }
.cart-row .qty input { width: 40px; }
.cart-total { font-family: var(--f-head); font-weight: 800; font-size: 16px; }
.rm { color: var(--muted); }
.cart-empty { text-align: center; padding: 50px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ce-ico { width: 70px; height: 70px; display: grid; place-items: center; background: var(--soft); color: var(--primary-text); border-radius: var(--r-sm); }
.ce-ico .icon { width: 34px; height: 34px; }
.summary { background: var(--store-accent); color: var(--on-accent); padding: 24px; border-radius: var(--r); display: flex; flex-direction: column; gap: 14px; position: sticky; top: 96px; }
.summary h2 { color: var(--on-accent); font-size: 20px; font-weight: 800; }
.coupon { display: flex; gap: 8px; }
.coupon input { border-color: transparent; color: var(--store-text); }
.coupon-chip { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; padding: 2px 4px 2px 12px; background: rgba(255, 255, 255, .14); font-size: 13px; border-radius: var(--r-sm); }
.coupon-chip button { display: grid; place-items: center; width: 24px; height: 24px; color: var(--on-accent); }
.sum-rows { margin: 0; display: flex; flex-direction: column; gap: 8px; padding-block: 8px; border-block: 1px solid rgba(255, 255, 255, .18); }
.sum-rows div { display: flex; justify-content: space-between; }
.sum-rows dt { color: var(--on-accent); }
.sum-rows dd { margin: 0; font-weight: 700; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--f-head); font-size: 18px; font-weight: 800; }
.sum-total b { font-size: 26px; }
.secure { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--on-accent); }
.back-link { text-align: center; text-decoration: underline; text-underline-offset: 4px; font-weight: 700; color: var(--on-accent); }

/* شريط الشحن المجّانيّ */
.ship { padding: 10px 12px; background: color-mix(in srgb, var(--store-primary) 7%, #fff); color: var(--store-text); border-radius: var(--r-sm); font-size: 14px; }
.ship p { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ship p .icon { color: var(--primary-text); }
.ship-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.ship-bar span { display: block; height: 100%; background: var(--store-primary); }
.ship.is-free .ship-bar span { width: 100% !important; }
[data-slot="cart.free_shipping_left"][hidden] { display: none !important; }

/* ---------------- 404 */
.nf { padding: 54px 0 20px; text-align: center; }
.nf .nf-code { font-family: var(--f-head); font-weight: 800; font-size: clamp(110px, 20vw, 220px); line-height: 1; color: var(--primary-text); letter-spacing: 4px; }
.nf-title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; margin-top: 4px; }
.nf p { color: var(--muted); }
.nf-search { display: flex; gap: 8px; max-width: 560px; margin: 22px auto 16px; }
.nf-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------------- المدوّنة */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.post { padding: 30px 36px 20px; }
.post-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.post-title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; margin: 10px 0 20px; }
.post-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 24px; border-radius: var(--r-sm); }

/* ---------------- صفحة المكوّنات */
.kit { padding: 30px 0 40px; }
.kit-h1 { margin-bottom: 4px; }
.kit-block { background: var(--box); border-radius: var(--r); padding: 24px; margin-top: 22px; }
.kit-title { font-size: 19px; font-weight: 800; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--soft); }
.kit-note { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.kit-wrap { align-items: stretch; }
.kit-cards { --cols: 5; }
.kit-tile { width: 220px; background: var(--store-bg); }
.kit-post { width: 300px; }
.kit-ship { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kit-narrow { max-width: 560px; }
.kit-mosaic { grid-template-rows: 260px; grid-template-columns: minmax(0, 520px); }
.kit-mosaic .mbanner:nth-child(1) { grid-row: 1; }
.kit-block .trust-grid .trust-item { border-color: var(--store-bg); }

/* ================================================================
   العروض
   ================================================================ */
@media (max-width: 1199px) {
	.hdr-nav { display: none; }
	.menu-btn { display: inline-grid; }
	.hdr-actions { margin-inline-start: auto; }
	.track-authors { --n: 4; }
	.track-new { --n: 4; }
	.ctile-grid { gap: 14px; }
}

@media (max-width: 1023px) {
	.search-toggle { display: none; }
	.m-search { display: block; }
	body { --cols: 3; }
	.book-grid { --cols: 3 !important; }
	.track { --n: 3; }
	.track-sm, .track-reviews { --n: 2; }
	.track-duo { --n: 3; }
	.duo { grid-template-columns: 1fr; gap: 44px; }
	.post-list { grid-template-rows: none; }
	.grid-fixed > .bcard:nth-child(n+7) { display: none; }
	.trust-item { padding: 12px 14px; gap: 12px; }
	.t-txt span { font-size: 13px; }
	.feature { grid-template-columns: 250px minmax(0, 1fr); gap: 32px; }
	.feature-kicker { inset-inline-start: calc(16px + 250px + 32px); }
	.feature-media { padding: 18px; }
	.feature-media::before { inset: 0 26px 26px 0; }
	.feature-media .type-dot { bottom: 30px; inset-inline-end: 30px; }
	.pd-service { grid-template-columns: 1fr; }
	.pd-service li + li { border-inline-start: 0; border-top: 1px solid var(--line); }
	.nl-in { grid-template-columns: auto 1fr; }
	.nl-field { grid-column: 1 / -1; }
	.foot-cols { grid-template-columns: 1fr 1fr; }
	.foot-bottom-in { flex-direction: column; align-items: stretch; }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 90; width: min(340px, 88vw); overflow-y: auto;
		border-radius: 0; transform: translateX(100%); visibility: hidden; transition: transform .28s, visibility .28s;
	}
	body.filters-open .filters { transform: none; visibility: visible; }
	.filters-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
	.filters-head h2 { font-size: 18px; }
	.filters > .btn { display: flex; }
	.filters-btn { display: inline-flex; }
	.pd { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
	.pd-gallery { max-width: 460px; width: 100%; margin-inline: auto; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.track-posts { --n: 2; }
	.kit-ship { grid-template-columns: 1fr; }
	.kit-cards { --cols: 3 !important; }
}

@media (max-width: 767px) {
	.hide-sm { display: none !important; }
	.svc-in { min-height: 32px; font-size: 12px; }
	.hdr { min-height: 60px; gap: 4px; }
	.brand img { width: 34px; height: 34px; }
	.brand-name { font-size: 19px; }
	.icon-btn { width: 38px; height: 38px; }
	.section { padding-block: 32px; }
	.slides { height: auto; display: grid; }
	.slide { position: relative; grid-area: 1 / 1; inset: auto; }
	.slide img { position: relative; height: 210px; object-position: 28% 50%; }
	.slide-copy { position: relative; top: auto; transform: none; inset: auto; width: auto; margin: 0; border-inline-start: 0; border-top: 4px solid var(--store-primary); padding: 16px 16px 20px; background: var(--box); border-radius: 0; }
	.slide-title { font-size: 26px; }
	.slide-text { font-size: 14px; }
	.hero-dots { top: 105px; inset-inline-end: 12px; }
	.welcome { padding: 30px 0 0; }
	.welcome-title { font-size: 25px; }
	.title-rule { margin: 10px auto 12px; }
	.welcome p { font-size: 15px; }
	.trust { padding-top: 20px; }
	.trust-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 76%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-grid::-webkit-scrollbar, .ctile-grid::-webkit-scrollbar { display: none; }
	.trust-item { scroll-snap-align: start; padding: 10px 12px; border-width: 3px; }
	.t-ico { width: 40px; height: 40px; }
	.t-ico .icon { width: 21px; height: 21px; }
	.trust-item b { font-size: 15px; }
	.ctile-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 36%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.ctile { scroll-snap-align: start; padding: 8px 8px 12px; }
	.ctile-img { margin-bottom: 6px; }
	.ctile b { font-size: 15px; }
	.sh-arrows { display: none; }
	.tool { width: 40px; height: 40px; }
	.grid-fixed > .bcard:nth-child(n+7) { display: flex; }
	.feature-wrap { text-align: center; }
	.rcard { padding: 18px; }
	.feature-band { padding: 34px 0; }
	.feature-kicker { position: static; margin-bottom: 14px; }
	.feature { grid-template-columns: 1fr; gap: 14px; }
	.feature-media { width: 66%; margin-inline: auto; padding: 14px; }
	.feature-media::before { inset: 0 20px 20px 0; }
	.feature-media .type-dot { bottom: 22px; inset-inline-end: 22px; width: 34px; height: 34px; }
	.feature-body { padding-top: 0; align-items: center; text-align: center; }
	.feature-buy { justify-content: center; }
	.pcard-row .pcard-img { width: 36%; }
	.pcard-row .pcard-img img { min-height: 130px; }
	.pcard-row .pcard-body { padding: 10px 12px; gap: 4px; }
	.pcard-row h3 { font-size: 15px; }
	.pcard-row .pcard-text { font-size: 13px; }
	.pcard-row .pcard-meta { font-size: 12px; }
	.is-list .bcard-media { width: 120px; }
	.is-list .bcard-body { padding: 12px 14px; }
	.is-list .bcard-title { font-size: 15px; }
	.view-switch button { width: 38px; height: 38px; }
	.row-tab { font-size: 18px; padding: 3px 14px; }
	body, .book-grid { --gap: 12px; }
	.book-grid { --cols: 2 !important; }
	.bcard-cover { padding: 12px 12px 0; }
	.bcard-media::after { height: 12px; }
	.bcard-body { padding: 10px 8px 10px; }
	.bcard-title { font-size: 14px; }
	.bcard-add span { font-size: 13px; }
	.bcard-add .icon { display: none; }
	.track { --n: 2.2; }
	.track-duo { --n: 1.6; }
	.track-authors { --n: 2.6; }
	.track-posts { --n: 1.2; }
	.track-new, .track-works { --n: 2.2; }
	.track-reviews { --n: 1.15; }
	.track-sm { --n: 1.3; }
	.mosaic { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 190px; gap: 12px; }
	.mbanner:nth-child(n) { grid-column: 1; grid-row: auto; }
	.mb-copy { inset-inline-start: 14px; bottom: 14px; max-width: 86%; }
	.mbanner:nth-child(2) .mb-copy { top: auto; bottom: 14px; }
	.mb-title { font-size: 20px; padding: 4px 12px; }
	.mb-text { padding: 2px 12px 4px; font-size: 13px; }
	.nl-in { grid-template-columns: 1fr; padding: 20px; text-align: center; justify-items: center; }
	.nl-field input { flex-basis: 100%; }
	.nl-field .btn { flex: 1; }
	.foot-cols { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding-block: 32px 24px; }
	.foot-contact { grid-column: 1 / -1; }
	.toolbar { padding: 10px 12px; }
	.count-text { order: 3; flex-basis: 100%; }
	.sort > span { display: none; }
	.pd { padding: 14px; }
	.pd-stage { padding: 20px; }
	.pd-main { width: 62%; }
	.facts { grid-template-columns: 1fr; }
	.buy-row .btn-grow { min-width: 0; }
	.pd-tabs { padding: 0 14px 18px; }
	.ptab { font-size: 15px; padding: 5px 10px 7px; }
	.author-head { grid-template-columns: 1fr; padding: 18px; gap: 16px; text-align: center; justify-items: center; }
	.author-photo { width: 180px; }
	.cart-box { padding: 14px; }
	.cart-cols { display: none; }
	.cart-row { grid-template-columns: 64px minmax(0, 1fr) auto 36px; grid-template-areas: "t i i r" "t q s s"; gap: 8px 12px; }
	.cart-thumb { grid-area: t; align-self: start; }
	.cart-info { grid-area: i; }
	.cart-row .qty { grid-area: q; height: 38px; }
	.cart-total { grid-area: s; justify-self: end; align-self: center; }
	.rm { grid-area: r; width: 36px; height: 36px; }
	.post-grid { grid-template-columns: 1fr; }
	.post { padding: 18px 16px 8px; }
	.nf-search { flex-direction: column; }
	.kit-block { padding: 16px; }
	.kit-cards { --cols: 2 !important; }
	.kit-tile, .kit-post { width: 100%; }
	.kit-mosaic { grid-template-columns: 1fr; grid-auto-rows: 220px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

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