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

:root {
	--store-primary: #2D2878;
	--store-primary-dark: #252069;
	--store-accent: #FFBA0A;
	--store-bg: #F2F3F8;
	--store-text: #202326;

	--surface: #ffffff;
	--muted: #5c616c;
	--line: #e3e5ec;
	--soft: #f2f3f7;
	--sale: #c62828;
	--star: #f5a623;
	--r: 2px;
	--r-sm: 2px;
	--per-row: 5;
	--per-row-c: 5;
	--gap: 18px;
	--shadow: 0 1px 2px rgba(20, 22, 40, .04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 150px; }
body {
	margin: 0;
	font-family: "Tajawal", system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: clip;
}
[hidden] { display: none !important; }
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, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-arrow { width: 16px; height: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: #fff; color: #111; padding: 8px 14px; border-radius: var(--r); }
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
.stack { display: grid; gap: var(--gap); margin-top: var(--gap); }
main { padding-bottom: 36px; }

/* ---------------- الأزرار ---------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 42px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r);
	font-weight: 700; font-size: 14.5px; line-height: 1.2; transition: background .2s, color .2s, border-color .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-accent { background: var(--store-accent); color: var(--store-primary); }
.btn-accent:hover { background: color-mix(in srgb, var(--store-accent) 88%, #000); }
.btn-primary { background: var(--store-primary); color: #fff; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-ghost { background: #fff; color: var(--store-primary); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--store-primary); }
.btn-ghost[aria-pressed="true"] .icon { fill: var(--sale); stroke: var(--sale); }
.btn-block { width: 100%; }
.btn-lg { min-height: 48px; font-size: 15.5px; }

.sq-btn {
	display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
	border: 0; border-radius: var(--r-sm); background: var(--soft); color: var(--store-text); font-weight: 700; font-size: 14px;
	transition: background .2s, color .2s;
}
.sq-btn .icon { width: 16px; height: 16px; }
.sq-btn:hover, .sq-btn[aria-current="page"], .sq-btn[aria-pressed="true"] { background: var(--store-primary); color: #fff; }
.sq-btn:disabled { opacity: .45; cursor: default; background: var(--soft); color: var(--store-text); }
.arrows { display: inline-flex; gap: 8px; }

.round-btn {
	display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
	border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--store-text);
	box-shadow: 0 2px 6px rgba(20, 22, 40, .08); transition: background .2s, color .2s;
}
.round-btn .icon { width: 16px; height: 16px; }
.round-btn:hover { background: var(--store-primary); color: #fff; border-color: var(--store-primary); }
.round-btn[aria-pressed="true"] .icon { fill: var(--sale); stroke: var(--sale); }
.round-btn[aria-pressed="true"]:hover .icon { fill: #fff; stroke: #fff; }

.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; }
.link-btn .icon { width: 17px; height: 17px; }
.link-btn:hover { color: var(--sale); }

/* ---------------- الرأس ---------------- */
/* الرأس ثابتٌ في الأعلى؛ الشريط العلويّ وحده يمضي مع التمرير (يضبط theme.js مقدار top بارتفاعه) */
.site-header { position: sticky; top: -40px; z-index: 50; background: var(--store-primary); }
.topbar { background: var(--store-primary-dark); color: #fff; font-size: 13px; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar-social { display: flex; gap: 12px; }
.topbar-social a { display: inline-flex; opacity: .92; }
.topbar-social .icon { width: 16px; height: 16px; }
.topbar-msg { font-weight: 700; text-align: center; color: var(--store-accent); }
.topbar-msg:empty { display: none; }
.topbar-links { display: flex; gap: 18px; }
.topbar-links a:hover, .topbar-social a:hover { color: var(--store-accent); }

.hd-main { background: var(--store-primary); color: #fff; }
.hd-main-in { display: flex; align-items: center; gap: 22px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 46px; height: 46px; border-radius: 10px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.hd-search { flex: 1; display: flex; min-width: 0; height: 48px; background: #fff; border-radius: var(--r); overflow: hidden; }
.hd-search select { flex: none; width: 150px; border: 0; padding: 0 12px; background: #eceef4; color: #3a3d46; font-size: 14px; border-inline-end: 1px solid var(--line); }
.hd-search input { flex: 1; min-width: 0; border: 0; padding: 0 14px; color: var(--store-text); background: #fff; font-size: 14.5px; }
.hd-search input::placeholder { color: #6b707b; }
.hd-search input:focus, .hd-search select:focus { outline: none; }
.hd-search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-accent) 55%, transparent); }
.hd-search button { flex: none; width: 56px; border: 0; background: var(--store-accent); color: var(--store-primary); display: grid; place-items: center; }
.hd-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.hd-call { display: inline-flex; align-items: center; gap: 10px; margin-inline-end: 10px; }
.hd-call .icon { width: 30px; height: 30px; stroke-width: 1.4; }
.hd-call span { display: grid; line-height: 1.3; }
.hd-call small { font-size: 13px; }
.hd-call b { font-size: 14.5px; font-weight: 700; }
.hd-icon { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: var(--r); background: transparent; color: inherit; }
.hd-icon .icon { width: 25px; height: 25px; stroke-width: 1.5; }
.hd-icon:hover { background: rgba(255, 255, 255, .1); }
.hd-icon .count {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
	background: var(--store-accent); color: var(--store-primary); font-size: 11.5px; font-weight: 800; line-height: 19px; text-align: center;
}
.menu-toggle { display: none; }

.hd-nav { background: var(--store-primary); color: #fff; border-top: 1px solid rgba(255, 255, 255, .1); }
.hd-nav-in { display: flex; align-items: stretch; gap: 26px; min-height: 52px; }
.cat-menu { position: relative; flex: none; width: 232px; }
.cat-btn {
	display: flex; align-items: center; gap: 10px; width: 100%; height: 100%; min-height: 52px; padding: 0 16px; border: 0;
	background: var(--store-accent); color: var(--store-primary); font-weight: 800; font-size: 15px; white-space: nowrap;
}
.cat-drop {
	position: absolute; top: 100%; inset-inline-start: 0; z-index: 30; width: 100%; padding: 8px 0;
	background: #fff; color: var(--store-text); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(20, 22, 40, .12);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.cat-menu:hover .cat-drop, .cat-menu.open .cat-drop { opacity: 1; visibility: visible; transform: none; }
.cat-drop a { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14.5px; }
.cat-drop a:hover { background: var(--soft); color: var(--store-primary); }
.cat-drop .icon { width: 18px; height: 18px; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 28px; flex: 1; }
.nav-links a { position: relative; display: inline-flex; align-items: center; min-height: 52px; font-weight: 500; font-size: 15px; }
.nav-links a::after { content: ""; position: absolute; inset-inline: 0; bottom: 10px; height: 2px; background: var(--store-accent); transform: scaleX(0); transition: transform .2s; }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: none; }
.nav-track { display: inline-flex; align-items: center; gap: 8px; padding-inline-start: 18px; border-inline-start: 1px solid rgba(255, 255, 255, .25); font-weight: 500; margin-block: 12px; }
.nav-track .icon { width: 19px; height: 19px; }

/* الروابط السريعة */
.quick { padding: 12px 0 0; }
.quick-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.quick-row:empty { display: none; }
.quick-link {
	display: grid; place-items: center; min-height: 38px; padding: 4px 10px; background: #fff; border-radius: var(--r-sm);
	font-size: 14px; font-weight: 500; text-align: center; transition: background .2s, color .2s;
}
.quick-link:hover { background: var(--store-primary); color: #fff; }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 30, .5); opacity: 0; visibility: hidden; transition: .25s; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(320px, 86vw); overflow-y: auto;
	background: #fff; transform: translateX(100%); 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; padding: 12px 16px; background: var(--store-primary); color: #fff; }
.drawer-head .brand-name { font-size: 18px; }
.drawer-nav { padding: 8px 0; }
.drawer-nav > li > a { display: block; padding: 11px 18px; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-label { padding: 12px 18px 4px; font-size: 13px; color: var(--muted); font-weight: 700; }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 18px 14px; border-bottom: 1px solid var(--line); }
.drawer-cats a { padding: 5px 12px; background: var(--soft); border-radius: var(--r); font-size: 14px; }
.drawer-phone { display: flex; align-items: center; gap: 10px; margin: 14px 18px; padding: 12px 14px; background: var(--store-accent); color: var(--store-primary); border-radius: var(--r); font-weight: 700; }

/* ---------------- الصناديق والعناوين ---------------- */
.box { background: var(--surface); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); min-width: 0; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.box-head-stack { display: grid; justify-content: start; gap: 6px; }
.box-title { font-size: 19px; font-weight: 700; line-height: 1.35; color: var(--store-text); }
.box-note { color: var(--muted); font-size: 14px; }
.see-all { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.see-all .icon { width: 15px; height: 15px; }
.see-all:hover { color: var(--store-primary); }

/* التبويبات */
.tabs { display: flex; gap: 22px; flex-wrap: wrap; }
.tabs button {
	position: relative; padding: 4px 0 8px; border: 0; background: none; color: var(--muted); font-size: 15px; font-weight: 500;
}
.tabs button::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--store-accent); transform: scaleX(0); transition: transform .2s; }
.tabs button[aria-selected="true"] { color: var(--store-text); font-weight: 700; }
.tabs button[aria-selected="true"]::after { transform: none; }

/* ---------------- السعر والتقييم ودائرة النوع ---------------- */
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-weight: 700; color: var(--store-text); }
.price .now { font-size: 15.5px; }
.price del { color: #6b707b; font-weight: 500; font-size: 13.5px; }
.price-lg .now { font-size: 19px; }
.price-xl .now { font-size: 26px; font-weight: 800; }
.price-xl del { font-size: 16px; }
.stars { display: inline-flex; gap: 1px; color: var(--star); vertical-align: middle; }
.stars .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.stars .off { color: #d5d8e0; }

.type-dot {
	position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2; display: inline-grid; place-items: center;
	width: 28px; height: 28px; border-radius: 50%; color: #fff; box-shadow: 0 0 0 2px #fff;
}
.type-dot .icon { width: 15px; height: 15px; stroke-width: 1.9; }
.type-dot[data-type="print"] { background: #DB7056; }
.type-dot[data-type="ebook"] { background: #5675A3; }
.type-dot[data-type="audio"] { background: #986AB0; }
.type-dot[data-type="educational"] { background: #3f8f6b; }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 800; line-height: 1.5; }
.badge-sale { background: var(--sale); color: #fff; }
.badge-new { background: var(--store-primary); color: #fff; }

/* ---------------- بطاقة الكتاب الكثيفة ---------------- */
.dgrid-wrap { overflow: hidden; }
.dgrid {
	display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr));
	margin-inline-end: -1px; margin-bottom: -1px;
}
.dgrid-c { grid-template-columns: repeat(var(--per-row-c), minmax(0, 1fr)); }
.pcard {
	position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0;
	padding: 12px 14px 16px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff;
}
.pcard-cat { font-size: 13px; color: var(--muted); }
.pcard-title { font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--store-primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title a:hover { text-decoration: underline; }
.pcard-author { font-size: 13px; color: var(--muted); }
.pcard-media { position: relative; margin: 8px 0 22px; }
.pcard-media > a { display: block; padding: 0 10%; }
.pcard-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: 0 6px 14px rgba(20, 22, 40, .14); transition: transform .3s; }
.pcard:hover .pcard-media img { transform: translateY(-3px); }
.pcard-media .type-dot { inset-inline-start: calc(10% - 6px); top: -6px; }
.pcard-media .badge { position: absolute; top: 0; inset-inline-end: 0; z-index: 2; }
.pcard-acts { position: absolute; bottom: -17px; inset-inline: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.stock-band { position: absolute; inset-inline: 10%; bottom: 30%; z-index: 2; padding: 4px 0; background: rgba(20, 22, 40, .86); color: #fff; font-size: 13px; font-weight: 700; text-align: center; }
.pcard.is-out .pcard-media img { filter: grayscale(.7); opacity: .8; }
.pcard .price { margin-top: auto; padding-top: 6px; flex-direction: column; align-items: flex-start; gap: 0; }
.pcard-rate { display: flex; align-items: center; gap: 6px; }
.pcard-rate .count { font-size: 12.5px; color: var(--muted); }

/* خيار «بطاقات منفصلة» */
[data-card-style="boxed"] .dgrid-wrap { overflow: visible; }
[data-card-style="boxed"] .dgrid { gap: 14px; margin: 0; }
[data-card-style="boxed"] .pcard { border: 1px solid var(--line); border-radius: var(--r); }
[data-card-style="boxed"] .pcard:hover { border-color: color-mix(in srgb, var(--store-primary) 40%, var(--line)); box-shadow: 0 8px 20px rgba(20, 22, 40, .07); }

[data-books-per-row="4"] { --per-row: 4; --per-row-c: 4; }
[data-books-per-row="5"] { --per-row: 5; --per-row-c: 5; }
[data-books-per-row="6"] { --per-row: 6; --per-row-c: 5; }

[data-corners="rounded"] { --r: 10px; --r-sm: 7px; }
[data-corners="rounded"] .pcard-media img, [data-corners="rounded"] .hcard-cover img { border-radius: 5px; }

/* البطاقة الأفقيّة */
.hcard { display: flex; gap: 14px; align-items: center; min-width: 0; }
.hcard-cover { position: relative; flex: none; width: 72px; }
.hcard-cover img { width: 72px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: 0 4px 10px rgba(20, 22, 40, .14); }
.hcard-cover .type-dot { width: 22px; height: 22px; top: -6px; inset-inline-start: -6px; }
.hcard-cover .type-dot .icon { width: 12px; height: 12px; }
.hcard-body { display: grid; gap: 2px; min-width: 0; }
.hcard-title { font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--store-primary); }
.hcard-title a:hover { text-decoration: underline; }
.hlist { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.hlist > .hcard { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hlist > .hcard:nth-child(odd) { padding-inline-end: 28px; border-inline-end: 1px solid var(--line); margin-inline-end: -28px; }
.vlist { display: grid; }
.vlist > .hcard { padding: 12px 0; border-bottom: 1px solid var(--line); }
.vlist > .hcard:last-child { border-bottom: 0; }
.hcard-sm .hcard-cover, .hcard-sm .hcard-cover img { width: 58px; }
.hcard-sm .hcard-title { font-size: 14px; }

/* ---------------- الواجهة الفسيفسائيّة ---------------- */
.mosaic-wrap { padding-top: 18px; }
.mosaic { display: grid; grid-template-columns: 210px minmax(0, 1fr) minmax(0, 2.08fr); gap: 18px; align-items: stretch; }
.mosaic-main { display: grid; gap: 18px; align-content: start; min-width: 0; }
.side-menu { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 0; align-self: stretch; }
.side-menu a { display: flex; align-items: center; gap: 10px; padding: 7px 16px; font-size: 14.5px; }
.side-menu a:hover { color: var(--store-primary); background: var(--soft); }
.side-menu .icon { width: 19px; height: 19px; color: #3d414b; }
.side-menu span { flex: 1; }
.side-menu em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-sm); background: #fde8e8; color: #a61b1b; }
.side-top { padding-bottom: 8px; margin: 0 16px 6px; border-bottom: 1px solid var(--line); }
.side-top a { padding-inline: 0; }
.side-cats a { padding-block: 9px; }
.side-cats .chev { width: 15px; height: 15px; color: var(--muted); }

.bnr { position: relative; display: block; overflow: hidden; border-radius: var(--r); background: #1c1a4f; isolation: isolate; min-width: 0; }
.bnr > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .5s; }
.bnr:hover > img { transform: scale(1.04); }
.bnr-copy { position: relative; display: grid; justify-items: start; gap: 4px; padding: 22px 22px 26px; max-width: 92%; }
.bnr-kicker { font-size: 13.5px; font-weight: 700; }
.bnr-title { font-size: 22px; font-weight: 800; line-height: 1.3; }
.bnr-text { font-size: 14px; line-height: 1.55; }
.bnr-dark { color: #fff; }
.bnr-dark .bnr-kicker { color: var(--store-accent); }
.bnr-dark .bnr-text { color: rgba(255, 255, 255, .92); }
.bnr-light { color: #1b1c2b; background: #f3efe2; }
.bnr-light .bnr-kicker { color: var(--store-primary); }
.bnr-light .bnr-text { color: #34363f; }
.bnr-btn {
	display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 14px; border-radius: var(--r-sm);
	font-size: 13.5px; font-weight: 700;
}
.bnr-btn-accent { background: var(--store-accent); color: var(--store-primary); }
.bnr-btn-sale { background: var(--sale); color: #fff; }
.price-chip { display: inline-block; margin-top: 4px; padding: 3px 10px; background: var(--sale); color: #fff; font-weight: 800; font-size: 16px; border-radius: var(--r-sm); }

.bnr-tall { min-height: 420px; }
.bnr-tall .bnr-title { font-size: 28px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; min-width: 0; }
.hero-pair .bnr { aspect-ratio: 630 / 560; }
.pair-col { grid-template-columns: 1fr; }
.pair-col .bnr { aspect-ratio: 390 / 610; }
.bnr-side { aspect-ratio: 390 / 760; }
.pair-wide .bnr { aspect-ratio: 1200 / 360; }
.pair-wide .bnr-copy { max-width: 60%; }

/* السلايدر */
.hero { position: relative; overflow: hidden; border-radius: var(--r); background: #121a46; aspect-ratio: 1300 / 520; color: #fff; }
.hero .slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; isolation: isolate; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.slide-copy { position: absolute; inset-block: 0; inset-inline-start: 0; width: 58%; display: grid; align-content: center; justify-items: start; gap: 6px; padding: 24px 30px 50px; }
.slide-copy .bnr-kicker { color: var(--store-accent); }
.slide-title { font-size: 28px; font-weight: 800; line-height: 1.25; }
.slide-title em { font-style: normal; color: var(--store-accent); display: block; }
.slide-copy p { font-size: 14.5px; color: rgba(255, 255, 255, .92); max-width: 36ch; }
.slider-ctrl { position: absolute; bottom: 14px; inset-inline-start: 30px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.slider-ctrl .sq-btn { background: rgba(255, 255, 255, .92); color: #1b1c2b; }
.slider-ctrl .sq-btn:hover { background: var(--store-accent); color: var(--store-primary); }
.slider-dots { display: inline-flex; gap: 5px; }
.slider-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.slider-dots i.on { width: 20px; border-radius: 4px; background: var(--store-accent); }

/* شريط الثقة */
.trust-wrap { margin-top: 18px; }
.trust-bar { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.trust-bar li { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-inline-end: 1px solid var(--line); }
.trust-bar li:last-child { border-inline-end: 0; }
.trust-ic { width: 34px; height: 34px; color: var(--store-primary); stroke-width: 1.4; }
.trust-bar span { display: grid; line-height: 1.4; }
.trust-bar b { font-size: 15px; }
.trust-bar small { font-size: 13px; color: var(--muted); }

/* ---------------- المنطقة الثلاثيّة ---------------- */
.triad { display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; grid-template-areas: "r m l"; gap: var(--gap); margin-top: var(--gap); align-items: start; }
.triad-r { grid-area: r; }
.triad-main { grid-area: m; display: grid; gap: var(--gap); min-width: 0; }
.triad-l { grid-area: l; }
.triad-side { display: grid; gap: var(--gap); min-width: 0; }
.triad .box { padding: 18px 20px; }
.triad-side .box { padding: 16px; }
.triad-side .box-title { font-size: 17px; }

.deal-items { position: relative; }
.deal-item { display: none; text-align: center; }
.deal-item.is-active { display: grid; gap: 6px; justify-items: center; }
.deal-media { position: relative; width: 74%; margin: 4px auto 6px; }
.deal-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 10px 22px rgba(20, 22, 40, .18); border-radius: 2px; }
.deal-media .type-dot { top: -8px; inset-inline-start: -8px; }
.deal-media .badge { position: absolute; top: 8px; inset-inline-end: -8px; }
.deal-rate { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.deal-title { font-size: 15.5px; font-weight: 700; color: var(--store-primary); line-height: 1.4; }
.deal-author { font-size: 13.5px; color: var(--muted); }
.deal .price { justify-content: center; }
.deal .btn { margin-top: 6px; min-height: 40px; font-size: 14px; }

/* بطاقة التصنيف الباستيليّة */
.track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 14px) / 6); gap: 14px; 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; min-width: 0; }
.ccard { display: grid; gap: 8px; justify-items: center; text-align: center; }
.ccard-img { display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: #f3f0e6; border-radius: var(--r-sm); }
.ccard:nth-child(8n+2) .ccard-img { background: #f6e9e9; }
.ccard:nth-child(8n+3) .ccard-img { background: #ebebf6; }
.ccard:nth-child(8n+4) .ccard-img { background: #e6f1f3; }
.ccard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.ccard:hover .ccard-img img { transform: scale(1.06); }
.ccard-name { font-size: 14.5px; font-weight: 500; }
.ccard small { font-size: 12.5px; color: var(--muted); margin-top: -6px; }

/* مجموعاتٌ رائجة */
.promo-track { grid-auto-columns: calc((100% - 3 * 18px) / 4); gap: 18px; }
.promo { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--r); isolation: isolate; background: #1c1a4f; }
.promo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .5s; }
.promo:hover > img { transform: scale(1.04); }
.promo-copy { position: absolute; inset-inline: 0; bottom: 0; display: grid; justify-items: start; gap: 2px; padding: 16px 18px 18px; }
.promo.bnr-dark .promo-copy { background: linear-gradient(to top, rgba(12, 12, 40, .9), rgba(12, 12, 40, .7) 72%, rgba(12, 12, 40, 0)); padding-top: 34px; }
.promo.bnr-light .promo-copy { background: linear-gradient(to top, rgba(255, 255, 255, .95), rgba(255, 255, 255, .85) 72%, rgba(255, 255, 255, 0)); padding-top: 34px; }
.promo-copy b { font-size: 18px; font-weight: 800; line-height: 1.3; }
.promo-copy > span:not(.bnr-btn) { font-size: 13.5px; }
.promo.bnr-light .promo-copy > span:not(.bnr-btn) { color: #34363f; }

/* اكتشف */
.disc-track { grid-auto-columns: calc((100% - 6 * 14px) / 7); }
.disc { display: grid; }
.disc-media { position: relative; display: block; padding: 16px 18px 26px; background: var(--soft); border-radius: var(--r-sm); }
.disc-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 6px 14px rgba(20, 22, 40, .16); }
.disc-media .type-dot { top: 8px; inset-inline-start: 8px; width: 24px; height: 24px; }
.disc-media .type-dot .icon { width: 13px; height: 13px; }
.disc-name { position: relative; margin: -18px 8px 0; padding: 6px 8px; background: #fff; border-radius: var(--r-sm) var(--r-sm) 0 0; font-size: 14.5px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* الوسوم */
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { padding: 8px 18px; background: var(--soft); border-radius: var(--r-sm); font-size: 14px; color: #3a3d46; transition: background .2s, color .2s; }
.tag:hover { background: var(--store-primary); color: #fff; }

/* المؤلّفون */
.author-track { grid-auto-columns: calc((100% - 5 * 14px) / 6); }
.acard { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; border: 1px solid var(--line); border-radius: var(--r); text-align: center; transition: border-color .2s; }
.acard:hover { border-color: var(--store-primary); }
.acard img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; }
.acard b { font-size: 15px; color: var(--store-primary); }
.acard small { font-size: 13px; color: var(--muted); }

/* شاهدتَه مؤخّرًا */
.rrow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.rtile { display: grid; gap: 4px; align-content: start; padding: 4px 14px 6px; border-inline-end: 1px solid var(--line); }
.rtile:last-child { border-inline-end: 0; }
.rtile-cover { position: relative; display: block; width: 62%; margin: 6px auto 8px; }
.rtile-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 4px 10px rgba(20, 22, 40, .14); }
.rtile-cover .type-dot { width: 22px; height: 22px; top: -6px; inset-inline-start: -8px; }
.rtile-cover .type-dot .icon { width: 12px; height: 12px; }
.rtile-title { font-size: 14px; font-weight: 700; color: var(--store-primary); line-height: 1.4; }
.rtile .price .now { font-size: 14px; }

/* ---------------- النشرة والتذييل ---------------- */
.news-wrap { padding: 8px 0 36px; }
.news {
	display: grid; grid-template-columns: 1.1fr 1fr 1.25fr; align-items: center; gap: 28px;
	padding: 26px 40px; background: var(--store-primary); color: #fff; border-radius: var(--r);
}
.news h2 { font-size: 22px; font-weight: 700; }
.news-a p, .news-b span { color: rgba(255, 255, 255, .9); font-size: 14.5px; }
.news-b { display: flex; align-items: center; gap: 14px; padding-inline-start: 28px; border-inline-start: 1px solid rgba(255, 255, 255, .25); }
.news-ic { width: 38px; height: 38px; stroke-width: 1.4; color: var(--store-accent); }
.news-b p { display: grid; }
.news-b b { font-size: 17px; }
.news-field { display: flex; height: 50px; background: #fff; border-radius: var(--r); overflow: hidden; }
.news-field input { flex: 1; min-width: 0; border: 0; padding: 0 16px; color: var(--store-text); }
.news-field input::placeholder { color: #6b707b; }
.news-field input:focus { outline: none; }
.news-field button { flex: none; border: 0; padding: 0 24px; background: var(--store-accent); color: var(--store-primary); font-weight: 800; }

.site-footer { background: #fff; color: var(--store-text); }
.foot-cols { display: grid; grid-template-columns: 1.35fr .8fr .8fr .8fr 1.3fr; gap: 30px; padding-block: 40px 30px; }
.site-footer h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.site-footer ul:not(.contact):not(.foot-perks) li { margin-bottom: 8px; }
.site-footer ul a { color: #3a3d46; font-size: 14.5px; }
.site-footer ul a:hover { color: var(--store-primary); }
.foot-phone { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--store-primary); margin-bottom: 10px; }
.foot-phone .icon { width: 26px; height: 26px; }
.contact li { display: flex; gap: 10px; margin-bottom: 10px; font-size: 14.5px; color: #3a3d46; }
.contact .icon { width: 19px; height: 19px; margin-top: 2px; color: var(--muted); }
.social { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 14.5px; color: #3a3d46; }
.social-links { display: inline-flex; gap: 6px; }
.social-links a { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); color: var(--store-text); }
.social-links a:hover { background: var(--store-primary); color: #fff; }
.social-links .icon { width: 16px; height: 16px; }
.foot-about .brand { color: var(--store-primary); margin-bottom: 10px; }
.foot-about .brand-name { font-size: 20px; }
.foot-about p { font-size: 14.5px; color: #3a3d46; }
.foot-perks { display: grid; gap: 8px; margin-top: 14px; }
.foot-perks li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #3a3d46; }
.foot-perks .icon { width: 18px; height: 18px; color: var(--store-primary); }
.foot-bottom { border-top: 1px solid var(--line); }
.foot-bottom-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 56px; font-size: 14px; color: #3a3d46; }
.foot-links { display: flex; gap: 18px; }
.foot-links a:hover { color: var(--store-primary); }

/* ---------------- رأس الصفحات الداخليّة ---------------- */
.page-head { background: #fff; border-bottom: 1px solid var(--line); margin-top: 12px; }
.page-head-in { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding-block: 18px; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-sub { flex-basis: 100%; order: 3; color: var(--muted); font-size: 14.5px; margin-top: -6px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: #9a9ea8; }
.crumbs a:hover { color: var(--store-primary); }
.crumbs [aria-current] { color: var(--store-text); font-weight: 500; }
.container > nav > .crumbs { padding-block: 16px 0; }

/* ---------------- صفحة التصنيف ---------------- */
.cat-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--gap); margin-top: var(--gap); align-items: start; }
.cat-main { display: grid; gap: var(--gap); min-width: 0; }
.filters { display: grid; gap: 14px; position: sticky; top: 152px; }
.filters-head { display: none; }
.fbox { background: #fff; border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.fbox h3 { font-size: 16px; font-weight: 700; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; }
.checks input { width: 16px; height: 16px; accent-color: var(--store-primary); margin: 0; }
.checks small { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.checks .type-dot { position: static; width: 22px; height: 22px; box-shadow: none; }
.checks .type-dot .icon { width: 12px; height: 12px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price-range label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.price-range input, .field { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--store-text); }
.range-bar { position: relative; height: 4px; margin-top: 14px; border-radius: 2px; background: var(--line); }
.range-bar span { position: absolute; inset-inline: 10% 30%; inset-block: 0; background: var(--store-primary); border-radius: 2px; }
.listing { padding: 18px 20px 22px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.toolbar-count { color: var(--muted); font-size: 14.5px; }
.toolbar-count b { color: var(--store-text); }
.toolbar-end { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--store-text); }
.cols-switch { display: flex; gap: 6px; }
.filter-toggle { display: none; min-height: 38px; }
.dgrid-list { grid-template-columns: repeat(var(--cols, var(--per-row-c)), minmax(0, 1fr)); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 22px; }
.pagination .dots { color: var(--muted); }

/* ---------------- صفحة الكتاب ---------------- */
.pdp { display: grid; grid-template-columns: 340px minmax(0, 1fr) 300px; gap: var(--gap); margin-top: 14px; align-items: start; }
.pdp-gallery { display: grid; gap: 12px; padding: 22px; }
.g-main { position: relative; padding: 18px 30px; background: var(--soft); border-radius: var(--r-sm); }
.g-main img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 14px 30px rgba(20, 22, 40, .2); }
.g-main .type-dot { width: 34px; height: 34px; top: 10px; inset-inline-start: 10px; }
.g-main .type-dot .icon { width: 18px; height: 18px; }
.g-main .badge { position: absolute; top: 12px; inset-inline-end: 12px; }
.g-thumbs { display: flex; gap: 10px; justify-content: center; }
.g-thumbs button { width: 62px; padding: 5px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.g-thumbs button[aria-pressed="true"] { border-color: var(--store-primary); box-shadow: 0 0 0 1px var(--store-primary); }
.g-thumbs img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.pdp-info { display: grid; gap: 10px; padding: 24px 26px; }
.pdp-type { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.pdp-type .type-dot { position: static; width: 26px; height: 26px; box-shadow: none; }
.pdp-type .type-dot .icon { width: 14px; height: 14px; }
.pdp-type .sep { width: 4px; height: 4px; border-radius: 50%; background: #b8bcc6; }
.pdp-type a { color: var(--store-primary); font-weight: 500; }
.pdp-info h1 { font-size: 28px; font-weight: 800; line-height: 1.3; color: var(--store-primary); }
.pdp-author { color: var(--muted); }
.pdp-author a { color: var(--store-text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pdp-rate { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.pdp-rate .stars .icon { width: 16px; height: 16px; }
.pdp-rate a { color: var(--muted); text-decoration: underline; }
.pdp-lead { color: #3a3d46; }
.spec { width: 100%; font-size: 14.5px; border-top: 1px solid var(--line); }
.spec th, .spec td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.spec th { width: 38%; color: var(--muted); font-weight: 500; }
.spec td { font-weight: 500; }
.pdp-jump { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }
.pdp-jump a { color: var(--store-primary); border-bottom: 2px solid var(--store-accent); padding-bottom: 2px; }
.buy-box { position: sticky; top: 152px; display: grid; gap: 10px; padding: 22px; }
.stock { display: flex; align-items: center; gap: 6px; color: #1e6b3c; font-weight: 700; font-size: 14.5px; }
.stock .icon { width: 18px; height: 18px; }
.buy-perks { display: grid; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.buy-perks li { display: flex; gap: 10px; }
.buy-perks .icon { width: 24px; height: 24px; color: var(--store-primary); stroke-width: 1.5; }
.buy-perks span { display: grid; line-height: 1.4; }
.buy-perks b { font-size: 14px; }
.buy-perks small { font-size: 13px; color: var(--muted); }
.sample-strip { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--soft); border-inline-start: 3px solid var(--store-accent); }
.sample-strip p { display: grid; flex: 1; line-height: 1.45; }
.sample-strip p span { font-size: 13.5px; color: var(--muted); }
.sample-ic { width: 30px; height: 30px; color: var(--store-primary); }
.sample-strip .btn { min-height: 38px; }
.player .play { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--store-primary); color: #fff; flex: none; }
.player .play .icon { width: 18px; height: 18px; fill: currentColor; }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 30px; }
.wave i { width: 3px; border-radius: 2px; background: color-mix(in srgb, var(--store-primary) 55%, #fff); }
.wave i:nth-child(3n+1) { height: 40%; } .wave i:nth-child(3n+2) { height: 85%; } .wave i:nth-child(3n) { height: 60%; }
.edu-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edu-facts li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--soft); }
.edu-facts .icon { width: 26px; height: 26px; color: #3f8f6b; }
.edu-facts span { display: grid; line-height: 1.35; }
.edu-facts small { font-size: 13px; color: var(--muted); }
.prose { display: grid; gap: 12px; color: #3a3d46; max-width: 80ch; }

.reviews-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 30px; }
.reviews-summary { display: grid; justify-items: start; gap: 4px; align-content: start; }
.reviews-summary strong { font-size: 42px; font-weight: 800; line-height: 1; }
.reviews-summary .stars .icon { width: 18px; height: 18px; }
.reviews-summary small { color: var(--muted); }
.rating-bars { width: 100%; display: grid; gap: 6px; margin-top: 10px; }
.rating-bars li { display: grid; grid-template-columns: 14px 1fr 34px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--star); }
.review-list { display: grid; }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review:first-child { padding-top: 0; }
.review-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-top > div { display: grid; line-height: 1.35; flex: 1; }
.review-top small { color: var(--muted); font-size: 13px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--store-primary); color: #fff; font-weight: 700; }
.review p { color: #3a3d46; }
.review-form { display: grid; gap: 10px; margin-top: 20px; padding: 18px; background: var(--soft); border-radius: var(--r); }
.review-form h3 { font-size: 17px; }
.review-form .note { font-size: 13.5px; color: var(--muted); }
.review-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; resize: vertical; }
.review-form .btn { justify-self: start; }
.star-pick { display: flex; gap: 2px; }
.star-pick button { padding: 2px; border: 0; background: none; color: #c9ccd4; }
.star-pick button[aria-pressed="true"] { color: var(--star); }
.star-pick .icon { width: 24px; height: 24px; fill: currentColor; stroke: none; }

/* ---------------- صفحة المؤلّف ---------------- */
.author-hero { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; padding: 28px 32px; background: var(--store-primary); color: #fff; border-radius: var(--r); }
.author-hero img { width: 180px; height: 180px; object-fit: cover; border-radius: var(--r); border: 4px solid rgba(255, 255, 255, .15); }
.author-info { display: grid; gap: 8px; }
.author-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--store-accent); font-weight: 700; font-size: 14px; }
.author-kicker .icon { width: 17px; height: 17px; }
.author-info h1 { font-size: 30px; font-weight: 800; line-height: 1.25; }
.author-stats { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14.5px; }
.author-stats b { color: var(--store-accent); font-size: 17px; }
.author-bio { color: rgba(255, 255, 255, .92); max-width: 80ch; }

/* ---------------- السلّة ---------------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); margin-top: var(--gap); align-items: start; }
.cart-table { width: 100%; }
.cart-table th { padding: 0 8px 12px; font-size: 14px; color: var(--muted); font-weight: 500; text-align: start; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ci-book { display: flex; align-items: center; gap: 14px; }
.ci-thumb { position: relative; flex: none; width: 64px; }
.ci-thumb img { width: 64px; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 4px 10px rgba(20, 22, 40, .14); }
.ci-book > div { display: grid; gap: 2px; }
.ci-title { font-weight: 700; color: var(--store-primary); }
.ci-author { font-size: 13.5px; color: var(--muted); }
.ci-type { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ci-type .type-dot { position: static; width: 20px; height: 20px; box-shadow: none; }
.ci-type .type-dot .icon { width: 11px; height: 11px; }
.ci-price { font-weight: 700; white-space: nowrap; }
.ci-price del { color: #6b707b; font-weight: 500; font-size: 13px; }
.ci-total { font-weight: 800; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.qty button { width: 34px; height: 36px; border: 0; background: var(--soft); font-size: 17px; }
.qty input { width: 44px; height: 36px; border: 0; text-align: center; -moz-appearance: textfield; background: #fff; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cart-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.coupon { display: flex; gap: 8px; }
.coupon input { width: 200px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.coupon-on { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; background: #e7f3ec; color: #1e6b3c; font-size: 13.5px; font-weight: 700; border-radius: var(--r-sm); }
.coupon-on .icon { width: 16px; height: 16px; }
.coupon-on button { display: inline-grid; place-items: center; padding: 2px; border: 0; background: none; color: inherit; }
.cart-empty { display: grid; justify-items: center; gap: 8px; padding: 40px 0; text-align: center; }
.empty-ic { width: 48px; height: 48px; color: var(--muted); }
.summary { position: sticky; top: 152px; display: grid; gap: 14px; }
.summary h2 { font-size: 19px; }
.summary dl { display: grid; gap: 10px; }
.summary dl div { display: flex; justify-content: space-between; font-size: 15px; }
.summary dt { color: var(--muted); }
.summary dd { font-weight: 700; }
.summary .minus { color: #1e6b3c; }
.summary .total { padding-top: 12px; border-top: 1px solid var(--line); font-size: 18px; }
.summary .total dt { color: var(--store-text); font-weight: 700; }
.summary .total dd { font-weight: 800; }
.summary-note { display: flex; gap: 8px; font-size: 13.5px; color: var(--muted); }
.summary-note .icon { width: 18px; height: 18px; color: var(--store-primary); }
.continue { display: inline-flex; align-items: center; gap: 6px; justify-self: center; color: var(--store-primary); font-weight: 700; font-size: 14.5px; }
.continue .icon { width: 16px; height: 16px; }

/* ---------------- 404 ---------------- */
.nf { display: grid; justify-items: center; gap: 12px; padding: 40px 22px 44px; text-align: center; }
.nf-art { width: min(380px, 100%); height: auto; }
.nf-cable { fill: none; stroke: var(--store-primary); stroke-width: 6; stroke-linecap: round; }
.nf-plug { fill: var(--store-primary); }
.nf-pin { stroke: #8a8fa0; stroke-width: 5; stroke-linecap: round; }
.nf-spark { fill: var(--store-accent); }
.nf-socket { fill: #fff; stroke: var(--store-primary); stroke-width: 4; }
.nf-hole { stroke: var(--store-primary); stroke-width: 5; stroke-linecap: round; }
.nf-code { font-size: 64px; font-weight: 800; line-height: 1; color: var(--store-primary); letter-spacing: .04em; }
.nf h1 { font-size: 26px; font-weight: 800; }
.nf > p { color: var(--muted); max-width: 52ch; }
.nf-search { display: flex; gap: 8px; width: min(520px, 100%); margin-top: 6px; }
.nf-search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); }

/* ---------------- صفحة المكوّنات ---------------- */
.kit-note { margin: -8px 0 14px; color: var(--muted); font-size: 14px; }
.kit-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kit-cell { position: relative; display: grid; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kit-cell .pcard { border: 0; }
.kit-label { justify-self: start; margin: 10px 14px 0; padding: 2px 10px; background: var(--soft); font-size: 12.5px; font-weight: 700; border-radius: var(--r-sm); }
.kit-h { max-width: 760px; }
.kit-types { display: flex; gap: 22px; flex-wrap: wrap; }
.kit-types li { display: flex; align-items: center; gap: 8px; }
.kit-types .type-dot { position: static; }
.kit-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.kit-row > .track { width: min(460px, 100%); grid-auto-columns: calc((100% - 2 * 14px) / 3); }
.kit .trust-bar { box-shadow: none; border: 1px solid var(--line); }
.kit-deals { display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); gap: var(--gap); }
.kit-deals .box { border: 1px solid var(--line); box-shadow: none; }
.kit-buy { display: grid; gap: 12px; max-width: 320px; }
.kit-side { width: min(240px, 100%); }
.kit .home-reviews .qcard { min-width: 0; }

/* ---------------- خيارات الناشر ---------------- */
[data-show-trust-bar="false"] .trust-wrap, [data-show-trust-bar="false"] .kit .trust-bar { display: none; }
[data-show-reviews="false"] .reviews-section, [data-show-reviews="false"] .pdp-jump a[href="#reviews"] { display: none; }
[data-show-newsletter="false"] .news-wrap { display: none; }
[data-show-newsletter="false"] .site-footer { margin-top: 36px; }

/* ---------------- العروض ---------------- */
@media (max-width: 1199px) {
	.mosaic { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
	.side-menu { display: none; }
	.triad { grid-template-columns: 1fr 1fr; grid-template-areas: "m m" "r l"; }
	.triad-side { grid-template-columns: 1fr 1fr; align-items: start; }
	.triad-side > .box { grid-column: 1 / -1; }
	.triad-side > .pair-col { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
	.triad-2 .triad-side { grid-template-columns: 1fr; }
	.pdp { grid-template-columns: 300px minmax(0, 1fr); }
	.buy-box { grid-column: 1 / -1; position: static; grid-template-columns: repeat(2, 1fr); }
	.buy-box .price, .buy-box .stock, .buy-box .buy-perks { grid-column: 1 / -1; }
	.buy-perks { grid-template-columns: repeat(3, 1fr); }
	.foot-cols { grid-template-columns: repeat(3, 1fr); }
	.foot-about { grid-column: span 2; }
	.hd-call { display: none; }
	.nav-links { gap: 20px; }
}

@media (max-width: 991px) {
	.topbar-social, .topbar-links { display: none; }
	.topbar-in { justify-content: center; }
	.hd-main-in { flex-wrap: wrap; gap: 10px 12px; min-height: 0; padding-block: 10px 12px; }
	.menu-toggle { display: inline-grid; }
	.brand { flex: 1; }
	.brand img { width: 40px; height: 40px; }
	.brand-name { font-size: 19px; }
	.hd-search { order: 3; flex-basis: 100%; height: 44px; }
	.hd-search select { width: 118px; }
	.hd-nav { display: none; }
	.quick-row { display: flex; overflow-x: auto; scrollbar-width: none; gap: 10px; }
	.quick-row::-webkit-scrollbar { display: none; }
	.quick-link { flex: none; padding-inline: 16px; }
	.trust-bar { grid-template-columns: 1fr 1fr; }
	.trust-bar li:nth-child(2) { border-inline-end: 0; }
	.trust-bar li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
	.track { grid-auto-columns: calc((100% - 3 * 14px) / 4); }
	.promo-track { grid-auto-columns: calc((100% - 18px) / 2); }
	.disc-track { grid-auto-columns: calc((100% - 3 * 14px) / 4); }
	.author-track { grid-auto-columns: calc((100% - 3 * 14px) / 4); }
	.rrow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
	.rtile:nth-child(3n) { border-inline-end: 0; }
	.dgrid, .dgrid-c { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.news { grid-template-columns: 1fr 1fr; padding: 24px; }
	.news-field { grid-column: 1 / -1; }
	.cat-layout { grid-template-columns: 1fr; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(330px, 88vw); overflow-y: auto;
		align-content: start; padding: 0 14px 18px; background: var(--store-bg); transform: translateX(100%); visibility: hidden; transition: transform .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head { display: flex; align-items: center; justify-content: space-between; margin-inline: -14px; padding: 10px 14px; background: var(--store-primary); color: #fff; }
	.filter-toggle { display: inline-flex; }
	.cols-switch { display: none; }
	.dgrid-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pdp { grid-template-columns: 1fr; }
	.pdp-gallery { grid-template-columns: 1fr; max-width: 420px; justify-self: center; width: 100%; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.reviews-layout { grid-template-columns: 1fr; gap: 18px; }
	.author-hero { grid-template-columns: 130px 1fr; padding: 22px; }
	.author-hero img { width: 130px; height: 130px; }
	.pair-wide .bnr-copy { max-width: 80%; }
}

@media (max-width: 767px) {
	:root { --gap: 14px; }
	body { font-size: 14.5px; }
	.box { padding: 16px 14px; }
	.triad .box, .triad-side .box { padding: 16px 14px; }
	.mosaic { grid-template-columns: 1fr 1fr; gap: 12px; }
	.mosaic-main, .hero-pair { display: contents; }
	.bnr-tall { grid-row: span 2; min-height: 0; }
	.hero-pair .bnr { aspect-ratio: auto; min-height: 170px; }
	.hero { grid-column: 1 / -1; aspect-ratio: auto; min-height: 260px; }
	.slide-copy { width: 100%; padding: 18px 18px 54px; background: linear-gradient(to left, rgba(10, 12, 40, .78), rgba(10, 12, 40, .35)); }
	.slider-ctrl { inset-inline-start: 18px; }
	.bnr-copy { padding: 14px 14px 16px; max-width: 100%; }
	.bnr-title { font-size: 17px; }
	.bnr-tall .bnr-title { font-size: 20px; }
	.bnr-text { font-size: 13px; }
	.bnr-btn { font-size: 12.5px; padding: 5px 10px; }
	.hero-pair .bnr-text { display: none; }
	.triad { grid-template-columns: 1fr; grid-template-areas: "m" "r" "l"; }
	.triad-side { grid-template-columns: 1fr; }
	.triad-side > .pair-col { grid-template-columns: 1fr 1fr; gap: 12px; }
	.triad-2 .triad-side { grid-template-columns: 1fr; }
	.bnr-side { aspect-ratio: 16 / 10; }
	.bnr-side .bnr-copy, .pair-col .bnr-copy { max-width: 100%; }
	.deal-media { width: 46%; }
	.dgrid, .dgrid-c, .dgrid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pcard { padding: 10px 10px 14px; }
	.pcard-title { font-size: 14px; }
	.hlist { grid-template-columns: 1fr; }
	.hlist > .hcard:nth-child(odd) { padding-inline-end: 0; border-inline-end: 0; margin-inline-end: 0; }
	.track { grid-auto-columns: calc((100% - 2 * 12px) / 3); gap: 12px; }
	.promo-track { grid-auto-columns: 78%; }
	.disc-track, .author-track { grid-auto-columns: calc((100% - 12px) / 2.4); }
	.pair-wide { grid-template-columns: 1fr; }
	.pair-wide .bnr { aspect-ratio: auto; min-height: 150px; }
	.trust-bar li { padding: 12px; gap: 8px; }
	.trust-ic { width: 28px; height: 28px; }
	.trust-bar small { display: none; }
	.rrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rtile:nth-child(3n) { border-inline-end: 1px solid var(--line); }
	.rtile:nth-child(2n) { border-inline-end: 0; }
	.news { grid-template-columns: 1fr; gap: 18px; padding: 22px 18px; }
	.news-b { padding-inline-start: 0; border-inline-start: 0; }
	.foot-cols { grid-template-columns: 1fr 1fr; gap: 24px 18px; }
	.foot-contact, .foot-about { grid-column: 1 / -1; }
	.foot-bottom-in { justify-content: center; text-align: center; padding-block: 12px; }
	.page-head h1 { font-size: 21px; }
	.toolbar-end { width: 100%; justify-content: space-between; }
	.pdp-info { padding: 18px 16px; }
	.pdp-info h1 { font-size: 23px; }
	.buy-box { grid-template-columns: 1fr; }
	.buy-perks { grid-template-columns: 1fr; }
	.sample-strip { flex-wrap: wrap; }
	.wave { display: none; }
	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; }
	.cart-table tr { position: relative; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.cart-table td { padding: 4px 0; border: 0; }
	.cart-table td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
	.cart-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13.5px; font-weight: 500; }
	.ci-remove { position: absolute; top: 14px; inset-inline-end: 0; }
	.ci-book { padding-inline-end: 44px !important; }
	.coupon { width: 100%; }
	.coupon input { flex: 1; width: auto; min-width: 0; }
	.author-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
	.author-stats { justify-content: center; }
	.author-kicker { justify-self: center; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nf-code { font-size: 48px; }
	.nf h1 { font-size: 21px; }
	.nf-search { flex-direction: column; }
}

@media (hover: none) {
	.cat-menu:hover .cat-drop { opacity: 0; visibility: hidden; }
	.cat-menu.open .cat-drop { opacity: 1; visibility: visible; }
}

/* ==========================================================================
   ميزات المنصّة المعتمدة (SPEC، الملحق 8)
   ========================================================================== */
/* عدّاد «كتاب اليوم»: مربّعاتٌ حمراء كما في المرجع */
.deal-cd { display: grid; gap: 6px; margin: 4px 0 10px; }
.deal-cd .cd-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.deal-cd .cd-units { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.deal-cd .cd-unit { display: grid; justify-items: center; min-width: 0; padding: 5px 4px; border-radius: var(--r-sm); background: var(--sale); color: #fff; }
.deal-cd .cd-unit b { font-size: 19px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.deal-cd .cd-unit small { font-size: 11px; }

/* قسيمة الترحيب تحت حقل النشرة */
.news-c { display: grid; gap: 8px; min-width: 0; }
.nl-offer { font-size: 14px; font-weight: 700; color: var(--store-accent); }

/* المدوّنة */
.box-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--store-primary); }
.box-link .icon { width: 14px; height: 14px; }
.box-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.post-card { display: flex; flex-direction: column; gap: 10px; }
.post-media { display: block; border-radius: var(--r); overflow: hidden; background: var(--soft); }
.post-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.post-date { font-size: 13px; color: var(--muted); }
.post-title { font-size: 17px; font-weight: 700; line-height: 1.45; color: var(--store-primary); }
.post-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post-excerpt { font-size: 14px; color: var(--muted); }
.post-more { margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--store-primary); }
.post-page { margin-top: var(--gap); }
.post-grid-page { row-gap: 32px; }
.post-narrow { max-width: 820px; margin-inline: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-block: 10px; }
.post-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); }
.post-content { display: flex; flex-direction: column; gap: 14px; font-size: 17px; line-height: 1.9; }
.page-head time { color: var(--muted); }
@media (max-width: 991px) {
	.news-c { grid-column: 1 / -1; }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid:not(.post-grid-page) .post-card:nth-child(3) { display: none; }
}
@media (max-width: 599px) {
	.post-grid { grid-template-columns: minmax(0, 1fr); }
	.post-grid:not(.post-grid-page) .post-card:nth-child(3) { display: flex; }
	.post-content { font-size: 16px; }
}

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

/* الهاتف: تُختصر شبكات المنطقة الثلاثيّة إلى ستّة كتب حتّى لا تطول الصفحة */
@media (max-width: 767px) {
	.triad .dgrid > :nth-child(n+7) { display: none; }
}

/* إن أخفى الناشر السلايدر، يمتدّ البانران العلويّان حتّى طول البانر الطويل */
@media (min-width: 768px) {
	.mosaic-main:not(:has(.hero)) { align-content: stretch; }
	.mosaic-main:not(:has(.hero)) .hero-pair .bnr { aspect-ratio: auto; min-height: 260px; }
}

/* تبويبات صفّ الكتب (القاعدة 16): يختفي الشريط إن لم يختر الناشر غير مصدرٍ واحد */
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* ==========================================================================
   الإصدار الثاني: لا فراغ في أيّ عرض، وأقسامٌ أغنى
   ========================================================================== */
/* بانراتٌ تمتدّ بطول عمودها: الرسم في أسفل الصورة، ولونٌ مسطّح مثل أعلاها يملأ ما فوقه */
.bnr-bg-cream { background: #F3EFE2; }
.bnr-bg-indigo { background: #2C2777; }
.bnr-bg-lav { background: #E6E3F6; }
.bnr-bg-plum { background: #3A2470; }
.bnr-bg-mint { background: #E2F1EE; }
.bnr-bg-night { background: #1C1A4F; }
.bnr-bg-peach { background: #FCEBD8; }
.bnr-fill > img { inset: auto 0 0 0; height: auto; transform-origin: 50% 100%; }
/* البانران المتجاوران في العمود: الصورة تغطّي البانر من أسفله، والرسم في وسطها فلا يُقصّ */
.pair-col .bnr-fill > img { inset: 0; height: 100%; object-fit: cover; object-position: 50% 100%; }

@media (min-width: 768px) {
	.triad { align-items: stretch; }
	.triad-side { display: flex; flex-direction: column; align-items: stretch; gap: var(--gap); }
	.triad-side > .pair-col { flex: 1; grid-auto-rows: 1fr; }
	.triad-side > .pair-col .bnr { aspect-ratio: auto; min-height: 300px; }
	.triad-side > .bnr-side { flex: 1; }
}
@media (min-width: 1200px) {
	.triad-side > .bnr-side { aspect-ratio: auto; min-height: 380px; }
	/* الصفّ الثاني بين بانرين: صفٌّ واحد كامل بطول البانرين */
	.triad-2 .dgrid > :nth-child(n+6) { display: none; }
	[data-books-per-row="4"] .triad-2 .dgrid > :nth-child(n+5) { display: none; }
}
@media (max-width: 1199px) {
	.deal-media { max-width: 190px; }
	/* البانر العموديّ يصير أفقيًّا: النصّ في جانب والرسم في الجانب الآخر */
	.triad-side > .bnr-side { aspect-ratio: auto; min-height: 280px; }
	.bnr-side.bnr-fill > img { right: auto; left: 0; width: 46%; }
	.bnr-side .bnr-copy { max-width: 56%; }
	.buy-box .formats-box, .buy-box .buy-row { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
	.triad-side > .bnr-side { min-height: 230px; }
}

@media (max-width: 991px) { .hero-pair .bnr-text { display: none; } }
@media (max-width: 767px) { .triad .hlist > :nth-child(n+6) { display: none; } }

/* أعمال المؤلّف (سبعة كتب): صفٌّ واحد كامل في الحاسوب، ومسارٌ يُمرَّر فيما دونه */
@media (min-width: 1200px) { .works-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (max-width: 1199px) {
	.dgrid-wrap:has(> .works-grid) { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
	.works-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 1px) / 4.3); }
	.works-grid > * { scroll-snap-align: start; }
}
@media (max-width: 991px) { .works-grid { grid-auto-columns: calc(100% / 3.3); } }
@media (max-width: 767px) { .works-grid { grid-auto-columns: calc(100% / 2.2); } }

/* صفوفٌ كاملة دائمًا: صفوف الاقتراحات (ستّة كتب) صفٌّ واحد بعدد أعمدته */
[data-books-per-row="5"] .dgrid-row > :nth-child(n+6), body:not([data-books-per-row]) .dgrid-row > :nth-child(n+6) { display: none; }
[data-books-per-row="4"] .dgrid-row > :nth-child(n+5) { display: none; }
@media (max-width: 991px) { .dgrid-row > :nth-child(n+4) { display: none; } }
@media (max-width: 767px) { .dgrid-row > :nth-child(n+4) { display: flex; } .dgrid-row > :nth-child(n+5) { display: none; } }
/* وبقيّة الشبكات: لا يبقى صفٌّ ناقص في أيّ عدد أعمدة */
@media (min-width: 992px) {
	[data-books-per-row="4"] .dgrid-c > :nth-child(n+9) { display: none; }
	body:not([data-books-per-row="4"]) .dgrid-list:not([data-cols]):not(.is-list) > :nth-child(n+11),
	.dgrid-list[data-cols="5"]:not(.is-list) > :nth-child(n+11) { display: none; }
}
@media (min-width: 768px) and (max-width: 991px) {
	.dgrid-c > :nth-child(n+10) { display: none; }
}

/* الهاتف: صورة الشريحة فوق نصّها لا خلفه */
@media (max-width: 767px) {
	.hero { aspect-ratio: auto; min-height: 0; background: #16143F; }
	.hero .slides { position: relative; display: grid; }
	.slide { position: relative; inset: auto; grid-area: 1 / 1; }
	.slide > img { position: relative; z-index: 0; height: auto; aspect-ratio: 975 / 390; }
	.slide-copy { position: relative; width: 100%; background: none; padding: 14px 16px 58px; }
}

/* آراء القرّاء في الرئيسيّة (خيار show_reviews) */
.hr-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; }
.hr-score { display: grid; align-content: center; justify-items: center; gap: 6px; padding: 18px 14px; background: var(--store-primary); color: #fff; border-radius: var(--r); text-align: center; }
.hr-score strong { font-size: 44px; font-weight: 800; line-height: 1; }
.hr-score .stars .icon { width: 17px; height: 17px; }
.hr-score small { font-size: 14px; color: rgba(255, 255, 255, .92); }
.hr-score .btn { margin-top: 6px; min-height: 38px; font-size: 14px; }
.qcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qcard { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 4px 18px; border-inline-start: 1px solid var(--line); }
.qcard-top { display: flex; align-items: center; justify-content: space-between; }
.qmark { width: 26px; height: 26px; color: color-mix(in srgb, var(--store-primary) 35%, #fff); }
.qcard-text { color: #3a3d46; font-size: 14.5px; }
.qcard-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.qcard-who { display: grid; line-height: 1.35; min-width: 0; }
.qcard-who small { font-size: 13px; color: var(--muted); }
.qcard-who a { color: var(--store-primary); font-weight: 700; }
[data-show-reviews="false"] .home-reviews { display: none; }
@media (max-width: 1199px) {
	.qcards { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
	.qcard:nth-child(odd) { border-inline-start: 0; padding-inline-start: 0; }
}
@media (max-width: 767px) {
	.hr-layout { grid-template-columns: 1fr; gap: 14px; }
	.hr-score { grid-template-columns: auto 1fr; justify-items: start; text-align: start; column-gap: 14px; }
	.hr-score strong { grid-row: span 2; font-size: 38px; }
	.hr-score .btn { grid-column: 1 / -1; justify-self: stretch; }
	.qcards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
	.qcards::-webkit-scrollbar { display: none; }
	.qcard, .qcard:nth-child(odd) { scroll-snap-align: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
}

/* صفحة التصنيف: عمود التصفية يمتدّ ببانرٍ بطول القائمة، والتصفية المختارة، وعرض القائمة */
.cat-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; align-self: stretch; }
.cat-side .filters { position: static; }
.cat-banner { flex: 1; min-height: 380px; }
.cat-banner .bnr-title { font-size: 21px; }
.view-grid { display: none; }
@media (max-width: 991px) { .view-grid { display: inline-grid; } }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0 4px; font-size: 14px; }
.active-label { color: var(--muted); }
.active-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 2px 8px 2px 10px; background: var(--soft); border-radius: var(--r-sm); font-weight: 500; transition: background .2s, color .2s; }
.active-chip .icon { width: 14px; height: 14px; }
.active-chip:hover { background: var(--store-primary); color: #fff; }
.active-clear { color: var(--sale); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.dgrid-list.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pcard-desc { display: none; }
.is-list .pcard-desc { grid-area: d; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.is-list .pcard { display: grid; grid-template-columns: 118px minmax(0, 1fr); grid-template-areas: "m c" "m t" "m a" "m r" "m d" "m p"; grid-template-rows: auto auto auto auto auto 1fr; column-gap: 18px; row-gap: 2px; align-content: start; padding: 16px 18px; }
.is-list .pcard-media { grid-area: m; margin: 0 0 22px; }
.is-list .pcard-media > a { padding: 0; }
.is-list .pcard-media .type-dot { inset-inline-start: -6px; }
.is-list .pcard-cat { grid-area: c; }
.is-list .pcard-title { grid-area: t; font-size: 16px; }
.is-list .pcard-author { grid-area: a; }
.is-list .pcard-rate { grid-area: r; }
.is-list .price { grid-area: p; flex-direction: row; align-items: baseline; align-self: end; gap: 8px; margin-top: 0; padding-top: 8px; }
@media (max-width: 991px) {
	.cat-side { display: contents; }
	.cat-banner { display: none; }
	.cols-switch { display: flex; }
	.cols-switch [data-cols] { display: none; }
}
@media (max-width: 767px) {
	.dgrid-list.is-list { grid-template-columns: 1fr; }
	.is-list .pcard { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; padding: 14px 4px; }
	.is-list .pcard-acts { gap: 4px; }
	.is-list .pcard-acts .round-btn { width: 30px; height: 30px; }
}

/* صفحة الكتاب: اختيار النسخة، والكمّيّة بجانب زرّ السلّة */
.formats-box { display: grid; gap: 8px; }
.formats-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 6px; }
.format-opt { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; text-align: center; font-size: 13.5px; transition: border-color .2s; }
.format-opt .type-dot { position: static; width: 24px; height: 24px; box-shadow: none; }
.format-opt .type-dot .icon { width: 13px; height: 13px; }
.format-name { font-weight: 700; }
.format-price { font-size: 12.5px; color: var(--muted); }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt[aria-current="page"] { border-color: var(--store-primary); box-shadow: 0 0 0 1px var(--store-primary); background: var(--soft); }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ [data-preview-copy])) { display: none; }
.buy-row { display: flex; gap: 8px; }
.buy-row .btn { flex: 1; min-width: 0; gap: 6px; padding-inline: 8px; white-space: nowrap; }
.buy-row .qty { flex: none; }
.buy-row .qty button { height: 46px; width: 32px; }
.buy-row .qty input { height: 46px; width: 36px; }
/* أعمدة صفحة الكتاب بطولٍ واحد، فلا يبقى تحت الأقصر منها فراغ */
@media (min-width: 992px) {
	.pdp { align-items: stretch; }
	.pdp-gallery, .buy-box { align-content: start; }
}

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