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

:root {
	--store-primary: #5B4FC4;
	--store-primary-dark: #2C2762;
	--store-accent: #F5C842;
	--store-bg: #FFFFFF;
	--store-text: #101010;

	/* محايدات */
	--muted: #5F646A;
	--line: #E9E9E9;
	--surface: #F6F6F6;
	--gold: #F4B400;
	--ok: #1E6B34;

	/* بلاطات باهتة مشتقّة من لونَي المتجر */
	--tint: color-mix(in srgb, var(--store-primary) 9%, #fff);
	--tint-accent: color-mix(in srgb, var(--store-accent) 24%, #fff);
	--tint-dark: color-mix(in srgb, var(--store-primary-dark) 7%, #fff);
	--tint-mix: color-mix(in srgb, var(--store-accent) 14%, color-mix(in srgb, var(--store-primary) 7%, #fff));

	--radius: 16px;
	--radius-sm: 12px;
	--radius-lg: 28px;
	--pill: 999px;
	--per-row: 4;
	--font: 'Baloo Bhaijaan 2', Tahoma, 'Segoe UI', sans-serif;

	/* نقش آثار الأقدام: رسمٌ جديد مضمَّن، بلونين للخلفيّات الفاتحة والداكنة */
	--paw-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cg fill='%232C2762'%3E%3Cg transform='translate(34 38) rotate(-22)'%3E%3Cellipse cy='6' rx='9' ry='7.5'/%3E%3Ccircle cx='-11' cy='-4' r='3.6'/%3E%3Ccircle cx='-4.5' cy='-11' r='3.6'/%3E%3Ccircle cx='4.5' cy='-11' r='3.6'/%3E%3Ccircle cx='11' cy='-4' r='3.6'/%3E%3C/g%3E%3Cg transform='translate(108 106) rotate(24)'%3E%3Cellipse cy='6' rx='9' ry='7.5'/%3E%3Ccircle cx='-11' cy='-4' r='3.6'/%3E%3Ccircle cx='-4.5' cy='-11' r='3.6'/%3E%3Ccircle cx='4.5' cy='-11' r='3.6'/%3E%3Ccircle cx='11' cy='-4' r='3.6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	--paw-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cg fill='%23ffffff'%3E%3Cg transform='translate(34 38) rotate(-22)'%3E%3Cellipse cy='6' rx='9' ry='7.5'/%3E%3Ccircle cx='-11' cy='-4' r='3.6'/%3E%3Ccircle cx='-4.5' cy='-11' r='3.6'/%3E%3Ccircle cx='4.5' cy='-11' r='3.6'/%3E%3Ccircle cx='11' cy='-4' r='3.6'/%3E%3C/g%3E%3Cg transform='translate(108 106) rotate(24)'%3E%3Cellipse cy='6' rx='9' ry='7.5'/%3E%3Ccircle cx='-11' cy='-4' r='3.6'/%3E%3Ccircle cx='-4.5' cy='-11' r='3.6'/%3E%3Ccircle cx='4.5' cy='-11' r='3.6'/%3E%3Ccircle cx='11' cy='-4' r='3.6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
	--paw-ink: var(--paw-dark);
	--paw-opacity: .06;
}

/* خيارات الناشر */
[data-corners="sharp"] { --radius: 4px; --radius-sm: 3px; --radius-lg: 6px; --pill: 6px; }
[data-books-per-row="3"] { --per-row: 3; }
[data-books-per-row="4"] { --per-row: 4; }
[data-books-per-row="5"] { --per-row: 5; }
[data-books-per-row="6"] { --per-row: 6; }
[data-show-trust-bar="false"] .trust-bar { display: none; }
[data-show-reviews="false"] .reviews-sec { display: none; }
[data-show-pattern="false"] .paw::before { display: none; }

/* --------------------------------------------------------------- الأساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 134px; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	background: var(--store-bg);
	color: var(--store-text);
	overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--store-primary); outline-offset: 2px; }
.container { width: min(1320px, 100% - 48px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; inset-inline-start: 12px; z-index: 100; background: #fff; color: var(--store-text); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

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

/* نقش آثار الأقدام */
.paw { position: relative; isolation: isolate; }
.paw::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background-image: var(--paw-ink);
	background-size: 150px;
	opacity: var(--paw-opacity);
	pointer-events: none;
	border-radius: inherit;
}
.paw > :not(img) { position: relative; z-index: 2; }

/* --------------------------------------------------------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 48px; padding: 0 26px;
	border: 1px solid transparent; border-radius: var(--pill);
	font-weight: 700; font-size: 15px; line-height: 1;
	white-space: nowrap; text-decoration: none;
	transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--store-primary); color: #fff; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-dark { background: var(--store-primary-dark); color: #fff; }
.btn-dark:hover { background: var(--store-primary); }
.btn-accent { background: var(--store-accent); color: #101010; }
.btn-accent:hover { background: color-mix(in srgb, var(--store-accent) 85%, #000); }
.btn-white { background: #fff; color: #101010; }
.btn-white:hover { background: var(--store-primary-dark); color: #fff; }
.btn-outline { background: #fff; border-color: #D5D5D5; color: var(--store-text); }
.btn-outline:hover { border-color: var(--store-primary); color: var(--store-primary); }
.btn-ghost { background: transparent; color: var(--store-text); }
.btn:disabled, .btn[disabled] { background: #E6E6E6; color: #555A60; cursor: not-allowed; transform: none; }
.icon-arrow { width: 18px; height: 18px; }

.icon-btn {
	position: relative;
	width: 42px; height: 42px; flex: none;
	display: inline-grid; place-items: center;
	border-radius: 50%; border: 1px solid var(--line);
	background: #fff; color: var(--store-text);
	transition: background-color .2s, color .2s, border-color .2s;
}
.icon-btn:hover { border-color: var(--store-primary); color: var(--store-primary); }
.icon-btn-lg { width: 54px; height: 54px; }
.icon-btn.on-dark { background: transparent; border-color: transparent; color: #fff; }
.icon-btn.on-dark:hover { background: rgba(255,255,255,.12); }
[data-action="wishlist"][aria-pressed="true"] { color: #C0304A; }
[data-action="wishlist"][aria-pressed="true"] .icon { fill: currentColor; }

.link-u { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; white-space: nowrap; }
.link-u:hover { color: var(--store-primary); }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; color: var(--store-primary); letter-spacing: .02em; }

.field {
	height: 46px; padding: 0 16px;
	border: 1px solid #D5D5D5; border-radius: var(--radius-sm);
	background: #fff; color: var(--store-text);
	min-width: 0;
}
textarea.field { height: auto; padding: 12px 16px; resize: vertical; }
.field:focus { outline: none; border-color: var(--store-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-primary) 22%, transparent); }

.bubble {
	position: absolute; top: 2px; inset-inline-end: 0;
	min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--store-accent); color: #101010;
	font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}

/* --------------------------------------------------------------- الرأس */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--store-primary-dark); color: #fff; }
.hd-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 70px; }
.hd-start { display: flex; align-items: center; gap: 22px; justify-self: start; }
.hd-end { display: flex; align-items: center; gap: 2px; justify-self: end; }
.hd-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: rgba(255,255,255,.88); }
.hd-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.hd-link .icon { width: 17px; height: 17px; }
.menu-toggle { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand-name { font-size: 25px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }

.hd-nav { border-top: 1px solid rgba(255,255,255,.12); }
.nav-list { display: flex; justify-content: center; align-items: center; gap: 34px; min-height: 50px; }
.nav-list > li { position: relative; }
.nav-list > li > a, .nav-list > li > button {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 12px 0; border: 0; background: none;
	color: #fff; font-size: 15px; font-weight: 600;
}
.nav-list > li > a:hover, .nav-list > li > button:hover { color: var(--store-accent); }
.nav-list .icon { width: 16px; height: 16px; }
.drop {
	position: absolute; top: 100%; inset-inline-start: -18px; z-index: 5;
	min-width: 220px; padding: 10px;
	background: #fff; color: var(--store-text);
	border-radius: var(--radius-sm); box-shadow: 0 18px 40px rgba(20,18,50,.18);
	display: none;
}
.has-drop:hover .drop, .has-drop:focus-within .drop, .has-drop.open .drop { display: block; }
.drop a { display: block; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.drop a:hover { background: var(--tint); color: var(--store-primary-dark); }

.search-panel { border-top: 1px solid rgba(255,255,255,.12); padding: 12px 0; }
.js .search-panel { display: none; }
.search-open .search-panel { display: block; }
.search-row { display: flex; gap: 10px; }
.search-row .field { flex: 1; border-color: transparent; border-radius: var(--pill); }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(16,14,40,.5); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.drawer-open .drawer-backdrop, .filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer {
	position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 80;
	width: min(320px, 86vw); padding: 20px;
	background: #fff; color: var(--store-text);
	overflow-y: auto;
	transform: translateX(100%); visibility: hidden;
	transition: transform .3s, visibility .3s;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.drawer-head .brand-name { font-size: 21px; color: var(--store-primary-dark); }
.drawer-nav > li { border-bottom: 1px solid var(--line); }
.drawer-nav > li > a, .drawer-label { display: block; padding: 13px 4px; font-weight: 700; }
.drawer-sub { display: grid; padding: 0 12px 12px; }
.drawer-sub a { padding: 6px 0; color: var(--muted); }
.drawer-phone { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 700; color: var(--store-primary-dark); }

/* شريط الهاتف السفليّ */
.tabbar { display: none; }

/* --------------------------------------------------------------- الأقسام */
.section { padding: 40px 0; }
.section-top-0 { padding-top: 0; }
.section-flush { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.section-head.center { justify-content: center; text-align: center; }
.section-title { font-size: 34px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.section-sub { margin-top: 4px; color: var(--muted); font-size: 15px; }

/* بلاطات التصنيفات والسلايدر الأفقيّ */
.section-cats { padding-top: 22px; }
.carousel { position: relative; }
.track {
	display: grid; grid-auto-flow: column; gap: 16px;
	overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.cat-track { grid-auto-columns: calc((100% - 4 * 16px) / 5); }
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.carousel-nav[hidden] { display: none; }
.carousel-nav .icon-btn { width: 34px; height: 34px; }
.carousel-nav .icon { width: 16px; height: 16px; }
.carousel-dots, .slider-dots { display: flex; gap: 6px; align-items: center; }
.carousel-dots button, .slider-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: #CFCFD6; transition: width .2s, background-color .2s; }
.carousel-dots button[aria-current="true"] { width: 22px; background: var(--store-primary-dark); }

.cat-tile {
	--tile: var(--tint);
	display: flex; align-items: center; gap: 14px;
	padding: 14px 16px; border-radius: var(--radius);
	background: var(--tile); color: var(--store-text);
	transition: transform .2s;
}
.cat-tile:hover { transform: translateY(-2px); }
.cat-tile:nth-child(4n+2) { --tile: var(--tint-accent); }
.cat-tile:nth-child(4n+3) { --tile: var(--tint-dark); }
.cat-tile:nth-child(4n+4) { --tile: var(--tint-mix); }
.cat-tile img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; }
.cat-tile > span { display: grid; min-width: 0; }
.cat-tile b { font-size: 16px; font-weight: 600; line-height: 1.35; }
.cat-tile small { font-size: 13px; color: #50555B; }

/* --------------------------------------------------------------- شبكة البطل */
.hero-grid { display: flex; gap: 20px; margin-top: 22px; }
.hero { flex: 2 1 0; min-width: 0; }
.hero-side { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-side:empty { display: none; }
.hero-side:only-child { flex-direction: row; }
.slider { position: relative; height: 100%; border-radius: var(--radius); overflow: hidden; background: var(--store-primary); }
.slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; min-height: 560px; display: flex; align-items: center; scroll-snap-align: start; color: #fff; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, color-mix(in srgb, var(--store-primary-dark) 50%, transparent), transparent 62%); }
.slide-body { position: relative; z-index: 1; max-width: min(540px, 62%); padding: 48px 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.slide-body .eyebrow { color: #fff; background: rgba(255,255,255,.16); padding: 4px 14px; border-radius: var(--pill); }
.slide-body h2 { font-size: 60px; font-weight: 700; line-height: 1.08; letter-spacing: -.02em; }
.slide-body p { font-size: 17px; opacity: .95; max-width: 40ch; }
.slide-body .btn { margin-top: 8px; }
.slider-dots { position: absolute; bottom: 20px; inset-inline: 0; justify-content: center; z-index: 2; }
.slider-dots button { background: rgba(255,255,255,.5); }
.slider-dots button[aria-current="true"] { width: 22px; background: #fff; }

.side-banner {
	position: relative; flex: 1 1 0; min-height: 250px;
	display: flex; align-items: flex-end;
	border-radius: var(--radius); overflow: hidden;
	background: var(--tint); color: var(--store-text);
}
.side-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.side-banner:hover > img { transform: scale(1.04); }
.sb-body { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 26px 28px; max-width: 62%; }
.sb-body b { font-size: 28px; font-weight: 700; line-height: 1.2; }
.sb-body > span:not(.link-u) { font-size: 14px; color: #3F4349; }
.sb-body .link-u { margin-top: 8px; font-size: 15px; }

/* --------------------------------------------------------------- بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 32px 22px; }
.book-card { position: relative; display: flex; flex-direction: column; }
.book-media {
	position: relative;
	display: flex; flex-direction: column; align-items: center; gap: 16px;
	padding: 28px 14px 14px;
	border-radius: var(--radius-sm); background: var(--tint); overflow: hidden;
}
.book-cover { position: relative; display: block; width: 60%; }
.book-cover img, .gallery-main img, .spot-media img {
	width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
	border-radius: 3px 8px 8px 3px;
	box-shadow: 0 12px 24px rgba(28,24,70,.2), 0 2px 4px rgba(28,24,70,.12);
	transition: transform .35s;
}
.book-card:hover .book-cover img { transform: translateY(-4px) rotate(-1deg); }
.book-badges { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: var(--pill); font-size: 13px; font-weight: 700; line-height: 1.5; }
.badge-sale { background: var(--store-accent); color: #101010; }
.badge-new { background: var(--store-primary); color: #fff; }
.type-dot {
	display: inline-grid; place-items: center; flex: none;
	width: 34px; height: 34px; border-radius: 50%;
	color: #fff; box-shadow: 0 0 0 3px #fff;
}
.type-dot .icon { width: 18px; height: 18px; stroke-width: 2; }
.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; }
.type-dot-sm { width: 24px; height: 24px; box-shadow: 0 0 0 2px #fff; }
.type-dot-sm .icon { width: 13px; height: 13px; }
.type-dot-xs { width: 22px; height: 22px; box-shadow: none; }
.type-dot-xs .icon { width: 12px; height: 12px; }
.book-media > .type-dot { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; }
.book-wish { position: absolute; top: 56px; inset-inline-end: 8px; z-index: 2; width: 40px; height: 40px; border-color: transparent; opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s, color .2s; }
.book-add {
	position: relative; z-index: 2; width: 100%;
	display: flex; align-items: center; justify-content: center; gap: 6px;
	height: 42px; border: 1px solid color-mix(in srgb, var(--store-primary) 18%, #fff); border-radius: var(--pill);
	background: #fff; color: #101010; font-weight: 700; font-size: 14px;
	box-shadow: 0 6px 18px rgba(28,24,70,.1);
	transition: background-color .2s, color .2s, border-color .2s;
}
.book-add:disabled { background: transparent; border: 1.5px dashed #A9ACB3; box-shadow: none; color: #555A60; cursor: not-allowed; }
.book-add .icon { width: 18px; height: 18px; }
.book-add:not(:disabled):hover { background: var(--store-primary-dark); border-color: var(--store-primary-dark); color: #fff; }
.book-card:hover .book-wish, .book-card:focus-within .book-wish, .book-wish[aria-pressed="true"] { opacity: 1; transform: none; }
@media (hover: none) {
	.book-wish { opacity: 1; transform: none; }
}
.stock-band { position: absolute; inset-inline: -12px; bottom: 14px; z-index: 2; padding: 6px; background: rgba(16,16,16,.8); color: #fff; text-align: center; font-size: 14px; font-weight: 700; }
.is-out .book-cover img { filter: grayscale(.7); opacity: .7; }
.book-body { display: grid; gap: 3px; padding-top: 14px; justify-items: start; }
.book-title { font-size: 16px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-title a:hover { color: var(--store-primary); }
.book-author { font-size: 14px; color: var(--muted); }
.rating { display: inline-flex; align-items: center; gap: 6px; }
.stars { display: inline-flex; gap: 1px; }
.stars .icon { width: 15px; height: 15px; color: var(--gold); }
.stars .off { color: #D9D9D9; }
.rating .count { font-size: 13px; color: var(--muted); }
.rating-lg .stars .icon { width: 19px; height: 19px; }
.rating-lg .count { font-size: 15px; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 17px; font-weight: 700; color: var(--store-primary-dark); }
.price del { font-size: 14px; font-weight: 400; color: var(--muted); }
.price-lg { font-size: 30px; }
.price-lg del { font-size: 18px; }

/* أشكال البطاقة */
[data-card-style="framed"] .book-card { padding: 10px 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
[data-card-style="framed"] .book-body { padding-inline: 4px; }
[data-card-style="minimal"] .book-media { padding: 0; background: transparent; overflow: visible; }
[data-card-style="minimal"] .book-media > .type-dot, [data-card-style="minimal"] .book-badges { top: 10px; }
[data-card-style="minimal"] .book-cover { width: 100%; }
[data-card-style="minimal"] .book-cover img { border-radius: var(--radius-sm); box-shadow: none; }

/* البطاقة الأفقيّة الصغيرة */
.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mini-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .2s, box-shadow .2s; }
.mini-card:hover { border-color: color-mix(in srgb, var(--store-primary) 35%, #fff); box-shadow: 0 10px 24px rgba(28,24,70,.07); }
.mini-cover { position: relative; flex: 0 0 78px; padding: 8px; border-radius: 10px; background: var(--tint); }
.mini-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px 5px 5px 2px; box-shadow: 0 4px 10px rgba(28,24,70,.18); }
.mini-cover .type-dot { position: absolute; top: -6px; inset-inline-end: -6px; }
.mini-body { flex: 1; min-width: 0; display: grid; gap: 2px; justify-items: start; }
.mini-body .book-title { font-size: 15px; }
.mini-body .book-author { font-size: 13px; }
.mini-body .price { font-size: 16px; }
.mini-out { font-size: 13px; font-weight: 700; color: var(--muted); }
.mini-add { align-self: center; }
.mini-add:not(:disabled):hover { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.mini-add:disabled { border: 1.5px dashed #A9ACB3; background: transparent; color: #6B6F75; cursor: not-allowed; }

/* --------------------------------------------------------------- كتابان بجانب بانر */
.duo { display: flex; border-radius: var(--radius); overflow: hidden; }
.duo-banner { position: relative; flex: 1 1 0; min-height: 540px; display: block; background: var(--store-accent); color: #101010; }
.duo-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.duo-text { position: absolute; top: 40px; inset-inline-start: 40px; display: grid; gap: 2px; }
.duo-text small { font-size: 14px; font-weight: 700; }
.duo-text b { font-size: 36px; font-weight: 700; line-height: 1.2; }
.duo-panel { flex: 1 1 0; min-width: 0; padding: 48px 44px; background: var(--store-primary-dark); color: #fff; --paw-ink: var(--paw-light); --paw-opacity: .07; }
.duo-panel .section-sub { color: rgba(255,255,255,.82); }
.duo-panel .book-card { padding: 12px 12px 16px; border-radius: var(--radius); background: #fff; color: var(--store-text); border: 0; }

/* --------------------------------------------------------------- عروض الأسبوع */
.deals { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr); gap: 18px; }
.deal-list { display: contents; }
.deal-banner {
	position: relative; grid-column: 2; grid-row: 1 / span 3; min-height: 480px;
	display: flex; flex-direction: column; align-items: center; text-align: center;
	padding: 36px 28px; border-radius: var(--radius); overflow: hidden;
	background: var(--tint-accent); color: var(--store-text);
}
.deal-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.deal-text { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.deal-text small { font-size: 14px; font-weight: 700; color: #3F4349; }
.deal-text b { font-size: 40px; font-weight: 800; line-height: 1.1; color: var(--store-primary-dark); }
.deal-text > span:not(.btn) { font-size: 15px; color: #3F4349; max-width: 26ch; }
.deal-text .btn { margin-top: 6px; }

/* --------------------------------------------------------------- البانران */
.banner-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pair-banner { position: relative; min-height: 380px; display: flex; align-items: center; border-radius: var(--radius); overflow: hidden; }
.pair-banner > img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pair-banner:hover > img { transform: scale(1.03); }
.pair-banner::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to left, var(--scrim), transparent 62%); }
.tone-dark { background: var(--store-primary-dark); color: #fff; --scrim: color-mix(in srgb, var(--store-primary-dark) 70%, transparent); --paw-ink: var(--paw-light); --paw-opacity: .1; }
.tone-light { background: var(--store-accent); color: #101010; --scrim: color-mix(in srgb, var(--store-accent) 70%, transparent); --paw-opacity: .08; }
.pb-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 40px 44px; max-width: 60%; }
.pb-body small { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.pb-body b { font-size: 38px; font-weight: 700; line-height: 1.15; }
.pb-body .btn { margin-top: 10px; }

/* --------------------------------------------------------------- الكتاب المميّز وصفحة الكتاب */
.spotlight { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.spot-media, .gallery-main { position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); background: var(--tint); }
.spot-media .book-cover { width: 46%; }
.spot-media > .type-dot, .gallery-main > .type-dot { position: absolute; top: 20px; inset-inline-end: 20px; width: 42px; height: 42px; }
.spot-media > .type-dot .icon, .gallery-main > .type-dot .icon { width: 22px; height: 22px; }
.gallery-main .book-badges { top: 20px; inset-inline-start: 20px; }
.spot-info, .pdp-info { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.spot-cat { display: inline-block; padding: 3px 12px; border-radius: var(--pill); background: var(--tint); color: var(--store-primary-dark); font-size: 13px; font-weight: 700; }
.spot-title, .pdp-info h1 { font-size: 40px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.spot-title a:hover { color: var(--store-primary); }
.spot-author { color: var(--muted); }
.spot-author a { color: var(--store-primary); font-weight: 700; }
.spot-price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spot-desc { color: #45494F; font-size: 16px; max-width: 58ch; }
.spot-actions, .pdp-buttons { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.spot-actions .link-u { margin-inline-start: 8px; }

.pdp-sec { padding-top: 26px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 18px; }
.gallery { display: grid; gap: 14px; }
.gallery-main img { width: 40%; }
.thumbs { display: flex; gap: 12px; }
.thumbs button { width: 84px; height: 84px; padding: 10px; display: grid; place-items: center; border: 2px solid transparent; border-radius: var(--radius-sm); background: var(--tint); }
.thumbs button[aria-pressed="true"] { border-color: var(--store-primary); }
.thumbs img { height: 100%; width: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.pdp-tags { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pdp-type { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { display: grid; gap: 0; padding: 8px 16px; border-radius: var(--radius-sm); background: var(--tint); }
.chips small { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #4A4E54; }
.chips small .icon { width: 14px; height: 14px; color: var(--store-primary); }
.chips b { font-size: 15px; font-weight: 600; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ok); }
.stock .icon { width: 18px; height: 18px; }
.perks { display: grid; gap: 8px; width: 100%; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks .icon { color: var(--store-primary); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: #9A9EA4; }
.breadcrumb a:hover { color: var(--store-primary); }
.breadcrumb [aria-current] { color: var(--store-text); font-weight: 600; }

.tabs-panel { margin-top: 56px; padding: 36px 40px; border-radius: var(--radius-lg); background: var(--surface); }
.tab-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tab-list button { padding: 9px 22px; border: 0; border-radius: var(--pill); background: transparent; font-weight: 700; font-size: 16px; color: var(--store-text); }
.tab-list button[aria-selected="true"] { background: var(--store-primary-dark); color: #fff; }
.prose { max-width: 76ch; margin-inline: auto; }
.prose p { margin-bottom: 12px; line-height: 1.9; }
.spec-table { width: 100%; max-width: 760px; margin-inline: auto; border-collapse: collapse; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.spec-table th, .spec-table td { padding: 12px 20px; border-bottom: 1px solid var(--line); text-align: start; }
.spec-table th { width: 36%; font-weight: 600; color: #45494F; }
.spec-table tr:last-child > * { border-bottom: 0; }
.reviews-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 36px; align-items: start; }
.reviews-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.reviews-summary strong { font-size: 48px; line-height: 1; }
.reviews-summary > span:last-child { color: var(--muted); font-size: 14px; }
.rating-bars { display: grid; gap: 8px; margin: 18px 0 22px; }
.rating-bars li { display: grid; grid-template-columns: 58px 1fr 38px; align-items: center; gap: 10px; font-size: 14px; }
.bar { height: 8px; border-radius: 4px; background: #E2E2E2; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--gold); }
.review-form { display: grid; gap: 10px; padding: 20px; border-radius: var(--radius); background: #fff; }
.review-form h3 { font-size: 18px; }
.review-form p { font-size: 14px; color: var(--muted); }
.star-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; margin: 0; padding: 0; border: 0; }
.star-pick legend { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label { cursor: pointer; color: #D9D9D9; }
.star-pick label .icon { width: 26px; height: 26px; }
.star-pick input:checked ~ label, .star-pick label:hover, .star-pick label:hover ~ label { color: var(--gold); }
.star-pick input:focus-visible + label { outline: 2px solid var(--store-primary); border-radius: 4px; }
.review-list { display: grid; gap: 16px; }

/* --------------------------------------------------------------- آراء القرّاء */
.reviews-panel { padding: 56px 48px 44px; border-radius: var(--radius-lg); background: var(--surface); }
.review-track { grid-auto-columns: calc((100% - 24px) / 2); gap: 24px; }
.review-card { display: flex; gap: 20px; padding: 22px; border-radius: var(--radius); background: #fff; }
.review-cover { flex: 0 0 116px; width: 116px; aspect-ratio: 2 / 3; object-fit: cover; align-self: flex-start; border-radius: 4px 10px 10px 4px; box-shadow: 0 8px 18px rgba(28,24,70,.16); }
.review-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.review-who { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.review-who b { font-size: 17px; }
.review-who small { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.review-who small .icon { width: 15px; height: 15px; color: #2E8B3E; stroke-width: 2.4; }
.review-body p { font-size: 15px; line-height: 1.75; }
.review-book { font-size: 13px; font-weight: 600; color: var(--store-primary-dark); }

/* --------------------------------------------------------------- المؤلّفون */
.author-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.author-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.author-photo { display: block; width: 100%; overflow: hidden; border-radius: var(--radius); margin-bottom: 6px; }
.author-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; transition: transform .5s; }
.author-card:hover .author-photo img { transform: scale(1.04); }
.author-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.author-meta .icon { width: 15px; height: 15px; color: var(--store-primary); }
.author-card h3 { font-size: 22px; font-weight: 600; line-height: 1.3; }
.author-card h3 a:hover { color: var(--store-primary); }
.author-card p { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --------------------------------------------------------------- شريط الثقة */
.trust-bar { padding: 8px 0 60px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 44px; border-top: 1px solid var(--line); }
.trust-item { display: grid; justify-items: center; gap: 4px; text-align: center; }
.trust-item .icon { width: 42px; height: 42px; margin-bottom: 8px; stroke-width: 1.3; color: var(--store-primary-dark); }
.trust-item h3 { font-size: 18px; font-weight: 600; }
.trust-item p { font-size: 14px; color: var(--muted); }

/* --------------------------------------------------------------- التذييل */
.site-footer { background: var(--store-primary-dark); color: rgba(255,255,255,.84); padding-top: 64px; }
.ft-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.5fr; gap: 32px; }
.site-footer h2 { margin-bottom: 14px; color: #fff; font-size: 16px; font-weight: 700; }
.ft-store small { font-size: 14px; }
.ft-phone { display: block; margin: 2px 0 10px; color: #fff; font-size: 30px; font-weight: 700; line-height: 1.3; }
.ft-store p, .ft-mail { display: block; font-size: 15px; }
.ft-col li { margin-bottom: 8px; }
.ft-col a, .ft-mail { transition: color .2s; }
.ft-col a:hover, .ft-mail:hover { color: var(--store-accent); }
.social { display: flex; gap: 8px; margin-top: 18px; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: #fff; transition: background-color .2s, color .2s; }
.social a:hover { background: var(--store-accent); color: #101010; border-color: var(--store-accent); }
.social .icon { width: 17px; height: 17px; }
.ft-news p { font-size: 15px; margin-bottom: 14px; }
.ft-news small { display: block; margin-top: 10px; font-size: 13px; color: rgba(255,255,255,.75); }
.news-field { display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: var(--pill); background: #fff; }
.news-field input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 0; background: transparent; color: var(--store-text); }
.news-field input:focus { outline: none; }
.news-field .icon-btn { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.ft-bottom { margin-top: 52px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px; }
.ft-bottom .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.pay { display: flex; flex-wrap: wrap; gap: 8px; }
.pay li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; font-size: 13px; }
.pay .icon { width: 17px; height: 17px; }

/* --------------------------------------------------------------- رأس الصفحات الداخليّة */
.page-head { padding: 38px 0 44px; text-align: center; background: var(--tint); }
.page-head .breadcrumb { justify-content: center; color: #4D5157; }
.page-head h1 { margin-top: 10px; font-size: 44px; font-weight: 700; line-height: 1.2; }
.page-head p { max-width: 62ch; margin: 8px auto 0; color: #4D5157; }

/* التصنيف */
.listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }
.filters-head { display: none; align-items: center; justify-content: space-between; }
.filters-head h2 { font-size: 20px; }
.filter-box { padding: 18px 0; border-bottom: 1px solid var(--line); }
.filter-box:first-of-type { padding-top: 0; }
.filter-box h3 { margin-bottom: 10px; font-size: 16px; font-weight: 700; }
.filter-cats a { display: flex; justify-content: space-between; padding: 5px 0; }
.filter-cats a:hover, .filter-cats [aria-current] { color: var(--store-primary); font-weight: 700; }
.check { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--store-primary); }
.count { margin-inline-start: auto; font-size: 13px; color: var(--muted); }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range .field { width: 100%; height: 42px; }
.filters > .btn { margin-top: 20px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.toolbar p { color: var(--muted); }
.toolbar p b { color: var(--store-text); }
.filters-toggle { display: none; }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.sort .field { height: 42px; padding-inline: 14px; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.pagination a, .pagination span { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-weight: 600; }
.pagination span { border-color: transparent; }
.pagination a:hover { border-color: var(--store-primary); color: var(--store-primary); }
.pagination [aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.pagination .icon { width: 18px; height: 18px; }

/* المؤلّف */
.author-hero { padding: 34px 0 60px; background: var(--store-primary-dark); color: #fff; --paw-ink: var(--paw-light); --paw-opacity: .07; }
.author-hero .breadcrumb, .author-hero .breadcrumb [aria-current] { color: rgba(255,255,255,.85); }
.author-hero .breadcrumb li + li::before { color: rgba(255,255,255,.6); }
.author-hero-in { display: flex; align-items: center; gap: 44px; margin-top: 26px; }
.author-avatar { flex: none; width: 230px; height: 230px; object-fit: cover; border-radius: var(--radius-lg); border: 6px solid rgba(255,255,255,.14); }
.author-hero .eyebrow { color: var(--store-accent); }
.author-hero h1 { font-size: 48px; font-weight: 700; line-height: 1.2; }
.author-count { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 14px; padding: 6px 16px; border-radius: var(--pill); background: rgba(255,255,255,.12); font-size: 15px; }
.author-count .icon { width: 17px; height: 17px; color: var(--store-accent); }
.author-hero p { max-width: 64ch; color: rgba(255,255,255,.88); font-size: 17px; line-height: 1.85; }

/* السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 36px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { padding: 0 12px 12px; border-bottom: 1px solid var(--line); text-align: start; font-size: 14px; font-weight: 600; color: var(--muted); }
.cart-table td { padding: 18px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-book { display: flex; align-items: center; gap: 16px; }
.cart-book img { width: 74px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 6px 6px 3px; box-shadow: 0 6px 14px rgba(28,24,70,.16); }
.cart-book h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.cart-book p { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.qty { display: inline-flex; align-items: center; height: 44px; border: 1px solid #D5D5D5; border-radius: var(--pill); }
.qty button { width: 38px; height: 100%; border: 0; background: none; font-size: 19px; }
.qty input { width: 40px; border: 0; text-align: center; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cart-remove { border-color: transparent; color: var(--muted); }
.cart-under { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.empty-cart { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center; border-radius: var(--radius); background: var(--tint); }
.empty-cart[hidden] { display: none; }
.empty-icon { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--store-primary); }
.empty-icon .icon { width: 30px; height: 30px; }
.summary { position: sticky; top: 140px; display: grid; gap: 12px; padding: 26px; border-radius: var(--radius); background: var(--tint); }
.summary h2 { font-size: 22px; }
.coupon { display: flex; gap: 8px; }
.coupon .field { flex: 1; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-radius: 10px; background: #fff; font-size: 14px; }
.coupon-applied button { border: 0; background: none; color: var(--store-primary); font-weight: 700; text-decoration: underline; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.summary-total { padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--store-primary) 20%, #fff); font-size: 20px; font-weight: 800; }
.summary .note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: #4D5157; }
.summary .note .icon { width: 15px; height: 15px; }

/* 404 */
.nf { padding: 56px 0 64px; background: var(--tint); text-align: center; }
.nf-in { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.nf-art { width: 270px; height: auto; }
.nf-shadow { fill: rgba(28,24,70,.08); }
.nf-page { fill: #fff; stroke: var(--store-primary-dark); stroke-width: 3; stroke-linejoin: round; }
.nf-page2 { fill: color-mix(in srgb, var(--store-accent) 40%, #fff); stroke: var(--store-primary-dark); stroke-width: 3; stroke-linejoin: round; }
.nf-spine { stroke: var(--store-primary-dark); stroke-width: 3; }
.nf-paw use { fill: var(--store-primary); stroke: none; }
.nf-code { font-size: 86px; font-weight: 800; line-height: 1; color: var(--store-primary); }
.nf h1 { font-size: 34px; font-weight: 700; line-height: 1.3; }
.nf p { max-width: 52ch; color: #4D5157; }
.nf-search { display: flex; gap: 8px; width: min(520px, 100%); margin: 6px 0; }
.nf-search .field { flex: 1; border-radius: var(--pill); }

/* صفحة المكوّنات */
.kit-block { padding: 44px 0; border-bottom: 1px solid var(--line); }
.kit-block > .container > h2 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.kit-note { color: var(--muted); margin-bottom: 18px; max-width: 80ch; }
.kit-note code { font-family: inherit; background: var(--surface); padding: 0 6px; border-radius: 4px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.kit-label { font-weight: 700; min-width: 130px; }
.kit-dark { display: flex; gap: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--store-primary-dark); }
.kit-type { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.cat-track-static { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.review-track-static { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 20px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); }

/* ==========================================================================
   العروض
   ========================================================================== */
@media (max-width: 1199px) {
	.hide-md { display: none; }
	.hero-grid { flex-direction: column; }
	.hero-side, .hero-side:only-child { flex-direction: row; }
	.side-banner { min-height: 220px; }
	.slide-body { max-width: min(540px, 50%); }
	.cat-track { grid-auto-columns: calc((100% - 3 * 16px) / 4); }
	.slide-body h2 { font-size: 48px; }
	.ft-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ft-store, .ft-news { grid-column: span 3; }
	.ft-news { max-width: 520px; }
}

@media (max-width: 991px) {
	body { padding-bottom: 64px; }
	.hd-top { display: flex; min-height: 62px; gap: 8px; }
	.hd-end { margin-inline-start: auto; }
	.menu-toggle { display: inline-grid; }
	.hd-phone, .hide-sm { display: none; }
	.hd-nav { display: none; }
	.brand-name { font-size: 21px; }
	.brand img { width: 34px; height: 34px; }
	.tabbar {
		position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
		display: grid; grid-template-columns: repeat(5, 1fr);
		height: 64px; background: #fff; border-top: 1px solid var(--line);
		box-shadow: 0 -6px 20px rgba(28,24,70,.06);
	}
	.tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--store-text); }
	.tabbar .bubble { top: 6px; inset-inline-end: calc(50% - 22px); }

	body[data-books-per-row] { --per-row: 3; }
	.section { padding: 32px 0; }
	.section-flush { padding: 32px 0; }
	.cat-track { grid-auto-columns: calc((100% - 2 * 16px) / 3); }

	.hero-grid { flex-direction: column; }
	.hero-side, .hero-side:only-child { flex-direction: row; }
	.slide { min-height: 440px; }
	.side-banner { min-height: 220px; }
	.sb-body b { font-size: 24px; }

	.mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.duo { flex-direction: column; }
	.duo-banner { min-height: 360px; }
	.deals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.deal-banner { grid-column: 1 / -1; grid-row: auto; order: -1; min-height: 360px; }
	.pb-body b { font-size: 30px; }
	.spotlight, .pdp { grid-template-columns: minmax(0, 1fr); gap: 30px; }
	.spot-media { aspect-ratio: 4 / 3; }
	.spot-media .book-cover { width: 34%; }
	.gallery-main { aspect-ratio: 4 / 3; }
	.gallery-main img { width: 36%; }
	.review-track { grid-auto-columns: 100%; }
	.reviews-layout { grid-template-columns: minmax(0, 1fr); }
	.author-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
	.trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }

	.listing { grid-template-columns: minmax(0, 1fr); }
	.filters {
		position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 80;
		width: min(330px, 88vw); padding: 20px; overflow-y: auto;
		background: #fff; transform: translateX(100%); visibility: hidden;
		transition: transform .3s, visibility .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-head { display: flex; margin-bottom: 14px; }
	.filters-toggle { display: inline-flex; }
	.cart-layout { grid-template-columns: minmax(0, 1fr); }
	.summary { position: static; }
	.author-hero-in { gap: 28px; }
	.author-avatar { width: 180px; height: 180px; }
}

@media (max-width: 767px) {
	.section-title { font-size: 28px; }
	.page-head h1 { font-size: 34px; }
	.spot-title, .pdp-info h1 { font-size: 32px; }
	.author-grid { grid-template-columns: minmax(0, 1fr); }
	.author-photo img { aspect-ratio: 16 / 10; }
	.banner-pair { grid-template-columns: minmax(0, 1fr); }
	.pair-banner { min-height: 300px; }
	.reviews-panel { padding: 40px 22px 32px; }
	.tabs-panel { padding: 26px 18px; }
	.author-hero-in { flex-direction: column; text-align: center; }
	.author-hero-in > div { display: flex; flex-direction: column; align-items: center; }
	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
	.cart-table tr { position: relative; padding: 16px 0; border-bottom: 1px solid var(--line); }
	.cart-table td { padding: 6px 0; border: 0; }
	.cart-table td[data-label] { display: flex; align-items: center; justify-content: space-between; }
	.cart-table td[data-label]::before { content: attr(data-label); font-size: 14px; color: var(--muted); }
	.cart-table .cell-remove { position: absolute; top: 12px; inset-inline-end: 0; width: auto; }
	.cart-book { padding-inline-end: 44px; }
	.ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ft-store, .ft-news { grid-column: span 2; }
	.ft-col:last-of-type { grid-column: span 2; }
}

@media (max-width: 599px) {
	.container { width: calc(100% - 32px); }
	body[data-books-per-row] { --per-row: 2; }
	.book-grid { gap: 26px 14px; }
	.book-media { gap: 12px; padding: 22px 8px 8px; }
	.book-add { height: 38px; font-size: 13px; }
	.book-add .icon { display: none; }
	.book-wish { top: 50px; inset-inline-end: 6px; width: 36px; height: 36px; }
	.book-badges, .book-media > .type-dot { top: 8px; }
	.book-badges { inset-inline-start: 8px; }
	.book-media > .type-dot { inset-inline-end: 8px; width: 30px; height: 30px; }
	.book-cover { width: 66%; }
	.book-title { font-size: 15px; }
	.price { font-size: 16px; }
	.section { padding: 26px 0; }
	.section-flush { padding: 26px 0; }
	.section-head { flex-wrap: wrap; align-items: flex-end; margin-bottom: 22px; }
	.section-title { font-size: 25px; }
	.cat-track { grid-auto-columns: calc((100% - 16px) / 1.7); }
	.hero-side, .hero-side:only-child { flex-direction: column; }
	.slide { min-height: 460px; align-items: flex-end; }
	.slide::after { background: linear-gradient(to top, color-mix(in srgb, var(--store-primary-dark) 75%, transparent), transparent 75%); }
	.slide-body { max-width: 100%; padding: 28px 24px 52px; }
	.slide-body h2 { font-size: 34px; }
	.slide-body p { font-size: 15px; }
	.sb-body { max-width: 70%; padding: 20px; }
	.mini-grid { grid-template-columns: minmax(0, 1fr); }
	.duo-panel { padding: 36px 16px; }
		.duo-panel .book-card { padding: 8px 8px 12px; }
	.duo-banner { min-height: 300px; }
	.duo-text { top: 24px; inset-inline-start: 24px; }
	.duo-text b { font-size: 28px; }
	.deals { grid-template-columns: minmax(0, 1fr); }
	.deal-banner { min-height: 380px; }
	.deal-text b { font-size: 34px; }
	.pb-body { max-width: 80%; padding: 28px 24px; }
	.pb-body b { font-size: 26px; }
	.pair-banner::after { background: linear-gradient(to left, var(--scrim), transparent 90%); }
	.review-card { flex-direction: column; }
	.review-cover { width: 84px; flex-basis: auto; }
	.trust-item h3 { font-size: 16px; }
	.spot-media .book-cover, .gallery-main img { width: 46%; }
	.price-lg { font-size: 26px; }
	.pdp-buttons .btn-lg { flex: 1; padding: 0 18px; }
	.tab-list button { padding: 8px 14px; font-size: 15px; }
	.page-head { padding: 28px 0 32px; }
	.page-head h1, .author-hero h1 { font-size: 32px; }
	.nf h1 { font-size: 26px; }
	.nf-code { font-size: 64px; }
	.ft-phone { font-size: 26px; }
	.ft-bottom .container { flex-direction: column; text-align: center; }
	.toolbar .sort span { display: none; }
	.kit-dark { flex-wrap: wrap; }
	.toolbar .sort { flex: 1; justify-content: flex-end; }
}

/* ==========================================================================
   ميزات المنصّة المعتمدة (SPEC، الملحق 8)
   ========================================================================== */
/* النظرة السريعة على بطاقة الكتاب */
.book-quick { position: absolute; top: 102px; inset-inline-end: 8px; z-index: 2; width: 40px; height: 40px; border-color: transparent; opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s, color .2s; }
.book-card:hover .book-quick, .book-card:focus-within .book-quick { opacity: 1; transform: none; }
@media (hover: none) { .book-quick { opacity: 1; transform: none; } }

/* العدّاد التنازليّ */
.countdown { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cd-units { display: flex; gap: 8px; direction: rtl; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 56px; padding: 8px 6px 6px; border-radius: var(--radius-sm); background: #fff; box-shadow: 0 4px 14px rgba(28,24,70,.08); }
.cd-unit b { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--store-primary-dark); font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; font-weight: 600; color: var(--muted); }
.deal-text .countdown { margin: 6px 0 4px; }

/* الباقات */
.bundle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 640px; margin-inline: auto; }
.bundle-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 14px 18px; border-radius: var(--radius); background: #fff; color: var(--store-text); }
.bundle-covers { display: flex; justify-content: center; align-items: flex-end; width: 100%; padding: 22px 10px 18px; margin-bottom: 6px; border-radius: var(--radius-sm); background: var(--tint); }
.bundle-covers img { width: 31%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 8px 18px rgba(28,24,70,.22); }
.bundle-covers img + img { margin-inline-start: -9%; }
.bundle-covers img:nth-child(2) { position: relative; z-index: 1; transform: translateY(-8px); }
.bundle-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.bundle-count { font-size: 14px; color: var(--muted); }
.bundle-save { display: inline-block; padding: 2px 10px; border-radius: var(--pill); background: var(--tint-accent); color: #101010; font-size: 13px; font-weight: 700; }
.bundle-add { width: 100%; margin-top: auto; justify-content: center; }
.bundle-card .price { margin-top: 2px; }
.qty-deal { display: inline-flex; padding: 4px 12px; border-radius: var(--pill); background: var(--tint-accent); color: #101010; font-size: 14px; font-weight: 700; }
.pdp-buttons .qty { height: 54px; }

/* المدوّنة */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; gap: 14px; }
.post-media { display: block; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.post-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.post-date { font-size: 13px; color: var(--muted); }
.post-title { font-size: 20px; font-weight: 700; line-height: 1.35; }
.post-title a:hover { color: var(--store-primary); }
.post-excerpt { font-size: 15px; color: var(--muted); }
.post-more { margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--store-primary); text-decoration: underline; text-underline-offset: 4px; }
.post-all { margin-top: 28px; text-align: center; }
.post-grid-page { row-gap: 40px; }
.post-narrow { max-width: 820px; display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.post-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.post-content { display: flex; flex-direction: column; gap: 16px; font-size: 18px; line-height: 1.9; }
.page-head time { color: #4D5157; }

@media (max-width: 991px) {
	.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) {
	.book-quick { top: 92px; inset-inline-end: 6px; width: 36px; height: 36px; }
	.bundle-grid { gap: 12px; }
	.bundle-card { padding: 8px 8px 12px; }
	.bundle-covers { padding: 16px 6px 12px; }
	.bundle-title { font-size: 16px; }
	.bundle-add { padding-inline: 8px; font-size: 13px; }
	.bundle-add .icon { display: none; }
	.cd-unit { min-width: 50px; }
	.cd-unit b { font-size: 22px; }
	.post-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.post-grid:not(.post-grid-page) .post-card:nth-child(3) { display: flex; }
	.post-content { font-size: 17px; }
}

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

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

/* تبويبات صفّ الكتب (القاعدة 16) */
.row-tabs { display: flex; gap: 8px; margin: -8px 0 26px; overflow-x: auto; scrollbar-width: none; }
.row-tabs::-webkit-scrollbar { display: none; }
.row-tab { flex: none; padding: 8px 20px; border: 1.5px solid var(--line); border-radius: var(--pill); background: #fff; font-size: 15px; font-weight: 700; color: var(--store-text); transition: background-color .2s, border-color .2s, color .2s; }
.row-tab:hover { border-color: var(--store-primary); }
.row-tab[aria-selected="true"] { background: var(--store-primary-dark); border-color: var(--store-primary-dark); color: #fff; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* كتاب الأسبوع: بلاطةٌ بقدر الغلاف بلا فراغٍ زائد */
.spot-media { aspect-ratio: auto; padding: 44px 24px; }
@media (max-width: 991px) { .spot-media { aspect-ratio: auto; padding: 32px 20px; } }

/* وصل حديثًا: صفٌّ يُمرَّر على شريطٍ باهت بعرض الصفحة */
.new-band { padding: 56px 0; background: var(--tint-mix); }
.new-band .book-media { background: #fff; }
.book-track { grid-auto-columns: calc((100% - (var(--per-row) - 1) * 22px) / var(--per-row)); gap: 22px; }
.book-track > .book-card { min-width: 0; }

/* شريط الثقة: صفٌّ مدمج تحت شبكة البطل */
.trust-bar { padding: 20px 0 0; }
.trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-top: 0; border-top: 0; }
.trust-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: start; column-gap: 12px; row-gap: 0; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); text-align: start; }
.trust-item .icon { grid-row: span 2; width: 32px; height: 32px; margin: 0; stroke-width: 1.5; }
.trust-item h3 { font-size: 15px; font-weight: 700; line-height: 1.4; }
.trust-item p { font-size: 13px; line-height: 1.5; }

@media (max-width: 991px) {
	.grid-2rows > :nth-child(n+7), .grid-1row > :nth-child(n+4) { display: none; }
	.trust-grid { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 14px) / 2.2); row-gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-grid::-webkit-scrollbar { display: none; }
	.trust-item { scroll-snap-align: start; }
	.new-band { padding: 40px 0; }
}
@media (max-width: 599px) {
	.grid-1row > :nth-child(4) { display: flex; }
	.book-track { grid-auto-columns: calc((100% - 2 * 14px) / 2.2); gap: 14px; }
	.trust-grid { grid-auto-columns: 62%; gap: 10px; }
	.trust-item { padding: 10px 14px; }
	.trust-item .icon { width: 26px; height: 26px; }
	.trust-bar { padding-top: 16px; }
	.row-tabs { margin: -6px -16px 20px; padding-inline: 16px; }
	.row-tab { padding: 7px 16px; font-size: 14px; }
	.new-band { padding: 32px 0; }

	/* البطل: الصورة فوق النصّ لا خلفه */
	.slide { flex-direction: column; align-items: stretch; min-height: 0; }
	.slide > img { position: relative; inset: auto; height: 200px; object-position: 24% 60%; }
	.slide::after { display: none; }
	.slide-body { padding: 18px 20px 44px; gap: 10px; }
	.slide-body h2 { font-size: 30px; }
	.slider-dots { bottom: 16px; }
	/* البانران الجانبيّان: عمودان صغيران، الرسم فوق والنصّ تحته */
	.hero-side, .hero-side:only-child { flex-direction: row; gap: 12px; }
	.side-banner { flex-direction: column; align-items: stretch; min-height: 0; }
	.side-banner > img { position: relative; inset: auto; height: 104px; object-position: 12% 62%; }
	.sb-body { max-width: 100%; padding: 10px 12px 14px; }
	.sb-body b { font-size: 18px; }
	.sb-body > span:not(.link-u) { font-size: 13px; line-height: 1.45; }
	.sb-body .link-u { margin-top: 4px; font-size: 14px; }
	.hero-grid { gap: 12px; margin-top: 14px; }
	/* المؤلّفون والمقالات: صفّان يُمرَّران بدل أعمدةٍ طويلة */
	.author-grid, .post-grid:not(.post-grid-page) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
	.author-grid::-webkit-scrollbar, .post-grid::-webkit-scrollbar { display: none; }
	.author-grid > *, .post-grid > * { scroll-snap-align: start; }
	.author-photo img { aspect-ratio: 4 / 3; }
	.post-grid:not(.post-grid-page) .post-card:nth-child(3) { display: flex; }
	/* البانران الكبيران: الرسم فوق والنصّ تحته */
	.pair-banner { flex-direction: column; align-items: stretch; min-height: 0; }
	.pair-banner > img { position: relative; inset: auto; height: 180px; object-position: 14% 50%; }
	.pair-banner::after { display: none; }
	.pb-body { max-width: 100%; padding: 18px 22px 24px; }
	.pb-body b { font-size: 26px; }
}

/* اختيار الصيغة في صفحة الكتاب (يُخفى إن لم تكن غير صيغةٍ واحدة) */
.formats-box { display: grid; gap: 8px; }
.formats-label { font-size: 14px; font-weight: 700; color: #4A4E54; }
.formats { display: flex; flex-wrap: wrap; gap: 8px; }
.format-opt { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 16px; border: 1.5px solid var(--line); border-radius: var(--pill); background: #fff; font-size: 14px; transition: border-color .2s; }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt.is-current { border-color: var(--store-primary-dark); background: var(--tint); }
.format-name { font-weight: 700; }
.format-price { color: var(--store-primary-dark); font-weight: 700; }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ [data-preview-copy])) { display: none; }

/* التصنيف: وسوم التصفية، والشبكة والقائمة */
.toolbar-end { display: flex; align-items: center; gap: 14px; }
.view-switch { display: inline-flex; gap: 4px; }
.view-switch .icon-btn { width: 42px; height: 42px; }
.view-switch [aria-pressed="true"] { background: var(--store-primary-dark); border-color: var(--store-primary-dark); color: #fff; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 22px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 14px; border-radius: var(--pill); background: var(--tint); color: var(--store-primary-dark); font-size: 14px; font-weight: 700; }
.filter-chip .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.filter-chip:hover { background: color-mix(in srgb, var(--store-primary) 18%, #fff); }
.chips-clear { font-size: 14px; font-weight: 700; color: var(--store-primary); text-decoration: underline; text-underline-offset: 4px; }
.filter-box .rating .stars .icon { width: 14px; height: 14px; }
.book-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.is-list .book-card { flex-direction: row; align-items: center; gap: 22px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.is-list .book-media { flex: 0 0 190px; }
.is-list .book-body { flex: 1; padding-top: 0; gap: 6px; }
.is-list .book-title { font-size: 19px; }

@media (min-width: 600px) and (max-width: 991px) {
	.mini-grid > :nth-child(3) { display: none; }
}
@media (max-width: 599px) {
	.toolbar-end { width: 100%; justify-content: space-between; }
	.is-list .book-media { flex-basis: 128px; }
	.is-list .book-card { gap: 14px; padding: 8px; }
	.is-list .book-title { font-size: 16px; }
}

/* صفحة المكوّنات: الباقة والمقال */
.kit-pair { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 380px); gap: 24px; align-items: start; }
.kit-bundle { padding: 24px; border-radius: var(--radius); }
.kit-block.new-band { padding: 44px 0; }
@media (max-width: 767px) { .kit-pair { grid-template-columns: minmax(0, 1fr); } }

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