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

:root {
	--store-primary: #4A7C6F;
	--store-primary-dark: #2C4F46;
	--store-accent: #C43D3D;
	--store-bg: #FFFFFF;
	--store-text: #101010;

	/* محايدات */
	--ink: #101010;
	--muted: #5F6469;
	--line: #E9E9E9;
	--surface: #F6F6F6;
	--white: #FFFFFF;
	--gold: #E9A23B;
	--success: #2E7D4F;

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

	/* مشتقّات باهتة من لون المتجر */
	--tint: color-mix(in srgb, var(--store-primary) 9%, #fff);
	--tint-2: color-mix(in srgb, var(--store-primary) 16%, #fff);
	--accent-tint: color-mix(in srgb, var(--store-accent) 9%, #fff);

	--r: 12px;
	--r-sm: 8px;
	--pill: 999px;
	--shadow: 0 10px 30px rgba(16, 16, 16, .08);
	--container: 1320px;
	--gutter: 24px;
	--font: "Tajawal", system-ui, sans-serif;
	--per-row: 4;
}

body[data-corners="sharp"] {
	--r: 0px;
	--r-sm: 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; }

/* خيارات الإظهار */
body[data-show-trust-bar="false"] .trust-section { display: none; }
body[data-show-reviews="false"] .reviews-section { display: none !important; }
[data-option]:empty { display: none; }

/* --------------------------------------------------------------- أساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.7;
	color: var(--store-text);
	background: var(--store-bg);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; line-height: 1.35; }
ul, ol { margin: 0; padding: 0; list-style: none; }
del { color: var(--muted); }
bdi { unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }
[hidden] { display: none !important; }

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

.icon {
	width: 20px; height: 20px; flex: none;
	fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.icon-arrow { width: 16px; height: 16px; }
.icon-flip { transform: scaleX(-1); }

/* --------------------------------------------------------------- أزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 24px; border-radius: var(--pill);
	border: 1px solid transparent; font-size: 15px; font-weight: 500; line-height: 1.2;
	transition: background-color .2s, color .2s, border-color .2s, transform .2s;
	white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn-lg { min-height: 52px; padding: 0 28px; }
.btn-block { width: 100%; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-accent { background: var(--store-accent); color: #fff; }
.btn-accent:hover { background: color-mix(in srgb, var(--store-accent) 85%, #000); }
.btn-primary { background: var(--store-primary); color: #fff; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-white { background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(16, 16, 16, .08); }
.btn-white:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--store-accent); }
.link-btn { background: none; border: 0; padding: 0; color: var(--store-accent); text-decoration: underline; font-size: inherit; }

.icon-btn {
	display: inline-grid; place-items: center; width: 42px; height: 42px;
	border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink);
	transition: background-color .2s, color .2s, border-color .2s;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn-lg { width: 52px; height: 52px; }
.icon-btn[aria-pressed="true"] { color: var(--store-accent); border-color: var(--store-accent); }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }

.link-more {
	display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500;
	text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; white-space: nowrap;
}
.link-more:hover { color: var(--store-primary-dark); }

/* --------------------------------------------------------------- الرأس */
/* الرأس مثبّتٌ أعلى الشاشة، ويمرّ الشريط العلويّ وحده (40px وحدّه) */
.site-header { position: sticky; top: -41px; z-index: 60; background: var(--store-bg); }
.topbar { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar-links { display: flex; align-items: center; gap: 22px; }
.topbar-links a:hover { color: var(--ink); }
.topbar-links a:not(.topbar-phone) { text-decoration: underline; text-underline-offset: 4px; }
.topbar-phone { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 500; }
.topbar-phone .icon { width: 16px; height: 16px; }
.topbar-note { color: var(--muted); }

.header-main .container {
	display: flex; align-items: center; gap: 28px; min-height: 84px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.menu-toggle { display: none; }

.header-search {
	flex: 1; max-width: 640px; margin-inline: auto;
	display: flex; align-items: center; height: 48px; padding-inline-end: 4px;
	border: 1px solid var(--line); border-radius: var(--pill); background: #fff;
}
.header-search:focus-within { border-color: var(--store-primary); }
.header-search select {
	flex: none; height: 100%; border: 0; background: transparent; padding: 0 18px 0 10px;
	border-inline-end: 1px solid var(--line); font-size: 14px; color: var(--ink); max-width: 170px;
}
.header-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 16px; outline: none; font-size: 14px; }
.search-btn {
	display: grid; place-items: center; width: 40px; height: 40px; flex: none;
	border: 0; border-radius: 50%; background: var(--store-primary); color: #fff;
}
.search-btn:hover { background: var(--store-primary-dark); }

.header-actions { display: flex; align-items: center; gap: 18px; flex: none; }
.act { position: relative; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.act .icon { width: 24px; height: 24px; }
.act-label { font-size: 14px; }
.count {
	position: absolute; top: -6px; inset-inline-start: 14px; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--store-primary-dark); color: #fff;
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.act-total { display: flex; flex-direction: column; line-height: 1.25; margin-inline-start: 6px; }
.act-total small { font-size: 12px; color: var(--muted); }
.act-total b { font-size: 14px; font-weight: 700; }

.header-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.header-nav .container { display: flex; align-items: center; gap: 32px; min-height: 56px; }
.cat-menu { position: relative; align-self: stretch; display: flex; }
.cat-menu-btn {
	display: inline-flex; align-items: center; gap: 10px; width: 260px; padding: 0 18px;
	border: 0; background: var(--store-primary-dark); color: #fff; font-weight: 500; font-size: 15px;
}
.cat-menu-btn .chev { margin-inline-start: auto; width: 16px; height: 16px; transition: transform .2s; }
.cat-menu-list {
	position: absolute; top: 100%; inset-inline-start: 0; z-index: 40; width: 260px;
	background: #fff; border: 1px solid var(--line); border-top: 0; box-shadow: var(--shadow);
	padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.cat-menu-list a { display: block; padding: 10px 20px; font-size: 14px; }
.cat-menu-list a:hover { background: var(--surface); color: var(--store-primary-dark); }
.cat-menu:hover .cat-menu-list, .cat-menu:focus-within .cat-menu-list, .cat-menu.open .cat-menu-list {
	opacity: 1; visibility: visible; transform: none;
}
.cat-menu.open .chev { transform: rotate(180deg); }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; }
.nav-links a { padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current="page"] { border-color: var(--store-primary); }
.nav-offers { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--store-accent); font-weight: 700; font-size: 15px; }
.nav-offers .icon { width: 18px; height: 18px; }

/* الدرج الجانبيّ */
.drawer-backdrop, .filters-backdrop {
	position: fixed; inset: 0; z-index: 80; background: rgba(16, 16, 16, .45);
	opacity: 0; visibility: hidden; transition: .25s;
}
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 90;
	width: min(330px, 86vw); background: #fff; overflow-y: auto; padding: 18px 20px 28px;
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop, .filters-open .filters-backdrop { opacity: 1; 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: 19px; }
.drawer-head .brand img { width: 34px; height: 34px; }
.drawer-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-offers { color: var(--store-accent); }
.drawer-label { margin-top: 20px; font-size: 13px; color: var(--muted); }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.drawer-cats a { padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--pill); font-size: 14px; }
.drawer-foot { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; font-size: 14px; }

/* --------------------------------------------------------------- الأقسام */
.section { padding: 64px 0; }
.section-tight { padding: 0; }
.section-flush-top { padding-top: 8px; }
.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: 500; letter-spacing: -.01em; line-height: 1.3; }
.section-sub { margin-top: 6px; font-size: 15px; color: var(--muted); }

/* السلايدر */
.hero { position: relative; }
.slider { position: relative; }
.slides {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; height: 450px; display: flex; align-items: center; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide .container { position: relative; }
.slide-text { max-width: 560px; }
.slide h1, .slide h2 { font-size: 46px; font-weight: 500; line-height: 1.25; letter-spacing: -.015em; color: var(--ink); }
.slide p { margin-top: 14px; font-size: 17px; color: #2F3437; max-width: 480px; }
.slide .btn { margin-top: 26px; }
.slider-dots { position: absolute; bottom: 22px; inset-inline: 0; display: flex; justify-content: center; gap: 8px; }
.slider-dots button { width: 26px; height: 3px; padding: 0; border: 0; border-radius: 2px; background: rgba(16, 16, 16, .22); }
.slider-dots button[aria-current="true"] { background: var(--ink); width: 40px; }
.slider-arrow {
	position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center;
	width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: var(--ink);
	opacity: 0; transition: opacity .2s;
}
.slider-arrow.prev { inset-inline-start: 20px; }
.slider-arrow.next { inset-inline-end: 20px; }
.slider:hover .slider-arrow, .slider-arrow:focus-visible { opacity: 1; }

/* بلاطات التصنيفات */
.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cat-items { display: contents; }
.cat-tile {
	display: flex; flex-direction: column; align-items: center; text-align: center;
	padding: 16px 14px 18px; border-radius: var(--r); background: var(--surface); transition: background-color .2s;
}
.cat-tile:hover { background: var(--tint); }
.cat-img { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cat-tile:hover .cat-img img { transform: scale(1.05); }
.cat-tile h3 { margin-top: 14px; font-size: 16px; font-weight: 500; }
.cat-count { font-size: 13px; color: var(--muted); }
.cat-tile-offers { background: var(--accent-tint); }
.cat-tile-offers:hover { background: color-mix(in srgb, var(--store-accent) 14%, #fff); }
.offer-disc { display: grid; place-items: center; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--store-accent); color: #fff; }
.offer-disc .icon { width: 42%; height: 42%; stroke-width: 1.4; }

/* البانرات الصغيرة الثلاثة */
.promo-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.promo, .big-banner, .wide-banner, .feat-banner {
	position: relative; display: flex; overflow: hidden; border-radius: var(--r); background: var(--tint);
}
.promo { aspect-ratio: 8 / 5; align-items: center; }
.promo > img, .big-banner > img, .wide-banner > img, .feat-banner > img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s;
}
.promo:hover > img, .big-banner:hover > img, .wide-banner:hover > img, .feat-banner:hover > img { transform: scale(1.03); }
.promo-text, .big-banner-text, .wide-text, .feat-banner-text {
	position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.promo-text { width: 58%; padding: 24px 26px; }
.promo-text strong { font-size: 23px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.promo-text > span:not(.link-more) { font-size: 14px; color: #2F3437; }
.promo-text .link-more { margin-top: 14px; color: var(--ink); }

/* شبكة الكتب */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 24px; }
.book-grid-3 { --per-row: 3; }

.pill-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-tabs [role="tab"] {
	min-height: 40px; padding: 0 20px; border-radius: var(--pill); border: 1px solid var(--line);
	background: #fff; font-size: 14px; font-weight: 500; color: var(--ink); transition: .2s;
}
.pill-tabs [role="tab"]:hover { border-color: var(--ink); }
.pill-tabs [role="tab"][aria-selected="true"] { border-color: var(--store-primary); background: var(--tint); color: var(--store-primary-dark); }

/* بطاقة الكتاب */
.book-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: #fff; transition: border-color .2s, box-shadow .2s; }
.book-media { position: relative; display: grid; place-items: center; background: var(--surface); overflow: hidden; }
.book-cover { display: block; width: 100%; padding: 22px 18% 26px; }
.book-cover img {
	width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px;
	box-shadow: 0 10px 22px rgba(16, 16, 16, .16); transition: transform .35s;
}
.book-card:hover .book-cover img { transform: translateY(-4px); }
.type-dot {
	position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2;
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff;
	box-shadow: 0 0 0 2px #fff;
}
.type-dot .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.type-dot[data-type="print"] { background: var(--type-print); }
.type-dot[data-type="ebook"] { background: var(--type-ebook); }
.type-dot[data-type="audio"] { background: var(--type-audio); }
.type-dot[data-type="educational"] { background: var(--type-educational); }
.type-dot.sm { width: 22px; height: 22px; top: 4px; inset-inline-end: 4px; }
.type-dot.sm .icon { width: 12px; height: 12px; }
.type-dot.xs { position: static; width: 20px; height: 20px; box-shadow: none; display: inline-grid; }
.type-dot.xs .icon { width: 12px; height: 12px; }
.book-badges { position: absolute; top: 10px; inset-inline-start: 10px; 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: 12px; font-weight: 700; line-height: 1.5; color: #fff; }
.badge-sale { background: var(--store-accent); }
.badge-new { background: var(--success); }
.stock-band {
	position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%); z-index: 2;
	padding: 8px; text-align: center; background: rgba(16, 16, 16, .78); color: #fff; font-size: 14px; font-weight: 500;
}
.book-card.is-out .book-cover img { filter: grayscale(.6); opacity: .75; }
.wish-btn {
	position: absolute; top: 48px; inset-inline-end: 10px; z-index: 2;
	display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
	border: 0; background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(16, 16, 16, .12);
	opacity: 0; transform: translateX(-6px); transition: .25s;
}
.wish-btn .icon { width: 17px; height: 17px; }
.wish-btn[aria-pressed="true"] { color: var(--store-accent); }
.wish-btn[aria-pressed="true"] .icon { fill: currentColor; }
.book-card:hover .wish-btn, .book-card:focus-within .wish-btn { opacity: 1; transform: none; }
@media (hover: none) {
	.wish-btn { opacity: 1; transform: none; }
}
/* زرّ السلّة: كبسولةٌ سوداء ظاهرةٌ دائمًا تحت السعر */
.card-cart {
	display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 38px; margin-top: 10px;
	border: 0; border-radius: var(--pill); background: var(--ink); color: #fff; font-size: 14px; font-weight: 500;
	transition: background-color .2s;
}
.card-cart .icon { width: 17px; height: 17px; }
.card-cart:hover { background: var(--store-primary-dark); }
.card-cart:disabled { background: var(--surface); color: var(--muted); cursor: not-allowed; }
.book-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-top: 14px; }
.book-body > .price { margin-top: auto; }
.book-title { font-size: 15px; font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-title a:hover { color: var(--store-primary-dark); }
.book-author { font-size: 13px; color: var(--muted); }
.book-rate { display: flex; align-items: center; gap: 6px; }
.rate-count { font-size: 12px; color: var(--muted); }
.rating { display: inline-flex; gap: 1px; color: var(--gold); }
.rating .star { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.rating .star.off { color: #DCDCDC; }
.rating-lg .star { width: 20px; height: 20px; }
.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-weight: 700; color: var(--store-accent); font-size: 16px; }
.price del { font-size: 13px; font-weight: 400; color: var(--muted); }
.price-lg { font-size: 28px; }
.price-lg del { font-size: 17px; }

/* أشكال البطاقة */
body[data-card-style="framed"] .book-card { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 10px 16px; }
body[data-card-style="framed"] .book-card:hover { border-color: #D4D4D4; box-shadow: var(--shadow); }
body[data-card-style="framed"] .book-media { border-radius: var(--r-sm); }
body[data-card-style="framed"] .book-body { padding-inline: 4px; }
body[data-card-style="classic"] .book-media { border-radius: var(--r); }
body[data-card-style="minimal"] .book-media { background: transparent; }
body[data-card-style="minimal"] .book-cover { padding: 0 0 4px; }
body[data-card-style="minimal"] .book-body { align-items: center; text-align: center; }

/* البانران الكبيران */
.banner-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.big-banner { aspect-ratio: 16 / 9; align-items: center; }
.big-banner-text { width: 56%; padding: 32px 36px; gap: 8px; }
.big-banner-text strong { font-size: 30px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.big-banner-text > span:not(.btn) { font-size: 15px; color: #2F3437; }
.big-banner-text .btn { margin-top: 18px; }

/* الكتب المميّزة حول بانرٍ طويل */
.feat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) minmax(0, 1fr); grid-template-rows: repeat(3, auto); gap: 20px 24px; }
.feat-items { display: contents; }
.feat-items > :nth-child(1) { grid-column: 1; grid-row: 1; }
.feat-items > :nth-child(2) { grid-column: 1; grid-row: 2; }
.feat-items > :nth-child(3) { grid-column: 1; grid-row: 3; }
.feat-items > :nth-child(4) { grid-column: 3; grid-row: 1; }
.feat-items > :nth-child(5) { grid-column: 3; grid-row: 2; }
.feat-items > :nth-child(6) { grid-column: 3; grid-row: 3; }
.feat-items > :nth-child(n+7) { display: none; }
.feat-banner { grid-column: 2; grid-row: 1 / span 3; min-height: 420px; align-items: flex-start; }
.feat-banner-text { padding: 34px 32px; }
.feat-banner-text strong { font-size: 28px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.feat-banner-text > span:not(.link-more) { font-size: 15px; color: #2F3437; }
.feat-banner-text .link-more { margin-top: 12px; color: var(--ink); }
.feat-grid .mini-card { grid-template-columns: 104px minmax(0, 1fr) auto; }
@media (min-width: 1024px) {
	.feat-grid:not(:has(.feat-banner)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.feat-grid:not(:has(.feat-banner)) .feat-items > :nth-child(n+4) { grid-column: 2; }
}

/* البطاقة الأفقيّة الصغيرة */
.mini-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.mini-card {
	display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 16px;
	padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; min-width: 0;
	transition: border-color .2s;
}
.mini-card:hover { border-color: #D4D4D4; }
.mini-cover { position: relative; display: block; padding: 8px; border-radius: var(--r-sm); background: var(--surface); }
.mini-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: 0 4px 10px rgba(16, 16, 16, .14); }
.mini-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini-body .book-title { font-size: 14px; }
.mini-body .price { font-size: 15px; }
.mini-stock { font-size: 13px; color: var(--muted); }
.round-cart {
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	border: 1px solid var(--line); background: #fff; color: var(--ink); transition: .2s; align-self: end;
}
.round-cart .icon { width: 18px; height: 18px; }
.round-cart:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* آراء القرّاء */
.review-row {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 2); gap: 24px;
	overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin;
}
.review-card {
	scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px;
	padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
}
.review-card .rating .star { width: 17px; height: 17px; }
.review-who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.review-who b { font-size: 17px; font-weight: 500; }
.verified { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--success); }
.verified .icon { width: 16px; height: 16px; }
.review-card p { font-size: 16px; line-height: 1.85; }
.review-book { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.review-book img { width: 42px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.review-book > span { display: flex; flex-direction: column; font-size: 14px; }
.review-book b { font-weight: 500; }
.review-book .price { font-size: 14px; }

/* البانر العريض */
.wide-banner { width: 100%; height: 330px; align-items: center; }
.wide-text { width: 46%; padding: 40px 48px; gap: 8px; }
.wide-text strong { font-size: 34px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.wide-text > span:not(.btn) { font-size: 16px; color: #2F3437; }
.wide-text .btn { margin-top: 16px; }

/* المؤلّفون */
.author-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.author-card { display: flex; flex-direction: column; gap: 4px; }
.author-photo { display: block; overflow: hidden; aspect-ratio: 3 / 2; border-radius: var(--r); background: var(--tint-2); }
.author-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transition: transform .5s; }
.author-card:hover .author-photo img { transform: scale(1.04); }
.author-meta { margin-top: 12px; font-size: 13px; color: var(--muted); }
.author-card h3 { font-size: 20px; font-weight: 500; }
.author-card:hover h3 { color: var(--store-primary-dark); }
.author-card p { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* شريط الثقة */
.trust-section { padding: 0 0 56px; }
.trust-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 48px; border-top: 1px solid var(--line); }
.trust-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.trust-icon { width: 38px; height: 38px; stroke-width: 1.3; margin-bottom: 8px; color: var(--ink); }
.trust-item h3 { font-size: 17px; font-weight: 500; }
.trust-item p { font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------------- التذييل */
.site-footer { background: var(--store-primary-dark); color: #fff; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-h { font-size: 15px; font-weight: 700; margin-bottom: 16px; color: #fff; }
.footer-col summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: default; }
.footer-col summary::-webkit-details-marker { display: none; }
.footer-col summary .chev { display: none; width: 16px; height: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-news p, .footer-small, .footer-line { color: rgba(255, 255, 255, .85); font-size: 14px; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.news-field {
	display: flex; align-items: center; height: 50px; margin-top: 18px; padding-inline-end: 5px;
	border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--pill); background: rgba(255, 255, 255, .06);
}
.news-field input { flex: 1; min-width: 0; height: 100%; padding: 0 20px; border: 0; background: transparent; color: #fff; outline: none; }
.news-field input::placeholder { color: rgba(255, 255, 255, .75); }
.news-field button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); }
.footer-fine { margin-top: 12px; font-size: 13px !important; }
.footer-col .footer-phone, .footer-phone { display: block; margin: 6px 0 12px; font-size: 26px; font-weight: 500; color: #fff !important; }
.footer-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.footer-line .icon { width: 17px; height: 17px; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); color: #fff; }
.social a:hover { background: #fff; color: var(--ink); text-decoration: none; }
.social .icon { width: 17px; height: 17px; }
.footer-bottom {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
	margin-top: 44px; padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, .16);
	font-size: 13px; color: rgba(255, 255, 255, .85);
}
.pay-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-list li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--pill); background: #fff; color: var(--ink); font-size: 12px; font-weight: 500; }
.pay-list .icon { width: 16px; height: 16px; }

.bottom-bar { display: none; }

/* --------------------------------------------------------------- رأس الصفحات الداخليّة */
.page-head { padding: 40px 0 28px; text-align: center; }
.page-head h1 { font-size: 38px; font-weight: 500; margin-top: 8px; }
.page-head p { margin-top: 6px; color: var(--muted); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.page-head .breadcrumb { justify-content: center; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 8px; color: #B5B5B5; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb [aria-current] { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.chip { padding: 7px 18px; border: 1px solid var(--line); border-radius: var(--pill); font-size: 14px; }
.chip:hover { border-color: var(--ink); }
.chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* التصنيف */
.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters { display: flex; flex-direction: column; gap: 14px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h2 { font-size: 18px; }
.filters-head .icon-btn { display: none; }
.filter-box { padding: 18px 20px; border-radius: var(--r); background: var(--surface); }
.filter-box h3 { font-size: 16px; margin-bottom: 10px; }
.check-list { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; accent-color: var(--store-primary-dark); margin: 0; }
.check > span { display: inline-flex; align-items: center; gap: 8px; flex: 1; }
.check small { font-size: 12px; color: var(--muted); }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price-range label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.price-range input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); }
.filter-note { margin-top: 8px; font-size: 12px; color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.listing-count { font-size: 14px; color: var(--muted); }
.listing-count b { color: var(--ink); font-weight: 500; }
.sort { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sort select { height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--pill); background: #fff; color: var(--ink); }
.filters-toggle { display: none; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
	display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 6px;
	border-radius: var(--pill); border: 1px solid var(--line); font-size: 14px; font-weight: 500;
}
.pagination span { border-color: transparent; color: var(--muted); }
.pagination a:hover { border-color: var(--ink); }
.pagination a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pg-arrow .icon { width: 16px; height: 16px; }

/* --------------------------------------------------------------- صفحة الكتاب */
.pdp-section { padding-top: 28px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; margin-top: 22px; align-items: start; }
.gallery { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; }
.thumbs { display: flex; flex-direction: column; gap: 12px; }
.thumbs button { padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.gallery-main { position: relative; display: grid; place-items: center; padding: 48px 20%; border-radius: var(--r); background: var(--surface); }
.gallery-main > img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 18px 40px rgba(16, 16, 16, .2); }
.gallery-main .type-dot { top: 16px; inset-inline-end: 16px; width: 38px; height: 38px; }
.gallery-main .type-dot .icon { width: 20px; height: 20px; }
.pdp-info { display: flex; flex-direction: column; gap: 14px; }
.pdp-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; }
.pdp-type { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: var(--pill); background: var(--surface); font-weight: 500; }
.pdp-kicker a { color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.pdp-info h1 { font-size: 34px; font-weight: 500; line-height: 1.3; }
.pdp-author { color: var(--muted); }
.pdp-author a { color: var(--store-primary-dark); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.pdp-rate { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.pdp-rate .star { width: 17px; height: 17px; }
.pdp-price { display: flex; align-items: center; gap: 14px; padding: 6px 0 4px; }
.pdp-lead { color: var(--muted); font-size: 16px; line-height: 1.9; }
.meta-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.meta-tile {
	display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
	padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface);
}
.meta-tile .icon { grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--store-primary-dark); }
.meta-tile small { font-size: 12px; color: var(--muted); }
.meta-tile b { font-size: 14px; font-weight: 500; }
.pdp-note { font-size: 14px; color: var(--muted); }
.stock-line { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-weight: 500; font-size: 14px; }
.stock-line .icon { width: 18px; height: 18px; }
.pdp-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.qty { display: inline-flex; align-items: center; height: 52px; border: 1px solid var(--line); border-radius: var(--pill); }
.qty button { display: grid; place-items: center; width: 42px; height: 100%; border: 0; background: none; color: var(--ink); }
.qty .icon { width: 16px; height: 16px; }
.qty input { width: 40px; height: 100%; border: 0; text-align: center; background: none; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sample-player { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--tint); }
.play-btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--store-primary-dark); color: #fff; }
.play-btn .icon { fill: currentColor; width: 18px; height: 18px; }
.player-track { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.player-label { font-size: 13px; font-weight: 500; }
.player-bar { height: 4px; border-radius: 2px; background: #fff; overflow: hidden; }
.player-bar span { display: block; height: 100%; background: var(--store-primary-dark); }
.player-time { font-size: 13px; color: var(--store-text); direction: ltr; }

.pdp-tabs { margin-top: 64px; }
.pdp-tabs .pill-tabs { justify-content: center; padding-bottom: 26px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.prose { max-width: 820px; margin-inline: auto; font-size: 16px; line-height: 1.95; }
.prose p + p { margin-top: 14px; }
.spec-table { width: 100%; max-width: 820px; margin-inline: auto; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: start; }
.spec-table th { width: 34%; font-weight: 500; color: var(--muted); background: var(--surface); }
.reviews-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 40px; align-items: start; }
.reviews-side { display: flex; flex-direction: column; gap: 18px; }
.reviews-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.reviews-summary strong { font-size: 46px; font-weight: 500; line-height: 1; }
.reviews-summary span { font-size: 14px; color: var(--muted); }
.rating-bars { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.rating-bars li { display: grid; grid-template-columns: 56px 1fr 36px; align-items: center; gap: 10px; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); }
.review-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r); background: var(--surface); }
.review-form h3 { font-size: 18px; }
.review-note { font-size: 13px; color: var(--muted); }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; border: 0; padding: 0; margin: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #CFCFCF; }
.star-input .icon { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary); border-radius: 4px; }
.review-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; resize: vertical; }
.review-form .btn { align-self: flex-start; }
.review-list { display: flex; flex-direction: column; gap: 16px; }

/* المؤلّف */
.author-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; margin-top: 22px; }
.author-photo-lg { aspect-ratio: 3 / 2; }
.author-info { display: flex; flex-direction: column; gap: 12px; }
.author-info .author-meta { margin: 0; }
.author-info h1 { font-size: 38px; }
.author-info .prose { margin: 0; color: #33383C; }

/* السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.cart-head, .cart-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 130px 140px 120px 42px; gap: 18px; align-items: center; }
.cart-head { padding: 0 0 12px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.cart-head span:first-child { grid-column: span 2; }
.cart-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-cover { position: relative; display: block; padding: 7px; border-radius: var(--r-sm); background: var(--surface); }
.cart-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.cart-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-type { font-size: 12px; color: var(--muted); }
.cart-price .price { font-size: 15px; }
.cart-total b { font-weight: 700; }
.cart-qty .qty { height: 42px; }
.cart-qty .qty button { width: 36px; }
.cart-qty .qty input { width: 34px; }
.cart-remove { width: 40px; height: 40px; }
.cart-remove:hover { color: var(--store-accent); border-color: var(--store-accent); }
.cart-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 20px; }
.cart-summary { display: flex; flex-direction: column; gap: 16px; padding: 26px; border-radius: var(--r); background: var(--surface); position: sticky; top: 162px; }
.cart-summary h2 { font-size: 20px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--pill); background: #fff; }
.coupon-applied { font-size: 13px; color: var(--muted); }
.coupon-applied b { color: var(--ink); font-weight: 500; }
.summary-lines { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.summary-lines div { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.summary-lines dt { color: var(--muted); }
.summary-lines dd { margin: 0; font-weight: 500; }
.summary-lines .minus { color: var(--success); }
.summary-lines .total { padding-top: 14px; border-top: 1px solid #DEDEDE; font-size: 18px; }
.summary-lines .total dt { color: var(--ink); font-weight: 500; }
.summary-lines .total dd { font-weight: 700; }
.summary-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.summary-note .icon { width: 17px; height: 17px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 60px 20px; text-align: center; }
.empty-icon { width: 56px; height: 56px; stroke-width: 1.2; color: var(--store-primary-dark); }

/* 404 */
.notfound .container { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.nf-art { width: 240px; height: 160px; fill: none; stroke: var(--store-primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.nf-art .nf-q { stroke: var(--store-accent); stroke-width: 3; }
.nf-code { font-size: 15px; font-weight: 700; letter-spacing: .3em; color: var(--store-primary-dark); }
.notfound h1 { font-size: 36px; }
.notfound p { color: var(--muted); max-width: 520px; }
.nf-search { display: flex; gap: 8px; width: 100%; max-width: 520px; margin: 10px 0 6px; }
.nf-search input { flex: 1; min-width: 0; height: 46px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--pill); }

/* صفحة المكوّنات */
.kit-section { padding: 36px 0; border-bottom: 1px solid var(--line); }
.kit-title { font-size: 20px; margin-bottom: 20px; }
.kit-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 22px; padding: 18px; border-radius: var(--r); background: var(--surface); font-size: 14px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.kit-row span { min-width: 110px; color: var(--muted); }
.kit-row button { padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--pill); background: #fff; font-size: 13px; }
.kit-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.kit-dots .type-dot { position: static; }
.kit-dots span:not(.type-dot) { margin-inline-end: 18px; }
.kit-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.kit-on-image { display: inline-flex; padding: 16px; border-radius: var(--r); background-image: linear-gradient(135deg, var(--tint-2), #DCEBF3); }
.kit-stars { display: flex; flex-wrap: wrap; gap: 28px; }
.kit-note { margin-top: 12px; color: var(--muted); font-size: 14px; }
.kit-pdp { max-width: 560px; display: grid; gap: 16px; }

/* --------------------------------------------------------------- الاستجابة */
@media (max-width: 1199px) {
	.header-main .container { gap: 20px; }
	.act-total, .act-label { display: none; }
	.nav-links { gap: 20px; font-size: 14px; }
	.cat-menu-btn, .cat-menu-list { width: 230px; }
	body[data-books-per-row="5"], body[data-books-per-row="6"] { --per-row: 4; }
	.book-grid { gap: 20px; }
	.mini-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.promo-text { width: 64%; padding: 20px; }
	.promo-text strong { font-size: 20px; }
}

@media (max-width: 1023px) {
	:root { --gutter: 20px; }
	.header-nav { display: none; }
	.menu-toggle { display: inline-grid; }
	.header-main .container { min-height: 72px; }
	.slide { height: 400px; }
	.slide h1, .slide h2 { font-size: 36px; }
	.section { padding: 52px 0; }
	.section-title { font-size: 28px; }
	.cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.promo-row, .author-row {
		grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%;
		overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin;
	}
	.promo, .author-card { scroll-snap-align: start; }
	.book-grid-3 { --per-row: 3; }
	.banner-pair { grid-template-columns: 1fr; }
	.big-banner { aspect-ratio: 21 / 9; }
	.feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
	.feat-items > :nth-child(n) { grid-column: auto; grid-row: auto; }
	.feat-banner { grid-column: 1 / -1; grid-row: 1; min-height: 260px; aspect-ratio: auto; }
	.feat-banner > img { object-position: center bottom; }
	.review-row { grid-auto-columns: 78%; }
	.wide-text { width: 62%; padding: 32px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 90; width: min(340px, 88vw);
		padding: 20px; background: #fff; overflow-y: auto;
		transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-head .icon-btn, .filters-toggle { display: inline-flex; }
	.filters-head .icon-btn { display: inline-grid; }
	.pdp { grid-template-columns: 1fr; gap: 36px; }
	.gallery { max-width: 560px; margin-inline: auto; width: 100%; }
	.reviews-layout { grid-template-columns: 1fr; }
	.author-hero { grid-template-columns: 1fr; gap: 28px; }
	.cart-layout { grid-template-columns: 1fr; }
	.cart-summary { position: static; }
}

@media (max-width: 767px) {
	:root { --gutter: 16px; }
	body { font-size: 14px; padding-bottom: 66px; }
	.topbar { display: none; }
	.site-header { top: 0; }
	.header-main .container { flex-wrap: wrap; gap: 10px 12px; min-height: 0; padding-block: 12px; }
	.brand { margin-inline-end: auto; }
	.brand-name { font-size: 19px; }
	.brand img { width: 34px; height: 34px; }
	.act-account, .act-wish { display: none; }
	.header-search { order: 5; flex: 1 0 100%; max-width: none; height: 44px; }
	.header-search select { max-width: 120px; padding: 0 12px 0 6px; font-size: 13px; }
	.search-btn { width: 36px; height: 36px; }
	.slide { height: 360px; align-items: flex-start; padding-top: 44px; }
	.slide h1, .slide h2 { font-size: 28px; }
	.slide p { font-size: 15px; }
	.slide-text { max-width: 86%; }
	.slider-arrow { display: none; }
	.section { padding: 40px 0; }
	.section-head { flex-wrap: wrap; align-items: flex-start; margin-bottom: 22px; }
	.section-title { font-size: 24px; }
	.section-sub { font-size: 14px; }
	.cat-grid { gap: 10px; }
	.picks .pill-tabs, .pdp-tabs .pill-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
	.pill-tabs [role="tab"] { flex: none; padding: 0 16px; }
	.cat-tile { padding: 10px 8px 12px; }
	.cat-tile h3 { font-size: 14px; margin-top: 8px; }
	.cat-count { font-size: 12px; }
	.promo-row, .author-row { grid-auto-columns: 86%; gap: 14px; }
	.book-grid, .book-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	body[data-card-style="framed"] .book-card { padding: 6px 6px 12px; }
	.book-cover { padding: 16px 14% 20px; }
	.card-cart { min-height: 36px; font-size: 13px; gap: 6px; }
	.card-cart .icon { width: 15px; height: 15px; }
	.wish-btn { top: 42px; inset-inline-end: 6px; width: 30px; height: 30px; }
	.type-dot { top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; }
	.book-badges { top: 6px; inset-inline-start: 6px; }
	.badge { font-size: 11px; padding: 2px 8px; }
	.book-title { font-size: 14px; }
	.price { font-size: 15px; }
	.big-banner { aspect-ratio: auto; min-height: 260px; }
	.big-banner-text { width: 70%; padding: 24px; }
	.big-banner-text strong { font-size: 22px; }
	.big-banner-text > span:not(.btn) { font-size: 14px; }
	.feat-grid { grid-template-columns: 1fr; gap: 12px; }
	.feat-banner-text { padding: 24px; }
	.feat-banner-text strong { font-size: 22px; }
	.mini-row { grid-template-columns: 1fr; gap: 12px; }
	.feat-grid .mini-card, .mini-card { grid-template-columns: 76px minmax(0, 1fr) auto; }
	.review-row { grid-auto-columns: 90%; gap: 14px; }
	.review-card { padding: 20px; }
	.review-card p { font-size: 15px; }
	.wide-banner { height: auto; min-height: 300px; align-items: flex-start; }
	.wide-banner > img { object-position: right center; }
	.wide-text { width: 100%; padding: 26px 22px; }
	.wide-text strong { font-size: 24px; }
	.trust-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; padding-top: 36px; }
	.trust-section { padding-bottom: 40px; }
	.footer-grid { grid-template-columns: 1fr; gap: 0; }
	.footer-news { padding-bottom: 24px; }
	.footer-col { border-top: 1px solid rgba(255, 255, 255, .16); }
	.footer-col summary { padding: 16px 0; margin: 0; cursor: pointer; }
	.footer-col summary .chev { display: block; transition: transform .2s; }
	.footer-col[open] summary .chev { transform: rotate(180deg); }
	.footer-col > ul, .footer-col > div { padding-bottom: 18px; }
	.footer-bottom { margin-top: 0; flex-direction: column; align-items: flex-start; }
	.bottom-bar {
		position: fixed; bottom: 0; inset-inline: 0; z-index: 70; display: grid; grid-template-columns: repeat(5, 1fr);
		height: 62px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16, 16, 16, .06);
	}
	.bottom-bar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--ink); }
	.bottom-bar .icon { width: 22px; height: 22px; }
	.bottom-bar .count { top: 6px; inset-inline-start: calc(50% + 4px); }
	.page-head { padding: 28px 0 20px; }
	.page-head h1 { font-size: 28px; }
	.chips { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.chip { flex: none; }
	.toolbar { gap: 10px; }
	.listing-count { order: 3; flex: 1 0 100%; }
	.sort span { display: none; }
	.gallery { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
	.gallery-main { padding: 32px 16%; }
	.pdp-info h1 { font-size: 26px; }
	.price-lg { font-size: 24px; }
	.pdp-buy .btn { flex: 1 1 calc(50% - 6px); padding: 0 14px; }
	.pdp-buy .qty { flex: none; }
	.pdp-tabs { margin-top: 44px; }
	.pdp-tabs .pill-tabs { justify-content: flex-start; }
	.spec-table th { width: 42%; }
	.author-info h1 { font-size: 28px; }
	.cart-head { display: none; }
	.cart-row {
		grid-template-columns: 70px minmax(0, 1fr) auto; grid-template-areas: "cover info remove" "cover price price" "cover qty total";
		gap: 6px 14px; align-items: start;
	}
	.cart-cover { grid-area: cover; }
	.cart-info { grid-area: info; }
	.cart-remove { grid-area: remove; }
	.cart-price { grid-area: price; }
	.cart-qty { grid-area: qty; }
	.cart-total { grid-area: total; align-self: center; }
	.cart-summary { padding: 20px; }
	.notfound h1 { font-size: 26px; }
	.nf-art { width: 190px; height: 127px; }
	.kit-row span { min-width: 100%; text-align: center; }
}

/* ================= ميزات المنصّة المعتمدة (SPEC، الملحق 8) ================= */

/* النظرة السريعة: تحت زرّ المفضّلة */
.qv-btn {
	position: absolute; top: 88px; inset-inline-end: 10px; z-index: 2;
	display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
	border: 0; background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(16, 16, 16, .12);
	opacity: 0; transform: translateX(-6px); transition: .25s;
}
.qv-btn .icon { width: 17px; height: 17px; }
.qv-btn:hover { color: var(--store-primary-dark); }
.book-card:hover .qv-btn, .book-card:focus-within .qv-btn { opacity: 1; transform: none; }
@media (hover: none) { .qv-btn { opacity: 1; transform: none; } }

/* المدوّنة */
@media (max-width: 1139px) { .nav-links li:has(> a[href="blog.html"]) { display: none; } }
.post-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-grid { row-gap: 40px; }
.post-card { display: flex; flex-direction: column; gap: 4px; }
.post-photo { display: block; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r); background: var(--tint-2); }
.post-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-photo img { transform: scale(1.04); }
.post-date { margin-top: 12px; font-size: 13px; color: var(--muted); }
.post-card h3 { font-size: 20px; font-weight: 500; line-height: 1.45; }
.post-card:hover h3 { color: var(--store-primary-dark); }
.post-card p { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-grid + .pagination { margin-top: 40px; }
.post-head h1 { max-width: 820px; margin-inline: auto; line-height: 1.35; }
.post-head .breadcrumb { justify-content: center; }
.post-wrap { max-width: 860px; }
.post-hero { margin: 0; overflow: hidden; border-radius: var(--r); background: var(--tint-2); }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-body { padding: 32px 0 8px; font-size: 18px; line-height: 1.95; }
.post-body p + p { margin-top: 18px; }
@media (max-width: 900px) {
	.post-row:not(.post-grid) { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
	.post-row:not(.post-grid) .post-card { scroll-snap-align: start; }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.post-row:not(.post-grid) { grid-auto-columns: 86%; gap: 14px; }
	.post-grid { grid-template-columns: 1fr; }
	.post-card h3 { font-size: 18px; }
	.post-body { font-size: 16px; padding-top: 22px; }
	.post-head h1 { font-size: 28px; }
}

/* ================= الإصدار الثاني ================= */

/* صفوفٌ ممتلئة: ستّة كتب، ويُخفى ما يزيد على الصفّ بحسب عدد الكتب في الصفّ */
body[data-books-per-row="4"] .row-fill > :nth-child(n+5),
body[data-books-per-row="5"] .row-fill > :nth-child(n+6) { display: none; }
@media (max-width: 1199px) {
	body[data-books-per-row="5"] .row-fill > :nth-child(n+5),
	body[data-books-per-row="6"] .row-fill > :nth-child(n+5) { display: none; }
}
@media (max-width: 767px) { .row-fill > :nth-child(n+5) { display: none; } }

/* صفٌّ أفقيّ يُمرَّر (العروض، وأعمال المؤلّف) */
.book-scroll {
	--gap: 24px;
	display: grid; grid-auto-flow: column; gap: var(--gap);
	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; padding-bottom: 2px;
}
.book-scroll::-webkit-scrollbar { display: none; }
.book-scroll > * { scroll-snap-align: start; }
.scroll-nav { display: flex; gap: 8px; }
.scroll-nav .icon-btn { width: 40px; height: 40px; background: #fff; }
@media (max-width: 1199px) { body[data-books-per-row="5"] .book-scroll, body[data-books-per-row="6"] .book-scroll { --per-row: 4; } }
@media (max-width: 1023px) { .book-scroll { --per-row: 3 !important; } }
@media (max-width: 767px) {
	.book-scroll { --gap: 12px; grid-auto-columns: 46%; }
	.scroll-nav { display: none; }
}

/* شريطٌ ملوّن للأقسام المتناوبة */
.band { background: var(--surface); }
.band .review-card { border-color: transparent; }

/* عروض الأسبوع بعدّادٍ واحد */
.deals { background: var(--tint); }
.deal-head { align-items: flex-end; }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--store-accent); }
.deal-kicker .icon { width: 17px; height: 17px; }
.deal-side { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.countdown { display: flex; align-items: center; gap: 6px; }
.cd-label { font-size: 13px; color: var(--muted); margin-inline-end: 4px; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: 6px 4px; border-radius: var(--r-sm); background: #fff; line-height: 1.2; }
.cd-unit b { font-size: 20px; font-weight: 700; color: var(--store-primary-dark); font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 11px; color: var(--muted); }

/* كتاب الأسبوع */
.bw-panel { position: relative; padding: 44px 56px; border-radius: var(--r); background: var(--surface); }
.bw-kicker { position: absolute; top: 44px; inset-inline-start: 56px; font-size: 14px; font-weight: 700; color: var(--store-primary-dark); letter-spacing: .02em; }
.bw { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 56px; align-items: center; }
.bw-cover { position: relative; grid-column: 2; grid-row: 1; display: block; padding: 34px 54px; border-radius: var(--r); background: #fff; }
.bw-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 18px 40px rgba(16, 16, 16, .2); }
.bw-cover .type-dot { top: 14px; inset-inline-end: 14px; }
.bw-body { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 34px; max-width: 620px; }
.bw-title { font-size: 40px; font-weight: 500; line-height: 1.25; }
.bw-title a:hover { color: var(--store-primary-dark); }
.bw-author { color: var(--muted); }
.bw-author span { color: var(--ink); font-weight: 500; }
.bw-desc { margin-top: 6px; font-size: 16px; line-height: 1.9; color: #33383C; }
.bw-desc p + p { margin-top: 8px; }
.bw-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bw-facts li { padding: 4px 14px; border-radius: var(--pill); background: #fff; font-size: 13px; }
.bw-body > .price { margin-top: 4px; }
.bw-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 14px; }
@media (max-width: 1023px) {
	.bw-panel { padding: 32px; }
	.bw-kicker { top: 32px; inset-inline-start: 32px; }
	.bw { grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; }
	.bw-cover { padding: 24px 32px; }
	.bw-title { font-size: 30px; }
}
@media (max-width: 767px) {
	.bw-panel { padding: 22px 18px; }
	.bw-kicker { position: static; margin-bottom: 14px; }
	.bw { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; }
	.bw-cover { grid-column: 1; padding: 12px 14px; }
	.bw-cover .type-dot { top: 6px; inset-inline-end: 6px; width: 24px; height: 24px; }
	.bw-cover .type-dot .icon { width: 13px; height: 13px; }
	.bw-body { grid-column: 2; padding-top: 0; gap: 4px; }
	.bw-title { font-size: 21px; }
	.bw-desc { grid-column: 1 / -1; font-size: 14px; }
	.bw-desc p + p, .bw-facts { display: none; }
	.bw-buy { gap: 10px 16px; margin-top: 8px; }
	.bw-buy .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
}

/* الكتب المميّزة في الهاتف: أربعٌ تكفي */
@media (max-width: 767px) {
	.feat-items > :nth-child(n+5) { display: none; }
	.feat-banner { min-height: 0; aspect-ratio: 16 / 10; }
	.feat-banner > img { object-position: center bottom; }
}

/* السلايدر في الهاتف: النصّ أوّلًا ثمّ الصورة تحته، لا خلفه */
@media (max-width: 767px) {
	.slide { flex-direction: column; align-items: stretch; height: auto; padding-top: 0; background: var(--tint); }
	.slide > img { position: static; order: 2; height: 170px; object-position: left center; }
	.slide .container { padding-block: 28px 18px; }
	.slide-text { max-width: none; }
	.slide .btn { margin-top: 18px; min-height: 42px; }
	.slider-dots { bottom: 10px; }
}

/* بلاطات التصنيف في الهاتف: صفٌّ واحد يُمرَّر */
@media (max-width: 767px) {
	.cat-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 30%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.cat-grid::-webkit-scrollbar { display: none; }
	.cat-tile { scroll-snap-align: start; }
}

/* شريط الثقة في الهاتف: شريطٌ واحد يُمرَّر */
@media (max-width: 767px) {
	.trust-bar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-top: 24px; }
	.trust-bar::-webkit-scrollbar { display: none; }
	.trust-item { scroll-snap-align: start; flex-direction: row; text-align: start; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); }
	.trust-icon { width: 28px; height: 28px; margin: 0; }
	.trust-item h3 { font-size: 15px; }
	.trust-item p { font-size: 12px; }
	.trust-section { padding-bottom: 28px; }
}

/* صفحة التصنيف: المرشّحات النشطة، والعرض شبكةً أو قائمة، والتقييم */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; }
.active-filters .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px; background: var(--tint); border-color: transparent; font-size: 13px; color: var(--store-primary-dark); }
.active-filters .chip .icon { width: 14px; height: 14px; }
.active-filters .clear { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.toolbar-end { display: flex; align-items: center; gap: 12px; }
.view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); }
.view-switch button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.view-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.view-switch .icon { width: 17px; height: 17px; }
.rate-filter .check .rating .star { width: 15px; height: 15px; }
.book-grid.is-list { grid-template-columns: 1fr; gap: 16px; }
@media (max-width: 1023px) { .listing { gap: 0; } }
.book-grid.is-list .book-card { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 20px; align-items: center; }
@media (min-width: 1024px) { .book-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.book-grid.is-list .book-cover { padding: 12px 16px; }
.book-grid.is-list .book-body { padding-top: 0; flex: none; }
.book-grid.is-list .book-body > .price { margin-top: 6px; }
.book-grid.is-list .card-cart { width: auto; align-self: flex-start; padding: 0 22px; }
@media (max-width: 767px) {
	.book-grid.is-list .book-card { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
	.book-grid.is-list .book-cover { padding: 10px 12px; }
	.toolbar-end { margin-inline-start: auto; gap: 8px; }
	.toolbar-end .sort select { max-width: 132px; padding: 0 12px; }
	.toolbar .filters-toggle { padding: 0 16px; }
}

/* صفحة الكتاب: اختيار الصيغة، وصندوق التوصيل والدفع */
.formats-box { display: flex; flex-direction: column; gap: 8px; }
.formats-label { font-size: 13px; color: var(--muted); }
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.format-opt { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; transition: border-color .2s; }
.format-opt:hover { border-color: var(--ink); }
.format-opt .type-dot { grid-row: 1 / span 2; }
.format-opt b { font-size: 14px; font-weight: 500; }
.format-opt .format-price { font-size: 13px; color: var(--store-accent); font-weight: 700; }
.format-opt[aria-current="page"] { border-color: var(--store-primary); background: var(--tint); }
.delivery-box { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); font-size: 14px; }
.delivery-box li { display: flex; align-items: flex-start; gap: 10px; }
.delivery-box .icon { width: 19px; height: 19px; margin-top: 2px; color: var(--store-primary-dark); }
.delivery-box b { font-weight: 500; }
.delivery-box span { color: var(--muted); }
@media (max-width: 767px) { .formats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; } .format-opt { grid-template-columns: 1fr; padding: 8px; text-align: center; justify-items: center; } .format-opt .type-dot { grid-row: auto; margin-bottom: 4px; } }

/* إيقاع الأقسام: لا مسافةٌ مضاعفة بين قسمين أبيضين، ومسافةٌ واحدة حول الأشرطة الملوّنة */
.section:not(.band):not(.deals):not(.section-tight) + .section:not(.band):not(.deals) { padding-top: 0; }
.section-tight + .section.band, .section-tight + .section.deals,
.section.band + .section-tight, .section.deals + .section-tight { margin-top: 64px; }
@media (max-width: 1023px) {
	.section-tight + .section.band, .section-tight + .section.deals,
	.section.band + .section-tight, .section.deals + .section-tight { margin-top: 52px; }
}
@media (max-width: 767px) {
	.section-tight + .section.band, .section-tight + .section.deals,
	.section.band + .section-tight, .section.deals + .section-tight { margin-top: 40px; }
	/* البانرات العريضة والمزدوجة: النصّ ثمّ الصورة تحته */
	.big-banner, .wide-banner { flex-direction: column; align-items: stretch; min-height: 0; height: auto; aspect-ratio: auto; }
	.big-banner > img, .wide-banner > img { position: static; order: 2; height: 150px; object-position: left center; }
	.big-banner-text, .wide-text { width: 100%; padding: 22px 20px 4px; }
	.bw-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
	.trust-bar { grid-auto-columns: 74%; }
}
@media (min-width: 1024px) { .review-row { grid-auto-columns: calc((100% - 48px) / 3); } }

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

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