/* ==================================================================
   قالب «جمال» لمنصّة ناشر — كلّ التنسيق هنا، بلا Tailwind ولا مكتبات.
   ألوان الهويّة الخمسة متغيّراتٌ يختارها الناشر؛ وكلّ درجات الورديّ
   الفاتحة مشتقّةٌ من --store-primary بـ color-mix.
   ================================================================== */

:root {
	--store-primary: #EE2D7A;
	--store-primary-dark: #C8155F;
	--store-accent: #0C0C0C;
	--store-bg: #FFFFFF;
	--store-text: #0C0C0C;

	/* درجاتٌ مشتقّة (لا ألوان هويّة جديدة) */
	--pink-50: color-mix(in srgb, var(--store-primary) 6%, #fff);
	--pink-100: color-mix(in srgb, var(--store-primary) 12%, #fff);
	--pink-200: color-mix(in srgb, var(--store-primary) 22%, #fff);
	--pink-on-dark: color-mix(in srgb, var(--store-primary) 60%, #fff);

	/* محايدات */
	--cream: #FAF9F6;
	--muted: #5B5B5B;
	--line: #E7E2E4;
	--gold: #F2B01E;
	--yellow: #F5C84C;

	--font: "El Messiri", "Segoe UI", Tahoma, sans-serif;
	--r-sm: 8px;
	--r: 14px;
	--r-lg: 22px;
	--pill: 999px;
	--per-row: 4;
	--gap: 24px;
}

body[data-corners="sharp"] { --r-sm: 0px; --r: 0px; --r-lg: 0px; --pill: 4px; }
body[data-books-per-row="3"] { --per-row: 3; }
body[data-books-per-row="4"] { --per-row: 4; }
body[data-books-per-row="5"] { --per-row: 5; }
body[data-books-per-row="6"] { --per-row: 6; }

/* ------------------------------------------------------------------ أساسيّات */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.7;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.3; }
.icon { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }
[hidden] { display: none !important; }
.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; }
.container { width: 100%; max-width: 1338px; margin-inline: auto; padding-inline: 24px; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--store-primary-dark); outline-offset: 2px; }

.field {
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 9px 12px;
	background: #fff;
	color: var(--store-text);
	min-width: 0;
}
.field:focus { border-color: var(--store-primary-dark); outline: none; }

/* ------------------------------------------------------------------ الأزرار الكبسوليّة */
.btn-pill {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	min-height: 50px;
	padding-block: 5px;
	padding-inline: 22px 6px;
	border-radius: var(--pill);
	border: 1.5px solid var(--store-accent);
	background: var(--store-accent);
	color: #fff;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.2;
	cursor: pointer;
	white-space: nowrap;
	transition: background .2s, color .2s, border-color .2s;
}
.pill-ico {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--store-primary);
	color: #fff;
	display: grid;
	place-items: center;
	flex: none;
	transition: transform .25s;
}
.pill-ico .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.btn-pill:hover .pill-ico { transform: translateX(-4px); }
.btn-pill.sm { min-height: 42px; font-size: 15px; padding-inline: 18px 5px; gap: 10px; }
.btn-pill.sm .pill-ico { width: 31px; height: 31px; }
.btn-pill.lg { min-height: 58px; font-size: 17px; padding-inline: 28px 7px; }
.btn-pill.lg .pill-ico { width: 44px; height: 44px; }
.btn-pill.block { width: 100%; }
.btn-pill.is-pink { background: var(--store-primary-dark); border-color: var(--store-primary-dark); }
.btn-pill.is-pink .pill-ico { background: #fff; color: var(--store-primary-dark); }
.btn-pill.is-outline { background: #fff; color: var(--store-text); border-color: var(--store-text); }
.btn-pill.is-outline .pill-ico { background: var(--store-accent); color: #fff; }
.btn-pill.is-outline:hover { background: var(--store-accent); color: #fff; }
.btn-pill.is-outline:hover .pill-ico { background: var(--store-primary); }

.btn-dark {
	background: var(--store-accent);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 0 18px;
	font-weight: 600;
	cursor: pointer;
}
.btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: 0;
	padding: 8px 4px;
	color: var(--store-text);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 4px;
}
.chip {
	border: 1px solid var(--line);
	background: #fff;
	color: var(--store-text);
	border-radius: var(--pill);
	padding: 5px 18px;
	cursor: pointer;
}
.chip:is([aria-pressed="true"], [aria-selected="true"]) { background: var(--store-primary-dark); border-color: var(--store-primary-dark); color: #fff; }

/* ------------------------------------------------------------------ الرأس */
.site-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: #fff;
	border-bottom: 1px solid var(--line);
}
.hdr { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-name { font-size: 26px; font-weight: 700; color: var(--store-primary-dark); line-height: 1.1; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-list { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-list > li > a,
.nav-list > li > button {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 28px 0;
	background: none;
	border: 0;
	font-size: 17px;
	font-weight: 500;
	color: var(--store-text);
	cursor: pointer;
	transition: color .2s;
}
.nav-list > li > a:hover,
.nav-list > li > button:hover { color: var(--store-primary-dark); }
.nav-list .icon { width: 16px; height: 16px; }
.has-drop { position: relative; }
.nav-drop {
	position: absolute;
	top: calc(100% - 10px);
	inset-inline-start: -18px;
	min-width: 230px;
	list-style: none;
	margin: 0;
	padding: 10px;
	background: #fff;
	border-radius: var(--r);
	box-shadow: 0 18px 40px rgba(12, 12, 12, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.has-drop:hover .nav-drop,
.has-drop:focus-within .nav-drop,
.has-drop.open .nav-drop { opacity: 1; visibility: visible; transform: none; }
.nav-drop a { display: block; padding: 8px 14px; border-radius: var(--r-sm); transition: background .2s; }
.nav-drop a:hover { background: var(--pink-50); color: var(--store-primary-dark); }

.hdr-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.hdr-icon {
	position: relative;
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--store-text);
	cursor: pointer;
	transition: background .2s;
}
.hdr-icon:hover { background: var(--pink-50); }
.hdr-icon .icon { width: 24px; height: 24px; }
.hdr-count {
	position: absolute;
	top: 0;
	inset-inline-end: 0;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--store-primary-dark);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 19px;
	text-align: center;
}
.menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--store-primary-dark);
	color: #fff;
	place-items: center;
	cursor: pointer;
	margin-inline-start: 6px;
}
.menu-toggle .icon { width: 22px; height: 22px; }

.search-panel { display: none; border-top: 1px solid var(--line); padding-block: 14px; background: #fff; }
body.search-open .search-panel { display: block; }
.search-panel .container { display: flex; gap: 10px; align-items: center; }
.search-panel input {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: var(--pill);
	padding: 12px 20px;
	background: var(--pink-50);
}
.search-panel input:focus { outline: none; border-color: var(--store-primary-dark); }

/* الدرج الجانبيّ */
.drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 85;
	background: rgba(12, 12, 12, .45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s, visibility .3s;
}
body.drawer-open .drawer-backdrop,
body.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	right: 0;
	z-index: 90;
	width: min(340px, 86vw);
	padding: 20px;
	overflow-y: auto;
	background: #fff;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .3s, visibility .3s;
}
body.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-nav, .drawer-cats, .drawer-contact { list-style: none; padding: 0; margin: 0; }
.drawer-nav a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer-title { font-size: 16px; margin: 22px 0 10px; color: var(--store-primary-dark); }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-cats a { display: block; padding: 5px 14px; border-radius: var(--pill); background: var(--pink-50); font-size: 14px; }
.drawer-contact li { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.drawer-contact .icon { color: var(--store-primary-dark); }
.drawer .social { margin-top: 16px; }
.drawer .social a { background: var(--pink-100); color: var(--store-text); }

/* ------------------------------------------------------------------ الأقسام */
.section { padding-block: 56px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.sec-head.center { justify-content: center; text-align: center; }
.sec-title { font-size: clamp(26px, 3vw, 38px); font-weight: 700; margin: 0; }
.sec-sub { font-size: .5em; font-weight: 500; color: var(--muted); }
.row-nav { display: flex; gap: 10px; }
.row-nav .is-outline { padding-inline: 5px 18px; }
.row-nav .is-outline:hover .pill-ico { transform: translateX(4px); }

/* ------------------------------------------------------------------ الهيرو */
.hero-wrap { position: relative; background: var(--cream); overflow: hidden; }
.hero-word {
	position: absolute;
	inset-inline: 0;
	top: 8px;
	text-align: center;
	font-size: clamp(84px, 15vw, 230px);
	font-weight: 700;
	line-height: 1.05;
	white-space: nowrap;
	color: rgba(12, 12, 12, .045);
	pointer-events: none;
	user-select: none;
}
.hero-grid {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 28px;
	align-items: center;
	min-height: 640px;
}
.hero { min-width: 0; align-self: stretch; }
.slider { position: relative; height: 100%; }
.slides {
	display: flex;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
	gap: 24px;
	min-height: 640px;
}
.slide-text { align-self: center; padding-block: 70px 90px; }
.slide-eyebrow { display: block; margin-bottom: 10px; color: var(--store-primary-dark); font-size: 18px; font-weight: 500; }
.slide h1, .slide h2 { font-size: clamp(34px, 4.4vw, 64px); line-height: 1.2; margin: 0 0 18px; font-weight: 700; text-wrap: balance; }
.slide p { color: var(--muted); font-size: 17px; max-width: 450px; margin: 0 0 32px; }
.slide-media { align-self: end; display: flex; justify-content: center; }
.slide-media img { width: 100%; max-width: 620px; height: auto; }
.slider-dots { position: absolute; bottom: 30px; inset-inline-start: 0; display: flex; gap: 8px; }
.slider-dots button {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: #CFC9CB;
	cursor: pointer;
	transition: width .25s, background .25s;
}
.slider-dots button[aria-current="true"] { width: 28px; background: var(--store-primary-dark); }

.hero-card { position: relative; align-self: center; }
.hero-card a {
	display: block;
	background: #fff;
	border-radius: var(--r-lg);
	padding: 14px 14px 20px;
	box-shadow: 0 22px 50px rgba(12, 12, 12, .08);
	text-align: center;
}
.hero-card img { width: 100%; aspect-ratio: 400 / 260; object-fit: cover; border-radius: var(--r); }
.hero-card b { display: block; margin: 14px 6px 4px; font-size: 19px; }
.hero-card span { display: block; color: var(--muted); font-size: 15px; margin-inline: 6px; }
/* إن أخفى الناشر السلايدر تبقى البطاقة وحدها في الوسط */
.hero-grid:not(:has(.hero)) { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 70px; }
.hero-wrap:not(:has(.hero, .hero-card)) { display: none; }
.hero-grid:not(:has(.hero)) .hero-card { width: min(420px, 100%); margin-inline: auto; }

/* ------------------------------------------------------------------ التصنيفات */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.cat-card {
	position: relative;
	display: block;
	min-height: 340px;
	border-radius: var(--r-lg);
	overflow: hidden;
	background: var(--pink-100);
	color: #0C0C0C;
}
.cat-card:nth-child(6n+2), .cat-card:nth-child(6n+6) { grid-column: span 2; }
.cat-card img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 30% 100%;
	transition: transform .5s;
}
.cat-card:hover img { transform: scale(1.04); }
.cat-text { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 26px 28px; }
.cat-text small { font-size: 15px; color: #2B2B2B; }
.cat-text b { font-size: 28px; font-weight: 700; line-height: 1.3; }
.cat-count { font-size: 14px; color: #2B2B2B; }
.cat-cta { display: none; margin-top: 16px; }
.cat-card:nth-child(6n+2) .cat-text,
.cat-card:nth-child(6n+6) .cat-text {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 50%;
	justify-content: center;
	padding-inline: 34px;
}
.cat-card:nth-child(6n+2) .cat-text b,
.cat-card:nth-child(6n+6) .cat-text b { font-size: 34px; }
.cat-card:nth-child(6n+2) .cat-cta,
.cat-card:nth-child(6n+6) .cat-cta { display: inline-flex; }

/* ------------------------------------------------------------------ بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: var(--gap); }
.book-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-radius: var(--r);
	overflow: hidden;
	background: var(--pink-50);
}
.book-media {
	position: relative;
	aspect-ratio: 1 / 1.08;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 22px;
	background: var(--pink-100);
}
.book-cover { display: block; height: 100%; min-height: 0; }
.book-cover img {
	height: 100%;
	width: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 3px 8px 8px 3px;
	box-shadow: 0 14px 26px rgba(70, 10, 35, .22);
	transition: transform .35s;
}
.book-card:hover .book-cover img { transform: translateY(-4px); }
.book-badges { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; display: flex; gap: 6px; }
.badge {
	display: inline-block;
	padding: 2px 12px;
	border-radius: var(--pill);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.6;
}
.badge-new, .badge-dark { background: var(--store-accent); color: #fff; }
.badge-sale { background: var(--yellow); color: #0C0C0C; }
/* المفضّلة والنظرة السريعة تطفوان فوق الغلاف ولا تحجزان مكانًا: عند التحويم في الحاسوب، ودائمًا في اللمس */
.book-tools {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.book-wish,
.book-quick {
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--store-text);
	cursor: pointer;
	box-shadow: 0 6px 14px rgba(70, 10, 35, .12);
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity .25s, transform .25s, color .2s, background .2s;
}
.book-quick { transition-delay: .04s; }
.book-wish .icon, .book-quick .icon { width: 19px; height: 19px; }
.book-wish:hover, .book-quick:hover { color: var(--store-primary-dark); }
[data-action="wishlist"][aria-pressed="true"] { color: var(--store-primary-dark); }
[data-action="wishlist"][aria-pressed="true"] .icon { fill: currentColor; }
.book-card:hover .book-tools > *,
.book-card:focus-within .book-tools > * { opacity: 1; transform: none; }
@media (hover: none) {
	.book-tools > * { opacity: 1; transform: none; }
}
/* صفّ السعر: يُدفع وحده إلى أسفل البطاقة لتتساوى الصفوف */
.price-row { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.price-row .price { margin-top: 0; min-width: 0; }
/* زرّ السلّة بشكله الأصليّ في القالب: كبسولةٌ داكنة «أضف إلى السلّة» أسفل الغلاف، ظاهرةٌ دائمًا (لا عند التحويم)،
   وتصير دائرةً بالأيقونة وحدها في زاوية الغلاف حين يضيق (الجوّال وعرض القائمة) */
.book-media { container-type: inline-size; }
.book-cart {
	position: absolute;
	bottom: 16px;
	left: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 9px 18px;
	border: 0;
	border-radius: var(--pill);
	background: var(--store-accent);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(12, 12, 12, .18);
	transform: translateX(-50%);
	transition: transform .25s, box-shadow .25s;
}
.book-cart .icon { width: 18px; height: 18px; flex: none; }
.book-cart:hover { transform: translate(-50%, -2px); box-shadow: 0 12px 22px rgba(12, 12, 12, .24); }
.book-cart:disabled { background: #E9E2E5; color: #5E5559; box-shadow: none; cursor: not-allowed; transform: translateX(-50%); }
@container (max-width: 219px) {
	.book-cart { left: auto; inset-inline-start: 10px; bottom: 10px; width: 40px; height: 40px; padding: 0; transform: none; }
	.book-cart:hover, .book-cart:disabled { transform: none; }
	.book-cart span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.type-dot {
	width: 34px;
	height: 34px;
	display: inline-grid;
	place-items: center;
	flex: none;
	border-radius: 50%;
	color: #fff;
	border: 2px solid #fff;
}
.type-dot .icon { width: 17px; height: 17px; }
.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; }
.book-media .type-dot { position: absolute; bottom: 14px; inset-inline-end: 14px; z-index: 2; }
.stock-band {
	position: absolute;
	inset-inline: 0;
	top: 50%;
	z-index: 1;
	transform: translateY(-50%);
	padding: 7px;
	background: rgba(12, 12, 12, .84);
	color: #fff;
	text-align: center;
	font-weight: 700;
}
.book-card.is-out .book-cover img { opacity: .5; filter: grayscale(.5); }
.book-body { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 16px 18px 18px; }
.book-title { margin: 0; font-size: 18px; font-weight: 700; 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-dark); }
.book-author { margin: 0; color: var(--muted); font-size: 14px; }
.book-rate { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.rating { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); }
.rating > .icon { width: 17px; height: 17px; }
.rating b { color: var(--store-text); font-weight: 600; }
.rating-count { color: var(--muted); font-size: 14px; }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars .icon { width: 17px; height: 17px; }
.stars .off { color: #DCD3D7; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 18px; font-weight: 700; }
.price del { color: var(--muted); font-size: 14px; font-weight: 500; }
.price-lg { font-size: 28px; margin: 0; }
.price-lg del { font-size: 18px; }

/* شكل البطاقة: مؤطَّرة */
body[data-card-style="framed"] .book-card { background: #fff; border: 1px solid var(--line); }
body[data-card-style="framed"] .book-media { background: var(--pink-50); margin: 8px; border-radius: calc(var(--r) - 4px); }
/* شكل البطاقة: بسيطة */
body[data-card-style="minimal"] .book-card { background: transparent; overflow: visible; border-radius: 0; }
body[data-card-style="minimal"] .book-media { background: transparent; padding: 6px; }
body[data-card-style="minimal"] .book-body { padding: 12px 2px 0; }
/* في الشريط الورديّ تصير لوحة النصّ بيضاء كما في المرجع */
body[data-card-style="classic"] .band-pink .book-card { background: #fff; }

/* الأكثر مبيعًا: الكتاب الأوّل بطاقةٌ كبيرة */
.book-grid.best-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.best-grid > .book-card:first-child { grid-row: span 2; }
.best-grid > .book-card:first-child .book-media { flex: 1; aspect-ratio: auto; min-height: 420px; }
.best-grid > .book-card:first-child .book-cover { position: absolute; inset: 44px; display: flex; justify-content: center; height: auto; }
.best-grid > .book-card:first-child .book-cover img { height: 100%; }
.best-grid > .book-card:first-child .book-body { flex: none; padding: 22px 26px 26px; }
.best-grid > .book-card:first-child .book-title { font-size: 28px; }
.best-grid > .book-card:first-child .price { font-size: 22px; }

/* ------------------------------------------------------------------ البانر العريض */
.band-pink { background: var(--pink-50); padding-block: 8px 40px; }
.wide-banner {
	position: relative;
	display: block;
	min-height: 420px;
	border-radius: var(--r-lg);
	overflow: hidden;
	background: var(--store-accent);
}
.wide-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.wide-panel {
	position: absolute;
	inset-block: 0;
	left: 0;
	width: 56%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 12px;
	padding-block: 40px;
	padding-inline: calc(12% + 36px) 48px;
	background: var(--store-accent);
	color: #fff;
	clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
}
.wide-panel small { font-size: 16px; color: #E6E6E6; }
.wide-panel b { font-size: clamp(26px, 3vw, 40px); line-height: 1.25; font-weight: 700; }
.wide-panel mark { background: none; color: var(--pink-on-dark); }
.wide-text { color: #D6D6D6; max-width: 460px; }
.wide-panel .btn-pill { margin-top: 10px; }

/* ------------------------------------------------------------------ شريط الثقة */
.trust-section { background: linear-gradient(to bottom, var(--pink-50) 50%, transparent 50%); padding-bottom: 24px; }
.trust-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.trust-card {
	background: #fff;
	border-radius: var(--r-lg);
	padding: 32px 26px;
	text-align: center;
	box-shadow: 0 12px 34px rgba(12, 12, 12, .07);
}
.trust-icon { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--store-accent); color: #fff; }
.trust-icon .icon { width: 28px; height: 28px; }
.trust-card h3 { margin: 0 0 6px; font-size: 21px; }
.trust-card p { margin: 0; color: var(--muted); font-size: 15px; }
body[data-show-trust-bar="false"] .trust-section { display: none; }

/* ------------------------------------------------------------------ آراء القرّاء */
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.review-card {
	--rc-bg: var(--pink-100);
	--rc-img: none;
	--rc-fg: var(--store-text);
	--rc-small: var(--muted);
	--rc-quote: var(--store-primary-dark);
	--rc-av-bg: var(--store-primary-dark);
	--rc-av-fg: #fff;
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-height: 300px;
	padding: 30px 28px;
	border-radius: var(--r-lg);
	background-color: var(--rc-bg);
	background-image: var(--rc-img);
	color: var(--rc-fg);
}
/* البطاقات الداكنة بالتناوب: الأولى والثالثة والخامسة في ثلاثة أعمدة أو عمود واحد، وعلى شكل رقعة الشطرنج في عمودين */
@media (min-width: 981px), (max-width: 760px) {
	.review-card:nth-child(odd) {
		--rc-bg: var(--store-accent);
		--rc-img: radial-gradient(circle at 85% 12%, color-mix(in srgb, var(--store-primary) 32%, transparent), transparent 58%);
		--rc-fg: #fff;
		--rc-small: #CFCFCF;
		--rc-quote: var(--pink-on-dark);
		--rc-av-bg: #fff;
		--rc-av-fg: var(--store-accent);
	}
}
@media (min-width: 761px) and (max-width: 980px) {
	.review-card:nth-child(4n+1), .review-card:nth-child(4n+4) {
		--rc-bg: var(--store-accent);
		--rc-img: radial-gradient(circle at 85% 12%, color-mix(in srgb, var(--store-primary) 32%, transparent), transparent 58%);
		--rc-fg: #fff;
		--rc-small: #CFCFCF;
		--rc-quote: var(--pink-on-dark);
		--rc-av-bg: #fff;
		--rc-av-fg: var(--store-accent);
	}
}
.review-quote .icon { width: 36px; height: 36px; fill: var(--rc-quote, var(--store-primary-dark)); stroke: none; }
.review-card p { flex: 1; margin: 0; font-size: 17px; line-height: 1.85; }
.review-who { display: flex; align-items: center; gap: 12px; }
.review-who b { display: block; font-size: 16px; }
.review-who small { color: var(--rc-small, var(--muted)); font-size: 13px; }
.review-who .rating { margin-inline-start: auto; }
.review-avatar {
	width: 44px;
	height: 44px;
	flex: none;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--rc-av-bg, var(--store-primary-dark));
	color: var(--rc-av-fg, #fff);
	font-weight: 700;
}
body[data-show-reviews="false"] .reviews-section,
body[data-show-reviews="false"] .tab-reviews { display: none; }

/* ------------------------------------------------------------------ المؤلّفون */
.author-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.author-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--pink-50); }
.author-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--pink-100); }
.author-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transition: transform .5s; }
.author-card:hover .author-media img { transform: scale(1.05); }
.author-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 24px 24px; }
.author-tag { padding: 2px 14px; border-radius: var(--pill); background: #fff; font-size: 14px; }
.author-body b { font-size: 22px; line-height: 1.35; }
.author-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.author-meta .icon { color: var(--store-primary-dark); }

/* ------------------------------------------------------------------ شاهدتَه مؤخّرًا */
.recent-row {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 5 * 20px) / 6);
	gap: 20px;
	overflow-x: auto;
	padding-bottom: 8px;
	scrollbar-width: thin;
}
.recent-item { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.recent-cover { display: flex; justify-content: center; padding: 16px; border-radius: var(--r); background: var(--pink-100); }
.recent-cover img { width: 68%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px 6px 6px 2px; box-shadow: 0 10px 18px rgba(70, 10, 35, .2); }
.recent-body b { display: block; font-size: 15px; line-height: 1.4; }
.recent-body .price { font-size: 15px; margin-top: 2px; }
.recent-body .price del { font-size: 13px; }

/* ------------------------------------------------------------------ التذييل */
.site-footer {
	margin-top: 40px;
	background-color: var(--store-accent);
	background-image:
		radial-gradient(circle at 8% 22%, rgba(255, 255, 255, .045) 0 130px, transparent 131px),
		radial-gradient(circle at 62% 96%, rgba(255, 255, 255, .035) 0 96px, transparent 97px),
		radial-gradient(circle at 96% 70%, color-mix(in srgb, var(--store-primary) 14%, transparent) 0 70px, transparent 71px);
	color: #D0D0D0;
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; padding-block: 64px 48px; }
.footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-col h3 { position: relative; margin: 0 0 22px; padding-bottom: 12px; color: #fff; font-size: 19px; }
.footer-col h3::after {
	content: "";
	position: absolute;
	bottom: 0;
	inset-inline-start: 0;
	width: 56px;
	height: 2px;
	background: linear-gradient(to left, var(--store-primary) 45%, rgba(255, 255, 255, .55) 45%);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-col a { display: inline-flex; align-items: center; gap: 6px; color: #D0D0D0; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-col a .icon { width: 14px; height: 14px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--pink-on-dark); }
.footer-about { border-inline-start: 1px solid rgba(255, 255, 255, .14); padding-inline-start: 48px; }
.footer-about .brand-name { color: var(--pink-on-dark); }
.footer-about p { color: #C9C9C9; margin: 16px 0 20px; }
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-sm); background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s; }
.social a:hover { background: var(--store-primary-dark); color: #fff; }
.social .icon { width: 18px; height: 18px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 14px; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-bottom a { color: #D0D0D0; }
.footer-bottom a:hover { color: #fff; }

/* ------------------------------------------------------------------ رأس الصفحات الداخليّة */
.page-hero { padding-top: 20px; }
.ph-box {
	position: relative;
	padding: 72px 24px;
	border-radius: var(--r-lg);
	background: var(--pink-100);
	text-align: center;
	overflow: hidden;
}
.ph-box h1 { position: relative; margin: 0 0 10px; font-size: clamp(34px, 5vw, 60px); font-weight: 700; }
.ph-lead { position: relative; max-width: 620px; margin: 0 auto 14px; color: var(--muted); }
.ph-decor { position: absolute; inset: 0; pointer-events: none; }
.ph-decor .icon { position: absolute; fill: color-mix(in srgb, var(--store-primary) 30%, #fff); stroke: none; }
.ph-decor .icon:nth-child(1) { width: 40px; height: 40px; top: 22%; right: 16%; }
.ph-decor .icon:nth-child(2) { width: 26px; height: 26px; bottom: 18%; left: 22%; }
.ph-decor .icon:nth-child(3) { width: 18px; height: 18px; top: 18%; left: 12%; }
.breadcrumb { position: relative; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; font-size: 15px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before {
	content: "";
	width: 7px;
	height: 7px;
	border-left: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(225deg);
	opacity: .7;
}
.breadcrumb a:hover { color: var(--store-primary-dark); }
.breadcrumb .icon { width: 18px; height: 18px; }
.breadcrumb [aria-current] { color: var(--store-primary-dark); font-weight: 600; }
.page-hero.is-slim .ph-box { padding: 26px 32px; text-align: start; }
.page-hero.is-slim .breadcrumb { justify-content: flex-start; }

/* صفحة المؤلّف */
.author-hero .ph-box { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; align-items: center; padding: 52px 56px; text-align: start; }
.author-photo { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; border: 6px solid #fff; position: relative; }
.author-info { position: relative; }
.author-info .breadcrumb { justify-content: flex-start; margin-bottom: 6px; }
.author-info h1 { margin: 0 0 12px; }
.author-stats { display: flex; flex-wrap: wrap; gap: 12px 30px; list-style: none; padding: 0; margin: 0 0 16px; }
.author-stats b { display: block; font-size: 26px; line-height: 1.2; }
.author-stats span { color: var(--muted); font-size: 14px; }
.prose p { margin: 0 0 12px; color: #3B3B3B; line-height: 1.9; }

/* ------------------------------------------------------------------ صفحة التصنيف */
.sub-section { padding-block: 32px 0; }
.sub-section + .section { padding-top: 36px; }
.sub-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.sub-chip {
	flex: none;
	display: flex;
	align-items: center;
	gap: 12px;
	padding-block: 6px;
	padding-inline: 6px 22px;
	border: 1px solid var(--line);
	border-radius: var(--pill);
	background: #fff;
	transition: border-color .2s;
}
.sub-chip:hover { border-color: var(--store-primary-dark); }
.sub-chip img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.sub-chip b { display: block; font-size: 16px; line-height: 1.3; }
.sub-chip small { color: var(--muted); font-size: 13px; }

.listing { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 14px;
	border-radius: var(--r);
	background: #fff;
	box-shadow: 0 6px 30px rgba(12, 12, 12, .07);
}
.filters-head { display: none; align-items: center; justify-content: space-between; }
.filters-head h2 { margin: 0; font-size: 20px; }
.filter-box { padding: 20px; border-radius: var(--r); background: var(--pink-100); }
.filter-box h3 { margin: 0 0 14px; padding-inline-start: 12px; border-inline-start: 3px solid var(--store-primary-dark); font-size: 18px; line-height: 1.2; }
.filter-search { display: flex; gap: 6px; padding: 5px; border-radius: 10px; background: #fff; }
.filter-search input { flex: 1; min-width: 0; border: 0; padding: 6px 10px; background: none; }
.filter-search input:focus { outline: none; }
.filter-search button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: var(--store-primary-dark); color: #fff; cursor: pointer; }
.price-range { display: flex; align-items: flex-end; gap: 8px; }
.price-range label { flex: 1; }
.price-range label span { display: block; font-size: 13px; color: #444; }
.price-range .field { width: 100%; }
.filter-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.filter-cats a { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.filter-cats a:hover { color: var(--store-primary-dark); }
.filter-cats .icon { width: 14px; height: 14px; }
.count { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.check { display: flex; align-items: center; gap: 8px; margin-block: 8px; font-size: 15px; cursor: pointer; }
.check input, .star-input input { accent-color: var(--store-primary-dark); }
.check input { width: 17px; height: 17px; margin: 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.toolbar p { margin: 0; color: var(--muted); }
.toolbar b { color: var(--store-text); }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.filters-toggle { display: none; }
.book-grid.listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.pagination > a, .pagination > span {
	min-width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	font-weight: 600;
}
.pagination > a:hover { background: var(--pink-100); }
.pagination > a[aria-current="page"] { background: var(--store-primary-dark); color: #fff; }
.pagination .pg-step { display: inline-flex; gap: 6px; padding: 0 20px; border-radius: var(--pill); background: var(--store-accent); color: #fff; }
.pagination .pg-step:hover { background: var(--store-primary-dark); }
.pagination .icon { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ صفحة الكتاب */
.pdp-section { padding-top: 44px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.pdp > .gallery { position: sticky; top: 108px; }
.gallery-main {
	position: relative;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 50px;
	border-radius: var(--r-lg);
	background: var(--pink-100);
}
.gallery-main img { height: 100%; width: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px 10px 10px 4px; box-shadow: 0 26px 44px rgba(70, 10, 35, .26); }
.gallery-main .stock { position: absolute; top: 18px; inset-inline-end: 18px; }
.gallery-main .type-dot { position: absolute; bottom: 18px; inset-inline-end: 18px; width: 46px; height: 46px; }
.gallery-main .type-dot .icon { width: 22px; height: 22px; }
.stock { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 6px; background: var(--yellow); color: #0C0C0C; font-size: 13px; font-weight: 700; }
.stock .icon { width: 15px; height: 15px; stroke-width: 2.4; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.thumbs button { aspect-ratio: 1; display: flex; justify-content: center; padding: 10px; border: 2px solid transparent; border-radius: var(--r); background: var(--pink-100); cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--store-primary-dark); }
.thumbs img { height: 100%; width: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.pdp-publisher { margin: 0 0 4px; color: var(--muted); font-size: 15px; }
.pdp-info h1 { margin: 0 0 6px; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.25; }
.pdp-author { margin: 0; color: var(--muted); }
.pdp-author a { color: var(--store-primary-dark); font-weight: 600; }
.pdp-price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 14px 0 16px; }
.pdp-lead { margin: 0 0 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--muted); line-height: 1.9; }
.pdp-tags { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.type-label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.type-label .type-dot { width: 28px; height: 28px; }
.type-label .type-dot .icon { width: 14px; height: 14px; }
.pdp-meta-line { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: #333; }
.pdp-meta-line > .icon { color: var(--store-primary-dark); }
.pdp-buy { display: flex; flex-direction: column; gap: 14px; margin-block: 18px 26px; }
.pdp-buy .label { display: block; margin-bottom: -6px; font-weight: 600; }
.qty { display: inline-flex; align-items: center; padding: 4px; border: 1px solid var(--line); border-radius: var(--pill); background: #fff; }
.qty button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.qty button:hover { background: var(--pink-100); }
.qty input { width: 44px; border: 0; background: none; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.wish-round { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--store-text); cursor: pointer; }
.wish-round .icon { width: 22px; height: 22px; }
.pdp-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pdp-facts li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; font-size: 15px; }
.pdp-facts span { color: var(--muted); }
.pdp-facts b { font-weight: 600; }

.pdp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.pdp-tabs a { margin-bottom: -1px; padding: 10px 20px; border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; color: var(--muted); font-size: 18px; }
.pdp-tabs a[aria-current="true"] { border-color: var(--line); background: #fff; color: var(--store-text); font-weight: 600; }
.pdp-panels { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; }
.pdp-panel h2 { margin: 0 0 14px; font-size: 24px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 11px 4px; border-bottom: 1px solid var(--line); text-align: start; font-size: 15px; }
.spec-table th { width: 40%; color: var(--muted); font-weight: 500; }

.reviews-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 48px; align-items: start; }
.reviews-side h2 { margin: 0 0 16px; font-size: 24px; }
.reviews-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.reviews-summary strong { font-size: 46px; line-height: 1; }
.rating-bars { list-style: none; margin: 16px 0 24px; padding: 0; display: grid; gap: 8px; }
.rating-bars li { display: grid; grid-template-columns: 64px minmax(0, 1fr) 40px; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.bar { height: 8px; border-radius: 6px; overflow: hidden; background: var(--pink-100); }
.bar span { display: block; height: 100%; background: var(--gold); }
.review-form { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 22px; border-radius: var(--r-lg); background: var(--pink-50); }
.review-form h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 19px; }
.review-form p { margin: 0; color: var(--muted); font-size: 15px; }
.review-form textarea { width: 100%; resize: vertical; }
.star-field { margin: 0; padding: 0; border: 0; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { color: #DCD3D7; cursor: pointer; }
.star-input label .icon { width: 28px; height: 28px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary-dark); border-radius: 4px; }
.review-list { display: grid; gap: 16px; }
.review-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.review-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.review-top small { color: var(--muted); }
.review-item p { margin: 6px 0 0; color: #3B3B3B; }

/* شريط «قد يعجبك» المتحرّك */
.book-grid.book-track {
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--per-row) - 1) * var(--gap)) / var(--per-row));
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.book-track::-webkit-scrollbar { display: none; }
.book-track > * { scroll-snap-align: start; }

/* ------------------------------------------------------------------ السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.cart-note { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 16px; border-radius: var(--r); background: var(--pink-50); font-size: 15px; }
.cart-note .icon { color: var(--store-primary-dark); }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { padding: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 500; text-align: start; }
.cart-table td { padding: 16px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-book { display: flex; align-items: center; gap: 14px; }
.cart-thumb { width: 84px; flex: none; padding: 10px; border-radius: var(--r); background: var(--pink-100); }
.cart-thumb img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.cart-book h3 { margin: 0; font-size: 17px; }
.cart-book p { margin: 2px 0 6px; color: var(--muted); font-size: 14px; }
.cart-book .type-label { font-size: 13px; }
.cart-book .type-label .type-dot { width: 24px; height: 24px; }
.cart-table .price { margin: 0; font-size: 16px; }
.cart-remove { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; }
.cart-remove:hover { color: var(--store-primary-dark); border-color: var(--store-primary-dark); }
.cart-under { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.summary { position: sticky; top: 110px; padding: 28px; border-radius: var(--r-lg); background: var(--pink-100); }
.summary h2 { margin: 0 0 18px; font-size: 24px; }
.coupon { display: flex; gap: 8px; margin-bottom: 12px; }
.coupon .field { flex: 1; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: #fff; font-size: 14px; }
.coupon-applied button { border: 0; background: none; color: var(--store-primary-dark); cursor: pointer; text-decoration: underline; }
.summary-row { display: flex; justify-content: space-between; padding-block: 10px; border-bottom: 1px dashed color-mix(in srgb, var(--store-primary) 30%, #fff); }
.summary-total { margin-bottom: 16px; border-bottom: 0; font-size: 20px; font-weight: 700; }
.summary-perks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; color: #3B3B3B; font-size: 14px; }
.summary-perks li { display: flex; align-items: center; gap: 8px; }
.summary-perks .icon { color: var(--store-primary-dark); }
.empty-cart { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px; text-align: center; }
.empty-cart h2, .empty-cart h3 { margin: 0; font-size: 24px; }
.empty-cart p { margin: 0 0 8px; color: var(--muted); }
.empty-icon { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; background: var(--pink-100); color: var(--store-primary-dark); }
.empty-icon .icon { width: 36px; height: 36px; }

/* ------------------------------------------------------------------ 404 */
.nf-wrap { padding-block: 40px 10px; }
.nf { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 760px; margin-inline: auto; padding: 90px 0 40px; text-align: center; }
.nf-code { position: absolute; top: -10px; inset-inline: 0; font-size: clamp(150px, 24vw, 300px); font-weight: 700; line-height: 1; color: rgba(12, 12, 12, .05); pointer-events: none; }
.nf > *:not(.nf-code) { position: relative; }
.nf h1 { margin: 0; font-size: clamp(28px, 4vw, 44px); }
.nf p { margin: 0; color: var(--muted); }
.nf-search { display: flex; gap: 8px; width: min(540px, 100%); margin-block: 8px; }
.nf-search input { flex: 1; min-width: 0; padding: 12px 20px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--pink-50); }

/* ------------------------------------------------------------------ components.html */
.kit .container > .kit-title:first-child { margin-top: 0; }
.kit-title { margin: 40px 0 16px; font-size: 20px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 16px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.swatch span { width: 86px; height: 56px; border: 1px solid var(--line); border-radius: 12px; }
.swatch code { font-size: 12px; }
.kit-state { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.kit-state .book-card { flex: 1; }
.kit-label { color: var(--muted); font-size: 14px; }
.kit-demo-narrow { max-width: 560px; }
.kit + .trust-section { background: none; }

/* ------------------------------------------------------------------ حركة */
/* ---------------------------------------------------------------- تبويبات التصنيفات في «الأكثر مبيعًا» (الملحق 8) */
.best-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.best-tabs .chip { min-height: 40px; font-weight: 600; transition: background .2s, color .2s, border-color .2s; }
.best-tabs .chip:hover { border-color: var(--store-primary-dark); }
.best-tabs--demo { margin-inline-start: 0; }
@media (max-width: 767px) {
	.best-tabs { order: 3; width: 100%; margin-inline-start: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
	.best-tabs::-webkit-scrollbar { display: none; }
	.best-tabs .chip { flex: 0 0 auto; min-height: 36px; padding-inline: 14px; font-size: 14px; }
}

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

/* ------------------------------------------------------------------ العروض الأصغر */
@media (max-width: 1180px) {
	.main-nav { display: none; }
	.menu-toggle { display: grid; }
	.hdr { min-height: 72px; }
	.hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.hero-card { padding-bottom: 36px; }
	.hero-card a { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: 1fr 1fr; column-gap: 20px; align-items: center; text-align: start; padding: 12px; }
	.hero-card img { grid-row: span 2; }
	.hero-card b { margin: 0; align-self: end; }
	.hero-card span { margin: 0; align-self: start; }
	.book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.book-grid.book-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
	.footer-grid { grid-template-columns: minmax(0, 1fr); }
	.footer-about { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 32px; }
}
@media (max-width: 980px) {
	:root { --gap: 18px; }
	.section { padding-block: 44px; }
	.cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
	.cat-card { min-height: 280px; }
	.cat-card:nth-child(6n+2) .cat-text, .cat-card:nth-child(6n+6) .cat-text { width: 56%; }
	.book-grid.best-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.best-grid > .book-card:first-child { grid-column: span 2; grid-row: auto; }
	.best-grid > .book-card:first-child .book-media { min-height: 380px; }
	.review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.recent-row { grid-auto-columns: calc((100% - 3 * 20px) / 4); }
	.listing { grid-template-columns: minmax(0, 1fr); }
	.filters {
		position: fixed;
		top: 0;
		bottom: 0;
		right: 0;
		z-index: 90;
		width: min(340px, 88vw);
		overflow-y: auto;
		border-radius: 0;
		transform: translateX(100%);
		visibility: hidden;
		transition: transform .3s, visibility .3s;
	}
	body.filters-open .filters { transform: none; visibility: visible; }
	.filters-head { display: flex; }
	.filters-toggle { display: inline-flex; }
	.pdp, .pdp-panels, .reviews-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.gallery { max-width: 560px; width: 100%; margin-inline: auto; }
	.pdp > .gallery { position: static; }
	.cart-layout { grid-template-columns: minmax(0, 1fr); }
	.summary { position: static; }
	.author-hero .ph-box { grid-template-columns: 160px minmax(0, 1fr); gap: 28px; padding: 40px 32px; }
	.author-photo { width: 160px; height: 160px; }
}
@media (max-width: 760px) {
	.container { padding-inline: 16px; }
	.slide { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 0; }
	.slide-text { padding-block: 44px 8px; }
	.slide-media img { max-width: 360px; }
	.slider-dots { position: static; justify-content: center; padding-block: 14px 4px; }
	.hero-word { top: auto; bottom: 34%; }
	.book-grid, .book-grid.listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.book-grid.book-track { grid-auto-columns: calc((100% - var(--gap)) / 2); }
	.book-media { padding: 14px; }
	.book-body { padding: 12px 12px 14px; }
	.book-title { font-size: 16px; }
	.price { font-size: 16px; }
	.book-badges { top: 10px; inset-inline-start: 10px; }
	.badge { font-size: 12px; padding: 1px 9px; }
	.book-media .type-dot { width: 30px; height: 30px; bottom: 10px; inset-inline-end: 10px; }
	.book-tools { top: 8px; inset-inline-end: 8px; gap: 6px; }
	.book-wish, .book-quick { width: 40px; height: 40px; }
	.cat-card { min-height: 230px; }
	.cat-text { padding: 18px; }
	.cat-text b { font-size: 21px; }
	.cat-card:nth-child(6n+2) .cat-text b, .cat-card:nth-child(6n+6) .cat-text b { font-size: 24px; }
	.cat-card:nth-child(6n+2) .cat-text, .cat-card:nth-child(6n+6) .cat-text { padding-inline: 20px; width: 60%; }
	.wide-banner { min-height: 0; display: flex; flex-direction: column; }
	.wide-banner img { position: static; height: 210px; }
	.wide-panel { position: static; width: auto; clip-path: none; padding: 28px 24px 30px; }
	.trust-bar, .review-grid, .author-grid { grid-template-columns: minmax(0, 1fr); }
	.trust-section { background: var(--pink-50); padding-bottom: 40px; }
	.review-card { min-height: 0; }
	.recent-row { grid-auto-columns: 40%; }
	.footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-contact { grid-column: span 2; }
	.footer-bottom { flex-direction: column; align-items: flex-start; }
	.ph-box { padding: 48px 18px; }
	.author-hero .ph-box { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 36px 20px; }
	.author-info .breadcrumb, .author-stats { justify-content: center; }
	.gallery-main { padding: 30px; }
	.pdp-facts li { grid-template-columns: 110px minmax(0, 1fr); }
	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; }
	.cart-table tr { position: relative; margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); }
	.cart-table td { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border: 0; }
	.cart-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 14px; }
	.cart-table td:first-child { display: block; padding-inline-end: 44px; }
	.cart-table .cell-remove { position: absolute; top: 12px; inset-inline-end: 12px; padding: 0; }
	.sec-head .btn-pill { min-height: 42px; font-size: 15px; padding-inline: 16px 5px; }
	.sec-head .btn-pill .pill-ico { width: 31px; height: 31px; }
	.row-nav .btn-pill { padding-inline: 14px 4px; }
	.row-nav .is-outline { padding-inline: 4px 14px; }
}
@media (max-width: 520px) {
	.hdr { gap: 10px; }
	.hide-sm { display: none; }
	.brand-name { font-size: 21px; }
	.brand img { width: 36px; height: 36px; }
	.hdr-icon { width: 38px; height: 38px; }
	.hero-card a { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; text-align: center; }
	.hero-card img { grid-row: auto; }
	.hero-card b { margin-top: 12px; }
	.cat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
	.cat-card:nth-child(6n+2) .cat-text, .cat-card:nth-child(6n+6) .cat-text { width: 64%; }
	.cat-card:not(:nth-child(6n+2)):not(:nth-child(6n+6)) { min-height: 240px; }
	.cat-card:not(:nth-child(6n+2)):not(:nth-child(6n+6)) .cat-text b { font-size: 18px; }
	.cat-text small { font-size: 13px; }
	.search-panel .btn-pill { padding-inline: 14px 4px; }
	.nf-search { flex-direction: column; }
	.pdp-cta .btn-pill { flex: 1; }
}

/* ==================================================================
   الإصدار الثاني: أقسام الرئيسيّة الجديدة وضبط الجوّال
   ================================================================== */

/* شريط الثقة: صفٌّ مدمج يجلس على حدّ الهيرو الكريميّ */
.trust-section { background: linear-gradient(to bottom, var(--cream) 50%, var(--store-bg) 50%); padding: 0; }
.trust-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trust-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; text-align: start; box-shadow: 0 12px 30px rgba(70, 10, 35, .08); }
.trust-icon { width: 48px; height: 48px; margin: 0; }
.trust-icon .icon { width: 22px; height: 22px; }
.trust-card h3 { margin: 0 0 2px; font-size: 17px; }
.trust-card p { font-size: 14px; line-height: 1.5; }

/* عروض بعدّادٍ واحد: لوحةٌ داكنة بتوهّجٍ ورديّ كبطاقات الآراء */
.deal-box {
	position: relative;
	padding: 40px;
	border-radius: var(--r-lg);
	background-color: var(--store-accent);
	background-image:
		radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--store-primary) 36%, transparent), transparent 52%),
		radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--store-primary) 20%, transparent), transparent 44%);
	color: #fff;
}
.deal-head { align-items: flex-end; }
.deal-box .sec-title { color: #fff; }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--pink-on-dark); font-weight: 600; }
.deal-kicker .icon { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.deal-sub { margin: 6px 0 0; color: #D6D6D6; }
.countdown { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.cd-label { margin-inline-end: 4px; color: #D6D6D6; font-size: 15px; }
.cd-unit { width: 62px; height: 62px; display: grid; place-content: center; border-radius: 50%; background: #fff; color: var(--store-text); text-align: center; line-height: 1.15; }
.cd-unit b { font-size: 21px; color: var(--store-primary-dark); }
.cd-unit small { font-size: 11px; color: var(--muted); }
.deal-box .row-nav .is-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.deal-box .row-nav .is-outline .pill-ico { background: #fff; color: var(--store-accent); }
.deal-box .row-nav .is-outline:hover { background: rgba(255, 255, 255, .12); }
.deal-box .book-card { background: #fff; color: var(--store-text); }
body[data-card-style="minimal"] .deal-box .book-card { border-radius: var(--r); overflow: hidden; }
body[data-card-style="minimal"] .deal-box .book-body { padding: 12px 14px 14px; }

/* كتاب الأسبوع: الغلاف كبيرًا في قوسٍ ورديّ، وخلفه الكلمة الضخمة الباهتة كاسم المتجر في الهيرو */
.feature-wrap { position: relative; overflow: hidden; padding-block: 60px 64px; background: var(--cream); }
.feature-word {
	position: absolute;
	inset-inline: 0;
	top: 12px;
	text-align: center;
	font-size: clamp(64px, 12vw, 190px);
	font-weight: 700;
	line-height: 1.05;
	white-space: nowrap;
	color: rgba(12, 12, 12, .045);
	pointer-events: none;
	user-select: none;
}
.feature-wrap .sec-head { position: relative; }
.feature-items > .feature-book ~ .feature-book { display: none; }
.feature-book { position: relative; display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 56px; align-items: center; max-width: 1060px; margin-inline: auto; }
.feature-media { position: relative; display: flex; justify-content: center; padding: 46px 52px 34px; }
.feature-media::before { content: ""; position: absolute; inset: 0 18px; border-radius: 999px 999px var(--r-lg) var(--r-lg); background: var(--pink-100); }
body[data-corners="sharp"] .feature-media::before { border-radius: 0; }
.feature-cover { position: relative; display: block; width: 100%; }
.feature-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px 10px 10px 4px; box-shadow: 0 26px 44px rgba(70, 10, 35, .26); }
.feature-media .type-dot { position: absolute; bottom: 14px; inset-inline-end: 34px; width: 46px; height: 46px; }
.feature-media .type-dot .icon { width: 22px; height: 22px; }
.feature-meta { margin: 0 0 6px; color: var(--store-primary-dark); font-weight: 600; }
.feature-title { margin: 0 0 4px; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.2; }
.feature-title a:hover { color: var(--store-primary-dark); }
.feature-author { margin: 0 0 10px; color: var(--muted); }
.feature-author a { color: var(--store-primary-dark); font-weight: 600; }
.feature-book .book-rate { margin-bottom: 14px; }
.feature-desc p { margin: 0 0 10px; color: #3B3B3B; line-height: 1.9; }
.feature-buy { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.feature-buy .price { margin: 0 0 0 8px; }

/* المؤلّفون في شريطٍ ورديّ ببطاقاتٍ بيضاء، فلا يشبهون المقالات بعدهم */
.section[data-region="home_authors"] { background: var(--pink-50); }
.section[data-region="home_authors"] .author-card { background: #fff; }

/* من المدوّنة: مقالٌ أوّل كبير، ومقالان أفقيّان بجانبه */
.post-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: var(--gap); }
.post-card { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--pink-50); }
.post-grid > .post-card:first-child { grid-row: span 2; }
.post-grid > .post-card:not(:first-child) { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
.post-grid > .post-card:not(:first-child) .post-media { aspect-ratio: auto; height: 100%; }
.post-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--pink-100); }
.post-media img { width: 100%; height: 100%; 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: 8px; padding: 20px 24px 24px; }
.post-date { padding: 2px 14px; border-radius: var(--pill); background: #fff; font-size: 14px; }
.post-title { margin: 0; font-size: 20px; line-height: 1.45; }
.post-grid > .post-card:first-child .post-title { font-size: 26px; }
.post-title a:hover { color: var(--store-primary-dark); }
.post-excerpt { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }

/* النشرة البريديّة */
.newsletter { padding-block: 8px 0; }
.nl-box { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 32px; align-items: center; padding: 44px 48px; border-radius: var(--r-lg); background: var(--pink-100); overflow: hidden; }
.nl-flower { position: absolute; top: -70px; inset-inline-start: -60px; color: color-mix(in srgb, var(--store-primary) 16%, #fff); pointer-events: none; }
.nl-flower .icon { width: 240px; height: 240px; fill: currentColor; stroke: none; }
.nl-text, .nl-form { position: relative; }
.nl-text h2 { margin: 0 0 6px; font-size: clamp(26px, 3vw, 36px); }
.nl-text p { margin: 0; color: #4A4A4A; }
.nl-field { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--pill); background: #fff; }
.nl-field input { flex: 1; min-width: 0; padding: 10px 18px; border: 0; background: none; }
.nl-field input:focus { outline: none; }
.nl-field:focus-within { box-shadow: 0 0 0 2px var(--store-primary-dark); }
.nl-offer { margin: 10px 18px 0; color: var(--store-primary-dark); font-weight: 600; font-size: 15px; }
body[data-show-newsletter="false"] .newsletter { display: none; }

@media (max-width: 1180px) {
	.trust-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.deal-box { padding: 32px 28px; }
	.countdown { margin-inline-start: 0; }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid > .post-card:first-child { grid-column: span 2; grid-row: auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
	.post-grid > .post-card:first-child .post-media { aspect-ratio: auto; height: 100%; }
	.post-grid > .post-card:not(:first-child) { display: flex; }
	.post-grid > .post-card:not(:first-child) .post-media { aspect-ratio: 16 / 9; height: auto; }
}
@media (max-width: 1180px) {
	/* الغلاف يصغر مع العرض حتّى يقارب طولُه طولَ النصّ، فلا يبقى فوق النصّ وتحته فراغ */
	.feature-book { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 44px; }
}
@media (max-width: 980px) {
	.feature-book { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 32px; }
	.nl-box { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 36px 32px; }
}
@media (max-width: 760px) {
	/* الهيرو أقصر: صورةٌ أصغر تحت النصّ لا خلفه، والبطاقة الجانبيّة صفٌّ أفقيّ صغير */
	.slide-text { padding-block: 26px 4px; }
	.slide h1, .slide h2 { font-size: 32px; margin-bottom: 10px; }
	.slide p { font-size: 15px; margin-bottom: 18px; }
	.slide-eyebrow { font-size: 16px; margin-bottom: 4px; }
	.slide-media img { max-width: 230px; }
	.slider-dots { padding-block: 10px 2px; }
	.hero-word { bottom: auto; top: 6px; font-size: 78px; }
	.hero-card { padding-bottom: 46px; }
	.hero-card a { display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 10px; text-align: start; }
	.hero-card img { grid-row: span 2; aspect-ratio: 4 / 3; border-radius: calc(var(--r) - 4px); }
	.hero-card b { margin: 0; align-self: end; font-size: 17px; }
	.hero-card span { margin: 0; align-self: start; font-size: 14px; line-height: 1.5; }
	.trust-section { background: linear-gradient(to bottom, var(--cream) 50%, var(--store-bg) 50%); padding-bottom: 0; }
	.trust-bar { display: flex; gap: 10px; margin-inline: -16px; padding: 0 16px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-bar::-webkit-scrollbar { display: none; }
	.trust-card { flex: 0 0 74%; padding: 12px 14px; gap: 12px; scroll-snap-align: start; box-shadow: 0 8px 20px rgba(70, 10, 35, .08); }
	.trust-icon { width: 40px; height: 40px; }
	.trust-icon .icon { width: 19px; height: 19px; }
	.trust-card h3 { font-size: 16px; }
	.trust-card p { font-size: 13px; }

	/* التصنيفات والآراء والمؤلّفون والمقالات: شرائط تُمرَّر أفقيًّا بدل أعمدةٍ طويلة */
	.cat-grid, .review-grid, .author-grid, .post-grid { display: flex; gap: 12px; margin-inline: -16px; padding: 0 16px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.cat-grid::-webkit-scrollbar, .review-grid::-webkit-scrollbar, .author-grid::-webkit-scrollbar, .post-grid::-webkit-scrollbar { display: none; }
	.cat-grid > *, .review-grid > *, .author-grid > *, .post-grid > * { scroll-snap-align: start; }
	.cat-card, .cat-card:not(:nth-child(6n+2)):not(:nth-child(6n+6)) { flex: 0 0 46%; min-height: 210px; }
	.cat-card:nth-child(6n+2) .cat-text, .cat-card:nth-child(6n+6) .cat-text { position: relative; width: auto; padding: 18px; justify-content: flex-start; }
	.cat-card:nth-child(6n+2) .cat-text b, .cat-card:nth-child(6n+6) .cat-text b, .cat-card:not(:nth-child(6n+2)):not(:nth-child(6n+6)) .cat-text b { font-size: 19px; }
	.cat-card:nth-child(6n+2) .cat-cta, .cat-card:nth-child(6n+6) .cat-cta { display: none; }
	.cat-card img { object-position: 22% 100%; }
	.review-card { flex: 0 0 84%; padding: 24px 22px; }
	.author-card { flex: 0 0 72%; }
	.post-card, .post-grid > .post-card:first-child, .post-grid > .post-card:not(:first-child) { display: flex; flex: 0 0 80%; }
	.post-grid > .post-card:first-child .post-media, .post-grid > .post-card:not(:first-child) .post-media { aspect-ratio: 16 / 9; height: auto; }
	.post-grid > .post-card:first-child .post-title { font-size: 20px; }
	.post-body { padding: 16px 18px 20px; }

	.deal-section { padding-block: 32px; }
	.deal-box { padding: 26px 16px 20px; margin-inline: -4px; }
	.deal-head { gap: 14px; }
	.countdown { flex-wrap: wrap; gap: 6px; }
	.cd-label { width: 100%; }
	.cd-unit { width: 54px; height: 54px; }
	.cd-unit b { font-size: 18px; }
	.feature-wrap { padding-block: 40px 44px; }
	.feature-word { font-size: 64px; top: 22px; }
	.feature-book { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	.feature-media { width: min(300px, 86%); margin-inline: auto; padding: 34px 38px 26px; }
	.feature-media .type-dot { inset-inline-end: 24px; }
	.feature-buy .btn-pill { flex: 1; }
	.nl-box { padding: 28px 20px; }
	.nl-field .btn-pill { padding-inline: 16px 5px; min-height: 44px; }
	.nl-field .btn-pill .pill-ico { width: 34px; height: 34px; }
	.nl-field input { padding-inline: 12px; }
}

/* المدوّنة والمقال */
.page-hero.is-compact .ph-box { padding: 44px 24px; }
.post-grid.is-blog, .post-grid.is-row { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; }
.post-grid.is-blog > .post-card:first-child { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.post-grid.is-blog > .post-card:first-child .post-media { aspect-ratio: auto; height: 100%; min-height: 320px; }
.post-grid.is-blog > .post-card:first-child .post-body { justify-content: center; padding: 32px 36px; }
.post-grid.is-blog > .post-card:first-child .post-title { font-size: 30px; }
.post-grid.is-blog > .post-card:not(:first-child),
.post-grid.is-row > .post-card { display: flex; grid-row: auto; grid-column: auto; }
.post-grid.is-blog > .post-card:not(:first-child) .post-media,
.post-grid.is-row > .post-card .post-media { aspect-ratio: 16 / 9; height: auto; }
.post-grid.is-row > .post-card:first-child .post-title { font-size: 20px; }
.band-soft { background: var(--pink-50); }
.band-soft .post-card { background: #fff; }
.article { max-width: 780px; margin-inline: auto; }
.article-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); margin-bottom: 28px; }
.article-body { font-size: 17px; }
.article-body h2 { margin: 30px 0 10px; font-size: 26px; }
.article-body blockquote { margin: 26px 0; padding: 22px 26px; border-inline-start: 4px solid var(--store-primary-dark); border-radius: var(--r); background: var(--pink-50); font-size: 20px; font-weight: 600; line-height: 1.7; }
.article-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 980px) {
	.post-grid.is-blog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.post-grid.is-blog .post-body, .post-grid.is-row .post-body { padding: 16px 18px 20px; }
	.post-grid.is-row .post-title, .post-grid.is-blog > .post-card:not(:first-child) .post-title { font-size: 18px; }
	.post-grid.is-blog > .post-card:first-child .post-media { min-height: 260px; }
}
@media (max-width: 760px) {
	.page-hero.is-compact .ph-box { padding: 30px 18px; }
	.post-grid.is-blog { display: grid; grid-template-columns: minmax(0, 1fr); margin-inline: 0; padding: 0; overflow: visible; }
	.post-grid.is-blog > .post-card:first-child { display: flex; }
	.post-grid.is-blog > .post-card:first-child .post-media { aspect-ratio: 16 / 9; height: auto; min-height: 0; }
	.post-grid.is-blog > .post-card:first-child .post-body { padding: 16px 18px 20px; }
	.post-grid.is-blog > .post-card:first-child .post-title { font-size: 22px; }
	.article-body { font-size: 16px; }
	.article-body h2 { font-size: 22px; }
	.article-body blockquote { padding: 18px 18px; font-size: 18px; }
}

/* أعمال الكاتب: أوّل كتابٍ بطاقةٌ كبيرة وستّةٌ بجانبه، فلا يبقى صفٌّ ناقص بأيّ عرض */
.book-grid.works-grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
.works-grid > .book-card:first-child { grid-row: span 2; }
.works-grid > .book-card:first-child .book-media { flex: 1; aspect-ratio: auto; min-height: 420px; }
.works-grid > .book-card:first-child .book-cover { position: absolute; inset: 44px; display: flex; justify-content: center; height: auto; }
.works-grid > .book-card:first-child .book-cover img { height: 100%; }
/* الغلاف الكبير لا يُقصّ إن ضاق عرض البطاقة عن ارتفاعها */
.best-grid > .book-card:first-child .book-cover img,
.works-grid > .book-card:first-child .book-cover img { width: auto; max-width: 100%; object-fit: contain; box-shadow: none; filter: drop-shadow(0 14px 22px rgba(70, 10, 35, .22)); }
.works-grid > .book-card:first-child .book-body { flex: none; padding: 22px 26px 26px; }
.works-grid > .book-card:first-child .book-title { font-size: 26px; }
.works-grid > .book-card:first-child .price { font-size: 22px; }
@media (max-width: 980px) {
	.book-grid.works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.works-grid > .book-card:first-child { grid-column: span 2; grid-row: auto; }
	.works-grid > .book-card:first-child .book-media { min-height: 360px; }
}

/* صفحة الكتاب: اختيار النسخة، وصندوق التوصيل والدفع */
.formats-box { margin: 4px 0 6px; }
.formats-label { display: block; margin-bottom: 8px; font-weight: 600; }
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format-opt { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 16px 6px 8px; border: 1.5px solid var(--line); border-radius: var(--pill); background: #fff; transition: border-color .2s; }
.format-opt:hover { border-color: var(--store-primary-dark); }
.format-opt.is-current { border-color: var(--store-primary-dark); background: var(--pink-50); }
.format-opt .type-dot { width: 32px; height: 32px; }
.format-opt .type-dot .icon { width: 16px; height: 16px; }
.format-text { display: flex; flex-direction: column; line-height: 1.25; }
.format-name { font-weight: 600; font-size: 15px; }
.format-price { color: var(--muted); font-size: 13px; }
/* تُخفى القائمة إن لم يكن للعنوان غير نسخةٍ واحدة */
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ [data-preview-copy])) { display: none; }
.pdp-ship { list-style: none; margin: 0 0 22px; padding: 14px 18px; display: grid; gap: 8px; border-radius: var(--r); background: var(--pink-50); font-size: 15px; }
.pdp-ship li { display: flex; align-items: flex-start; gap: 10px; }
.pdp-ship .icon { margin-top: 3px; color: var(--store-primary-dark); }

/* صفحة التصنيف: التصفية الحاليّة، والشبكة والقائمة */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 22px; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding-inline: 14px 10px; background: var(--pink-50); border-color: color-mix(in srgb, var(--store-primary) 25%, #fff); font-size: 14px; }
.chip-x .icon { width: 14px; height: 14px; }
.chip-x:hover { border-color: var(--store-primary-dark); color: var(--store-primary-dark); }
.view-switch { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); background: #fff; }
.view-switch button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.view-switch button[aria-pressed="true"] { background: var(--store-accent); color: #fff; }
.filter-box .check .rating { gap: 0; }
.filter-box .check .stars .icon { width: 15px; height: 15px; }
.book-grid.listing-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.listing-grid.is-list .book-card { flex-direction: row; }
.listing-grid.is-list .book-media { flex: 0 0 170px; aspect-ratio: auto; padding: 16px; }
.listing-grid.is-list .book-cover { height: auto; width: 100%; }
.listing-grid.is-list .book-cover img { width: 100%; height: auto; }
.listing-grid.is-list .book-body { padding: 20px 24px; justify-content: center; }
.listing-grid.is-list .price-row { margin-top: 10px; justify-content: flex-start; gap: 20px; }
@media (max-width: 760px) {
	.view-switch { display: none; }
	.listing-grid.is-list .book-media { flex-basis: 120px; }
}

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

.review-card > p:is([data-slot="review.text"]) { flex: 0 0 auto; margin-bottom: auto; }

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