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

:root {
	--store-primary: #1C3481;
	--store-primary-dark: #12245E;
	--store-accent: #00BAF2;
	--store-bg: #FFFFFF;
	--store-text: #333333;

	/* محايدة ومشتقّة */
	--surface: #FFFFFF;
	--soft: color-mix(in srgb, var(--store-accent) 6%, #FFFFFF);
	--soft-2: color-mix(in srgb, var(--store-primary) 5%, #F2F4F6);
	--accent-ink: color-mix(in srgb, var(--store-accent) 50%, #000000);
	--line: #E2E6EC;
	--line-strong: #CDD3DC;
	--muted: #5C6370;
	--heading: #222222;
	--on-primary: #FFFFFF;
	--on-primary-muted: #D3DBF2;
	--sale: #C62828;
	--ok: #2E7D32;
	--gold: #F5A623;
	--type-print: #DB7056;
	--type-ebook: #5675A3;
	--type-audio: #986AB0;
	--type-educational: #3f8f6b;

	--r: 3px;
	--per-row: 5;
	--per-row-listing: 4;
	--container: 1400px;
	--font: "Tajawal", system-ui, sans-serif;
}

body[data-corners="rounded"] { --r: 12px; }
body[data-books-per-row="4"] { --per-row: 4; --per-row-listing: 3; }
body[data-books-per-row="5"] { --per-row: 5; --per-row-listing: 4; }
body[data-books-per-row="6"] { --per-row: 6; --per-row-listing: 5; }

/* ---------- الأساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 150px; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
del { color: var(--muted); font-weight: 400; }
fieldset { border: 0; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }

.icon {
	width: 20px; height: 20px; flex: none;
	fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip-link {
	position: absolute; top: -60px; right: 12px; z-index: 100;
	background: var(--store-accent); color: var(--store-primary); padding: 8px 14px; font-weight: 700;
}
.skip-link:focus { top: 8px; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }

/* ---------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 42px; padding: 0 22px; border-radius: var(--r);
	border: 1px solid transparent; font-weight: 700; font-size: 14.5px; white-space: nowrap;
	transition: background .15s, color .15s, border-color .15s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-accent); color: var(--store-primary); }
.btn-primary:hover { background: var(--store-primary); color: var(--on-primary); }
.btn-dark { background: var(--store-primary); color: var(--on-primary); }
.btn-dark:hover { background: var(--store-primary-dark); }
.btn-outline { background: var(--surface); color: var(--store-primary); border-color: var(--store-primary); }
.btn-outline:hover { background: var(--store-primary); color: var(--on-primary); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { min-height: 48px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.pill-btn {
	display: inline-flex; align-items: center; min-height: 42px; padding: 0 34px; border-radius: 999px;
	background: var(--surface); color: var(--store-primary); font-weight: 700; font-size: 14.5px; white-space: nowrap;
}
.link-btn {
	display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0;
	color: var(--store-primary); font-weight: 500; font-size: 14px;
}
.link-btn .icon { width: 18px; height: 18px; }
.link-btn[aria-pressed="true"] .icon { color: var(--sale); fill: currentColor; }
.act-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r);
	background: var(--store-accent); color: var(--store-primary); transition: background .15s, color .15s;
}
.act-btn .icon { width: 19px; height: 19px; }
.act-btn:hover { background: var(--store-primary); color: var(--on-primary); }
.act-btn[aria-pressed="true"] { background: var(--store-primary); color: var(--on-primary); }
.act-btn[aria-pressed="true"] .icon { fill: currentColor; }
.act-btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.see-all { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-weight: 700; font-size: 14px; }
.see-all .icon { width: 16px; height: 16px; }
.see-all:hover { color: var(--store-primary); }

/* ---------- الرأس مثبّتٌ أعلى الشاشة؛ الشريط العلويّ وحده يمرّ (--topbar-h يضبطه theme.js) */
.site-header { position: sticky; top: calc(-1 * var(--topbar-h, 36px)); z-index: 50; background: var(--surface); }
.site-header.is-stuck { box-shadow: 0 4px 16px rgba(15, 22, 45, .08); }

/* ---------- الشريط العلويّ السماويّ */
.topbar { background: var(--store-accent); color: var(--store-primary); font-size: 13.5px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar-note { font-weight: 500; }
.topbar-note:empty { display: none; }
.topbar-links { display: flex; gap: 20px; margin-inline-start: auto; }
.topbar-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.topbar-links a:hover { text-decoration: underline; }
.topbar-links .icon { width: 16px; height: 16px; }

/* ---------- الرأس الأبيض */
.header-main { background: var(--surface); }
.header-main .container { display: flex; align-items: center; gap: 28px; min-height: 86px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 46px; height: 46px; }
.brand-name { font-size: 24px; font-weight: 800; color: var(--store-primary); letter-spacing: -.2px; }
.header-search {
	flex: 1; display: flex; align-items: stretch; min-width: 0; max-width: 660px; height: 48px; margin-inline: auto;
	border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface);
}
.header-search:focus-within { border-color: var(--store-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--store-accent) 35%, transparent); }
.search-go { flex: none; width: 52px; border: 0; border-inline-end: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.search-go:hover { color: var(--store-primary); }
.header-search input { flex: 1; min-width: 0; border: 0; padding: 0 16px; font-size: 14.5px; background: transparent; }
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus { outline: none; }
.header-search select { flex: none; width: 160px; border: 0; border-inline-start: 1px solid var(--line); background: var(--surface); padding: 0 12px; font-size: 14px; color: var(--store-text); cursor: pointer; }
.header-cart { display: flex; align-items: center; gap: 12px; flex: none; color: var(--store-primary); }
.cart-icon { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; }
.cart-icon .icon { width: 32px; height: 32px; stroke-width: 1.5; }
.count-badge {
	position: absolute; top: -2px; left: -2px; min-width: 20px; height: 20px; padding: 0 5px;
	border-radius: 10px; background: var(--store-accent); color: var(--store-primary);
	font-size: 11.5px; font-weight: 800; line-height: 20px; text-align: center;
}
.cart-text b { display: block; font-size: 14.5px; font-weight: 800; line-height: 1.3; }
.cart-text small { display: block; font-size: 13px; color: var(--muted); }
.hdr-icon {
	position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px;
	border: 0; background: transparent; color: var(--store-primary);
}
.hdr-icon .icon { width: 26px; height: 26px; }
.menu-toggle { display: none; }

/* ---------- صفّ التنقّل الكحليّ */
.header-nav { background: var(--store-primary); color: var(--on-primary); }
.header-nav .container { display: flex; align-items: stretch; gap: 28px; min-height: 54px; }
.cats-menu { position: relative; display: flex; flex: none; }
.cats-btn {
	display: flex; align-items: center; gap: 10px; padding: 0 20px; width: 250px;
	background: var(--store-accent); border: 0; color: var(--store-primary); font-weight: 800; font-size: 15px;
}
.cats-btn .icon:last-child { margin-inline-start: auto; width: 16px; height: 16px; transition: transform .2s; }
.cats-menu.open .cats-btn .icon:last-child { transform: rotate(180deg); }
.cats-drop {
	position: absolute; top: 100%; inset-inline-start: 0; width: 250px; z-index: 40;
	background: var(--surface); color: var(--store-text); border: 1px solid var(--line); border-top: 0;
	padding: 6px 0; box-shadow: 0 14px 30px rgba(15, 22, 45, .14);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.cats-menu.open .cats-drop, .cats-menu:hover .cats-drop, .cats-menu:focus-within .cats-drop { opacity: 1; visibility: visible; transform: none; }
.cats-drop a { display: block; padding: 9px 20px; font-size: 14.5px; }
.cats-drop li + li a { border-top: 1px solid var(--line); }
.cats-drop a:hover { background: var(--soft); color: var(--store-primary); }
.nav-list { display: flex; align-items: center; gap: 26px; }
.nav-list a { font-weight: 700; font-size: 14.5px; padding: 14px 0; display: inline-block; }
.nav-list a:hover { color: var(--store-accent); }
.nav-user { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; }
.nav-user a { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.nav-user a:hover { color: var(--store-accent); }
.nav-user .icon { width: 22px; height: 22px; }
.nav-wish .count-badge { top: -8px; left: auto; right: 12px; }
.nav-offer {
	display: flex; align-items: center; gap: 12px; padding: 0 24px; flex: none;
	background: var(--store-accent); color: var(--store-primary);
}
.offer-icon { width: 30px; height: 30px; stroke-width: 2; }
.nav-offer small { display: block; font-size: 12px; font-weight: 500; line-height: 1.2; }
.nav-offer b { display: block; font-size: 17px; font-weight: 800; line-height: 1.3; }

/* ---------- الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10, 16, 35, .5); z-index: 80; opacity: 0; visibility: hidden; transition: .2s; }
.drawer {
	position: fixed; top: 0; bottom: 0; right: 0; width: min(320px, 86vw); z-index: 90;
	background: var(--surface); overflow-y: auto; padding-bottom: 20px; display: none;
}
body.drawer-open .drawer { display: block; animation: slide-in .25s ease-out; }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
body.drawer-open .drawer-backdrop, body.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--store-primary); color: var(--on-primary); }
.drawer-head .brand-name { font-size: 20px; color: var(--on-primary); }
.drawer-head .brand img { width: 36px; height: 36px; }
.drawer-head .hdr-icon { color: var(--on-primary); }
.drawer-nav { padding: 6px 0; border-bottom: 1px solid var(--line); }
.drawer-nav a { display: block; padding: 10px 18px; font-weight: 500; }
.drawer-nav a:hover { background: var(--soft); }
.drawer-cats a { padding-inline-start: 28px; font-weight: 400; font-size: 14.5px; }
.drawer-label { padding: 12px 18px 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.drawer-call { display: flex; align-items: center; gap: 10px; margin: 16px 18px 0; padding: 12px 14px; background: var(--store-accent); color: var(--store-primary); border-radius: var(--r); }

/* ---------- أقسام عامّة */
main { display: block; }
.section { padding: 34px 0; }
.section-soft { background: var(--soft); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-title { font-size: 20px; font-weight: 800; color: var(--heading); }
.sec-title small { font-size: 15px; font-weight: 500; color: var(--muted); }
.sec-title.center, .section-center .sec-head { justify-content: center; text-align: center; }
.section-center .sec-title, .sec-title.center { position: relative; padding-bottom: 10px; }
.section-center .sec-title::after, .sec-title.center::after {
	content: ""; position: absolute; bottom: 0; right: 50%; transform: translateX(50%); width: 54px; height: 3px; background: var(--store-accent);
}

/* ---------- السعر والتقييم ودوائر الأنواع */
.price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--store-primary); font-weight: 800; font-size: 15px; }
.price del { font-size: 13px; }
.price-lg { font-size: 22px; }
.price-lg del { font-size: 15px; }
.price-xl { font-size: 28px; }
.price-xl del { font-size: 17px; }
.price-stack { flex-direction: column-reverse; align-items: flex-end; gap: 0; text-align: left; flex: none; }
.rating { display: inline-flex; align-items: center; }
.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: #D5D9DF; }
.rating-row { display: flex; align-items: center; gap: 6px; }
.rating-row .count { font-size: 12.5px; color: var(--muted); }
.rating-lg .stars .icon { width: 18px; height: 18px; }
.rating-lg a { font-size: 14px; color: var(--accent-ink); font-weight: 500; }

.type-dot {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
	color: #FFFFFF; box-shadow: 0 0 0 2px #FFFFFF; vertical-align: middle;
}
.type-dot .icon { width: 16px; height: 16px; stroke-width: 2; }
.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); }
.book-media > .type-dot, .hcard-media > .type-dot, .recent-media > .type-dot, .feat-media > .type-dot,
.gallery-main > .type-dot, .cart-thumb > .type-dot { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 2; }
.hcard-media > .type-dot, .recent-media > .type-dot, .cart-thumb > .type-dot { width: 22px; height: 22px; top: -6px; inset-inline-start: -6px; }
.hcard-media > .type-dot .icon, .recent-media > .type-dot .icon, .cart-thumb > .type-dot .icon { width: 12px; height: 12px; }

/* ---------- بطاقة الكتاب */
.book-grid { --cols: var(--per-row); display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 14px; }
.book-card {
	position: relative; display: flex; flex-direction: column; min-width: 0;
	background: var(--surface); border: 1px solid transparent; border-radius: var(--r); padding: 12px 12px 14px;
	transition: box-shadow .2s, border-color .2s;
}
body[data-card-style="framed"] .book-card { border-color: var(--line); }
body[data-card-style="lifted"] .book-card { box-shadow: 0 4px 16px rgba(20, 35, 80, .08); }
.book-card:hover { box-shadow: 0 8px 24px rgba(20, 35, 80, .12); }
.book-media { position: relative; aspect-ratio: 4 / 5; padding: 6px 0; margin-bottom: 12px; }
.book-media > a { position: absolute; inset: 6px 0; display: block; }
.book-media img {
	height: 100%; width: auto; aspect-ratio: 2 / 3; object-fit: cover; margin-inline: auto;
	box-shadow: 0 6px 14px rgba(15, 25, 50, .16);
}
.book-flags { position: absolute; top: 4px; left: 4px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flag-new {
	display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
	background: var(--store-accent); color: var(--store-primary); font-size: 12.5px; font-weight: 800;
}
.flag-sale {
	writing-mode: vertical-rl; background: var(--surface); color: var(--store-primary);
	font-size: 12.5px; font-weight: 800; letter-spacing: .3px; padding: 6px 2px;
}
.stock-band {
	position: absolute; inset-inline: 0; top: 46%; z-index: 2; padding: 6px 8px; text-align: center;
	background: #3A3F47; color: #FFFFFF; font-size: 13px; font-weight: 700;
}
.is-out .book-media img { filter: grayscale(.7); opacity: .75; }
/* المفضّلة والنظرة السريعة تطفوان فوق أسفل الغلاف (تظهران عند التحويم، ودائمًا باللمس) ولا تحجزان مكانًا */
.book-actions {
	position: absolute; bottom: 14px; right: 50%; transform: translate(50%, 8px); z-index: 3;
	display: flex; gap: 6px; opacity: 0; transition: .2s;
}
.book-card:hover .book-actions, .book-card:focus-within .book-actions { opacity: 1; transform: translate(50%, 0); }
@media (hover: none) { .book-actions { opacity: 1; transform: translate(50%, 0); } }
.book-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.book-main { min-width: 0; }
/* صفّ الشراء: السعر ومربّع السلّة السماويّ، ظاهرٌ دائمًا ويُدفع وحده إلى أسفل البطاقة (البند 7) */
.book-buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.book-buy .price-stack { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; text-align: start; flex: 1; min-width: 0; }
.cart-btn { width: 40px; height: 40px; flex: none; }
.cart-btn .icon { width: 20px; height: 20px; }
.book-desc { display: none; }
.book-title { font-size: 14.5px; font-weight: 700; color: var(--heading); line-height: 1.45; }
.book-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-title a:hover { color: var(--store-primary); }
.book-author { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-main .rating-row { margin-bottom: 4px; }

/* ---------- البطاقة الأفقيّة */
.hlist { display: flex; flex-direction: column; gap: 14px; }
.hcard { display: flex; align-items: center; gap: 14px; }
.hcard .cart-btn { margin-inline-start: auto; align-self: flex-end; }
.hcard-media { position: relative; width: 78px; flex: none; padding: 5px; background: var(--surface); border: 1px solid var(--line); }
.hcard-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.hcard-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hcard-body .book-title { font-size: 14px; }

/* ---------- تصنيفات رائجة */
.quick-cats { border-bottom: 1px solid var(--line); }
.quick-cats .container { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 50px; }
.quick-label { font-size: 13.5px; font-weight: 800; color: var(--store-primary); flex: none; }
.quick-label::after { content: " :"; color: var(--muted); }
.quick-list { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.quick-list::-webkit-scrollbar { display: none; }
.quick-list a { font-size: 14px; color: var(--muted); white-space: nowrap; }
.quick-list a:hover { color: var(--store-primary); }

/* ---------- السلايدر */
.hero { padding-top: 14px; }
.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; }
.hero .slide { aspect-ratio: 1400 / 500; background: var(--soft); overflow: hidden; }
.hero .slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-text {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
	text-align: center; padding: 20px 30%;
}
.slide-text h1, .slide-text h2 { font-size: clamp(26px, 3.2vw, 46px); font-weight: 800; color: var(--store-primary); line-height: 1.25; }
.slide-badge {
	position: absolute; bottom: 0; left: 0; padding: 11px 28px;
	background: var(--store-accent); color: var(--store-primary); font-weight: 800; font-size: 15px;
}
.slider-arrow {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px;
	display: grid; place-items: center; border: 0; background: rgba(255, 255, 255, .92); color: var(--store-primary);
	box-shadow: 0 4px 12px rgba(15, 25, 50, .12);
}
.slider-arrow[data-slide="prev"] { right: 12px; }
.slider-arrow[data-slide="next"] { left: 12px; }
.slider-arrow:hover { background: var(--store-accent); }
.slider-dots { position: absolute; bottom: 14px; right: 50%; transform: translateX(50%); display: flex; gap: 8px; z-index: 3; }
.slider-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 2px solid var(--store-primary); background: transparent; }
.slider-dots button[aria-current="true"] { background: var(--store-primary); }

/* ---------- البانرات الثلاثة */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.trio-pair { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.banner { position: relative; display: block; overflow: hidden; aspect-ratio: 460 / 240; background: var(--soft); border-radius: var(--r); }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; transition: transform .4s; }
.banner:hover img { transform: scale(1.03); }
.banner-text {
	position: absolute; inset-block: 0; inset-inline-start: 0; width: 56%; padding: 20px 24px;
	display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.kicker { font-size: 14.5px; font-weight: 500; color: var(--accent-ink); }
.banner-text strong { font-size: 23px; font-weight: 800; color: var(--store-primary); line-height: 1.3; }
.banner-link { margin-top: 10px; font-size: 13.5px; font-weight: 800; color: var(--heading); }
.banner:hover .banner-link { color: var(--store-primary); text-decoration: underline; }

/* ---------- العنوان الترويجيّ */
.headline { padding: 38px 0 30px; text-align: center; }
.headline-title { font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; color: var(--store-primary); }
.headline-title:empty { display: none; }
.headline-frame { margin: 18px auto 0; max-width: 1080px; padding: 5px; border: 2px dashed var(--store-accent); border-radius: 999px; }
.headline-frame:has(.headline-pill:empty) { display: none; }
.headline:has(.headline-title:empty):has(.headline-pill:empty) { display: none; }
.headline-pill { padding: 14px 26px; border-radius: 999px; background: var(--store-primary); color: var(--on-primary); font-weight: 700; font-size: 15.5px; }

/* ---------- التبويبات */
.tabs-section { padding-top: 0; }
.tab-btns { display: flex; justify-content: center; gap: 36px; background: var(--surface); margin-bottom: 22px; padding-inline: 16px; overflow-x: auto; scrollbar-width: none; }
.tab-btns button {
	background: none; border: 0; border-top: 4px solid transparent; padding: 16px 2px 14px;
	font-size: 16.5px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.tab-btns button:hover { color: var(--store-primary); }
.tab-btns button[aria-selected="true"] { border-top-color: var(--store-accent); color: var(--store-primary); }

/* ---------- البانر العريض وشريط العرض */
.wide-banner { margin: 30px 0; }
.banner-wide { aspect-ratio: 1400 / 240; }
.banner-wide img { object-position: center; }
.banner-wide .banner-text { inset-inline: 0; width: auto; align-items: center; text-align: center; padding: 16px 28%; gap: 6px; }
.banner-wide .kicker { font-size: 18px; }
.banner-wide strong { font-size: clamp(24px, 2.8vw, 38px); }
.banner-wide .btn { margin-top: 8px; }
.deal-strip { position: relative; background: var(--store-accent); }
.deal-link { position: relative; display: block; color: var(--store-primary); }
.deal-link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.deal-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 120px; padding-block: 18px; }
.deal-text { display: flex; flex-direction: column; }
.deal-text .kicker { color: var(--store-primary); font-size: 15.5px; }
.deal-text strong { font-size: clamp(20px, 2.2vw, 28px); font-weight: 800; }
.deal-link:hover .pill-btn { background: var(--store-primary); color: var(--on-primary); }

/* ---------- التصنيفات على الكحليّ */
.cat-band { background: var(--store-primary); padding: 34px 0; }
.cat-row { display: flex; justify-content: space-around; gap: 24px; overflow-x: auto; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-circle { display: flex; flex-direction: column; align-items: center; gap: 14px; flex: none; color: var(--on-primary); }
.cat-ring { display: block; width: 124px; aspect-ratio: 1; padding: 5px; border: 2px solid #FFFFFF; border-radius: 50%; flex: none; }
.cat-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 3px solid #FFFFFF; transition: transform .3s; }
.cat-circle:hover img, .strip-item:hover img { transform: scale(1.05); }
.cat-name { font-size: 14.5px; font-weight: 800; }

/* ---------- شريط الثقة */
.trust-bar { padding: 14px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.trust-item {
	display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
	background: var(--surface); padding: 18px 12px; border-radius: var(--r);
}
.trust-item .icon { width: 28px; height: 28px; color: var(--accent-ink); margin-bottom: 4px; }
.trust-item b { font-size: 15.5px; font-weight: 800; color: var(--heading); letter-spacing: .2px; }
.trust-item small { font-size: 13px; color: var(--muted); }

/* ---------- القوائم الثلاث */
.lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.list-col, .side-list { background: var(--soft-2); padding: 20px; border-radius: var(--r); }
.list-title { font-size: 17px; font-weight: 800; color: var(--store-primary); padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line-strong); position: relative; }
.list-title::after { content: ""; position: absolute; bottom: -1px; inset-inline-start: 0; width: 46px; height: 3px; background: var(--store-accent); }

/* ---------- كتابٌ مختار */
.featured-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.featured { background: var(--soft-2); padding: 22px; border-radius: var(--r); }
.featured .sec-title { margin-bottom: 20px; display: block; }
.feat-grid { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 12px; }
.feat-item:first-child { grid-row: 1 / span 3; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; align-items: center; }
.feat-item:not(:first-child) { grid-column: 2; }
.feat-item:not(:first-child) .feat-body { display: none; }
.feat-media { position: relative; background: var(--surface); padding: 16px; border-radius: var(--r); }
.feat-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 6px 14px rgba(15, 25, 50, .16); }
.feat-item:not(:first-child) .feat-media { padding: 6px; border: 1px solid var(--line); }
.feat-item:not(:first-child) .feat-media img { box-shadow: none; }
.feat-item:not(:first-child) .type-dot { width: 22px; height: 22px; top: -6px; inset-inline-start: -6px; }
.feat-item:not(:first-child) .type-dot .icon { width: 12px; height: 12px; }
.feat-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.feat-title { font-size: 24px; font-weight: 800; color: var(--heading); }
.feat-title a:hover { color: var(--store-primary); }
.feat-desc { font-size: 14.5px; color: var(--muted); line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.feat-body .btn { margin-top: 8px; }
.side-list .see-all { margin-top: 16px; }

/* ---------- آراء القرّاء على السماويّ */
.reviews-band { background: var(--store-accent); color: var(--store-primary); padding: 40px 0 34px; }
.review-slider { max-width: 860px; margin-inline: auto; }
.review-slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: center; gap: 30px; padding: 4px 8px 6px; }
.review-avatar {
	display: grid; place-items: center; flex: none; width: 100px; height: 100px; border-radius: 50%;
	background: var(--store-primary); color: var(--on-primary); font-size: 40px; font-weight: 800;
	box-shadow: 0 0 0 5px var(--store-accent), 0 0 0 7px #FFFFFF;
}
.review-name { display: block; font-size: 16px; font-weight: 800; }
.review-slide p { margin-top: 6px; font-size: 15.5px; line-height: 1.85; }
.review-slider .slider-arrow { display: none; }
.review-slider .slider-nav { margin-top: 18px; height: 12px; position: relative; }
.review-slider .slider-dots { bottom: 0; }

/* ---------- المؤلّفون */
.authors-strip { position: relative; }
.author-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.author-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; }
.author-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.author-tile:hover img { transform: scale(1.05); }
.author-cap { position: absolute; bottom: 0; inset-inline: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 7px 10px; background: var(--store-primary); color: var(--on-primary); }
.author-cap b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author-cap small { font-size: 12px; color: var(--on-primary-muted); flex: none; }
.authors-box {
	position: absolute; top: 50%; right: 50%; transform: translate(50%, -50%); z-index: 2;
	background: var(--surface); padding: 18px 44px; text-align: center; box-shadow: 0 8px 24px rgba(15, 25, 50, .15);
}
.authors-box h2 { font-size: 19px; font-weight: 800; color: var(--store-primary); }
.authors-box h2::before { content: "# "; color: var(--accent-ink); }
.authors-box a { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; color: var(--accent-ink); }
.authors-box a .icon { width: 15px; height: 15px; }

/* ---------- شاهدتَه مؤخّرًا */
.recent-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.recent-card { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; }
.recent-media { position: relative; width: 56px; flex: none; }
.recent-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.recent-card .book-title { font-size: 13.5px; }
.recent-card .price { font-size: 14px; }
.recent-card .price del { font-size: 12px; }

/* ---------- التذييل */
.site-footer { border-top: 1px solid var(--line); margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.25fr 1.25fr; gap: 36px; padding: 46px 0 36px; }
.footer-col h2 { font-size: 16.5px; font-weight: 800; color: var(--heading); margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { font-size: 14.5px; color: var(--muted); }
.footer-col ul a:hover { color: var(--store-primary); }
.footer-about p { margin-top: 16px; font-size: 14.5px; color: var(--muted); line-height: 1.85; max-width: 380px; }
.footer-contact p { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--muted); margin-bottom: 10px; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--accent-ink); }
.footer-contact b { font-weight: 500; }
.newsletter p { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
.nl-field { display: flex; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.nl-field input { flex: 1; min-width: 0; border: 0; padding: 0 14px; font-size: 14.5px; }
.nl-field input::placeholder { color: var(--muted); }
.nl-field input:focus { outline: none; }
.nl-field:focus-within { border-color: var(--store-accent); }
.nl-icon { display: grid; place-items: center; width: 46px; background: var(--store-accent); color: var(--store-primary); }
.newsletter .btn { margin-top: 12px; }
.footer-bottom { background: var(--store-primary-dark); color: var(--on-primary); }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding-block: 10px; font-size: 14px; }
.social { display: flex; gap: 8px; }
.social a { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #FFFFFF; color: var(--store-primary-dark); }
.social a:hover { background: var(--store-accent); color: var(--store-primary); }
.social .icon { width: 16px; height: 16px; }

/* ---------- رأس الصفحات الداخليّة */
.page-head { background: var(--soft); padding: 26px 0; }
.page-head .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; color: var(--store-primary); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line-strong); }
.breadcrumb a:hover { color: var(--store-primary); }
.breadcrumb [aria-current] { color: var(--store-text); font-weight: 700; }

/* ---------- صفحة التصنيف */
.cat-strip { background: var(--store-primary); padding: 18px 0; }
.strip { display: flex; justify-content: center; gap: 34px; overflow-x: auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-item { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; color: var(--on-primary); font-size: 13.5px; font-weight: 700; }
.strip-item .cat-ring { width: 84px; padding: 3px; }
.strip-item .cat-ring img { border-width: 2px; }
.listing-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; padding-block: 26px 40px; }
.filters-head { display: none; }
.fbox { border: 1px solid var(--line); background: var(--surface); padding: 16px; margin-bottom: 14px; border-radius: var(--r); }
.fbox-title { font-size: 15px; font-weight: 800; color: var(--store-primary); padding-inline-start: 10px; border-inline-start: 3px solid var(--store-accent); margin-bottom: 12px; }
.check-list li label { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 5px 0; cursor: pointer; }
.check-list input { accent-color: var(--store-primary); width: 16px; height: 16px; margin: 0; }
.check-list .type-dot { width: 22px; height: 22px; box-shadow: none; }
.check-list .type-dot .icon { width: 12px; height: 12px; }
.fcount { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); }
.price-inputs { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.price-inputs input { width: 76px; height: 38px; border: 1px solid var(--line-strong); padding: 0 8px; border-radius: var(--r); }
.sort-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px solid var(--line); padding: 10px 14px; margin-bottom: 16px; border-radius: var(--r); }
.filters-toggle { display: none; }
.view-switch { display: flex; gap: 6px; }
.view-switch button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: var(--r); }
.view-switch button[aria-pressed="true"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--store-primary); }
.listing-count { font-size: 14px; color: var(--muted); }
.listing-count b { color: var(--store-text); font-weight: 700; }
.sort-field { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; font-size: 14px; }
.sort-field select { height: 38px; border: 1px solid var(--line-strong); padding: 0 10px; background: var(--surface); border-radius: var(--r); }
.listing-grid { --cols: var(--per-row-listing); background: var(--soft); padding: 14px; border-radius: var(--r); }
.listing-grid[data-view="list"] { --cols: 1; }
.listing-grid[data-view="list"] .book-card { flex-direction: row; align-items: center; gap: 20px; }
.listing-grid[data-view="list"] .book-media { width: 150px; flex: none; margin: 0; }
.listing-grid[data-view="list"] .book-body { flex: 1; align-self: center; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; }
.pagination a, .pagination span {
	display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px;
	border: 1px solid var(--line); color: var(--store-text); font-weight: 700; font-size: 14.5px; border-radius: var(--r);
}
.pagination span { border-color: transparent; }
.pagination a:hover { border-color: var(--store-primary); color: var(--store-primary); }
.pagination a[aria-current="page"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--store-primary); }
.pagination .icon { width: 18px; height: 18px; }

/* ---------- صفحة الكتاب */
.pdp { display: grid; grid-template-columns: 340px minmax(0, 1fr) 250px; gap: 30px; padding-block: 30px 10px; align-items: start; }
.gallery-main { position: relative; background: var(--soft); padding: 26px; border-radius: var(--r); }
.gallery-main img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 10px 24px rgba(15, 25, 50, .18); }
.gallery-main > .type-dot { top: 12px; inset-inline-start: 12px; width: 34px; height: 34px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs button { width: 66px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.thumbs button[aria-pressed="true"] { border: 2px solid var(--store-accent); }
.thumbs img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.pdp-type { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.pdp-type .type-dot { width: 24px; height: 24px; box-shadow: none; }
.pdp-type .type-dot .icon { width: 13px; height: 13px; }
.pdp-title { font-size: 28px; font-weight: 800; color: var(--heading); margin-top: 8px; }
.pdp-author { font-size: 15px; color: var(--muted); margin: 4px 0 8px; }
.pdp-author a { color: var(--accent-ink); font-weight: 700; }
.pdp-price { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 10px; padding-block: 12px; border-block: 1px solid var(--line); }
.disc-tag { display: inline-block; padding: 3px 10px; background: var(--store-accent); color: var(--store-primary); font-size: 13px; font-weight: 800; border-radius: var(--r); }
.pdp-lead { font-size: 15px; color: var(--muted); line-height: 1.85; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 14px; }
.fact { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); }
.fact .icon { grid-row: span 2; width: 26px; height: 26px; color: var(--accent-ink); }
.fact small { font-size: 12.5px; color: var(--muted); }
.fact b { font-size: 14.5px; font-weight: 700; }
.stock-line { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ok); margin-bottom: 14px; }
.stock-line .icon { width: 18px; height: 18px; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: stretch; height: 48px; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.qty button { width: 40px; border: 0; background: var(--soft); color: var(--store-primary); display: grid; place-items: center; }
.qty button:hover { background: var(--store-accent); }
.qty .icon { width: 16px; height: 16px; }
.qty input { width: 52px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 16px; }
.pdp-side { display: flex; flex-direction: column; gap: 10px; }
.side-perk { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); }
.side-perk .icon { width: 30px; height: 30px; color: var(--accent-ink); stroke-width: 1.6; }
.side-perk b { display: block; font-size: 14.5px; font-weight: 800; color: var(--heading); }
.side-perk small { font-size: 12.5px; color: var(--muted); }
.pdp-tabs { display: flex; justify-content: center; gap: 34px; margin-top: 34px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.pdp-tabs a { padding: 14px 2px 12px; border-top: 4px solid transparent; font-size: 16.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.pdp-tabs a:hover { color: var(--store-primary); }
.pdp-tabs a[aria-current="true"] { border-top-color: var(--store-accent); color: var(--store-primary); }
.pdp-panels { padding-bottom: 30px; }
.pdp-panel { padding-top: 28px; scroll-margin-top: 20px; }
.panel-title { font-size: 19px; font-weight: 800; color: var(--store-primary); margin-bottom: 14px; }
.prose { font-size: 15.5px; line-height: 1.95; max-width: 860px; }
.prose p + p { margin-top: 10px; }
.spec-table { width: 100%; max-width: 680px; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { padding: 10px 14px; border: 1px solid var(--line); text-align: start; }
.spec-table th { width: 180px; background: var(--soft); font-weight: 700; }
.reviews-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: start; }
.review-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.review-item:first-child { padding-top: 0; }
.review-item .review-avatar { width: 46px; height: 46px; font-size: 18px; box-shadow: none; background: var(--soft-2); color: var(--store-primary); }
.review-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.review-top b { font-size: 15px; }
.review-top small { font-size: 12.5px; color: var(--muted); }
.review-item p { font-size: 14.5px; line-height: 1.85; }
.review-form { background: var(--soft); padding: 20px; border-radius: var(--r); }
.review-form h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--store-primary); }
.review-form h3 .icon { color: var(--accent-ink); }
.review-form p { font-size: 14px; color: var(--muted); margin: 6px 0 10px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; margin-bottom: 10px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #C9CED6; }
.star-input label .icon { width: 26px; height: 26px; }
.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); }
.review-form textarea { width: 100%; border: 1px solid var(--line-strong); padding: 10px 12px; resize: vertical; margin-bottom: 10px; background: var(--surface); border-radius: var(--r); }

/* ---------- صفحة المؤلّف */
.author-hero { background: var(--store-primary); color: var(--on-primary); padding: 40px 0; }
.author-hero .container { display: flex; align-items: center; gap: 40px; }
.author-ring { width: 180px; }
.author-hero .breadcrumb { color: var(--on-primary-muted); }
.author-hero .breadcrumb li + li::before { color: var(--on-primary-muted); }
.author-hero .breadcrumb [aria-current] { color: var(--on-primary); }
.author-hero .breadcrumb a:hover { color: var(--store-accent); }
.author-hero h1 { font-size: 32px; font-weight: 800; margin-top: 8px; }
.author-count { color: var(--store-accent); font-weight: 800; font-size: 15px; }
.author-bio { margin-top: 12px; max-width: 780px; color: var(--on-primary-muted); font-size: 15px; line-height: 1.9; }
.author-bio p + p { margin-top: 8px; }
.author-grid { background: var(--soft); padding: 14px; border-radius: var(--r); }

/* ---------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 26px; padding-block: 30px 40px; align-items: start; }
.cart-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cart-cols, .cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 140px 120px 40px; gap: 14px; align-items: center; }
.cart-cols { background: var(--store-primary); color: var(--on-primary); padding: 12px 16px; font-weight: 700; font-size: 14px; border-radius: var(--r) var(--r) 0 0; }
.cart-row { padding: 16px; border: 1px solid var(--line); border-top: 0; }
.cart-product { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cart-thumb { position: relative; width: 64px; flex: none; }
.cart-thumb img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.cell-label { display: none; }
.cart-row .qty { height: 40px; }
.cart-row .qty button { width: 34px; }
.cart-row .qty input { width: 44px; }
.cart-line b { color: var(--store-primary); font-weight: 800; }
.remove-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: var(--r); }
.remove-btn:hover { color: var(--sale); border-color: var(--sale); }
.remove-btn .icon { width: 18px; height: 18px; }
.empty-cart { text-align: center; padding: 40px 16px; border: 1px solid var(--line); }
.empty-cart[hidden] { display: none; }
.empty-icon { width: 52px; height: 52px; color: var(--accent-ink); margin: 0 auto 10px; }
.empty-cart p { color: var(--muted); margin: 6px 0 16px; }
.coupon { margin-top: 18px; padding: 16px; border: 2px dashed var(--store-accent); border-radius: var(--r); }
.coupon label { display: block; font-weight: 800; margin-bottom: 8px; }
.coupon-field { display: flex; gap: 8px; max-width: 460px; }
.coupon-field input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--line-strong); padding: 0 12px; border-radius: var(--r); }
.coupon .link-btn { margin-top: 8px; font-size: 13.5px; }
.summary { background: var(--soft); padding: 22px; border-radius: var(--r); }
.summary-title { font-size: 18px; font-weight: 800; color: var(--store-primary); padding-bottom: 10px; margin-bottom: 6px; border-bottom: 2px solid var(--store-accent); }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.summary-total { font-size: 18px; font-weight: 800; color: var(--store-primary); border-bottom: 0; margin-bottom: 10px; }
.continue { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 12px; font-weight: 700; color: var(--store-primary); font-size: 14px; }
.continue .icon { width: 16px; height: 16px; }
.summary-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 12px; font-size: 13px; color: var(--muted); }
.summary-note .icon { width: 17px; height: 17px; color: var(--accent-ink); }

/* ---------- 404 */
.notfound { text-align: center; padding: 54px 0 50px; }
.nf-code { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 140px; font-weight: 800; line-height: 1; color: var(--store-primary); }
.nf-zero { display: grid; place-items: center; width: 140px; height: 140px; border-radius: 50%; background: var(--store-accent); font-size: 96px; box-shadow: 0 0 0 6px #FFFFFF, 0 0 0 8px var(--store-accent); }
.notfound h1 { font-size: 28px; font-weight: 800; color: var(--heading); margin-top: 26px; }
.notfound > .container > p { color: var(--muted); margin-top: 8px; }
.nf-search { display: flex; gap: 8px; max-width: 540px; margin: 22px auto 16px; }
.nf-search input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line-strong); padding: 0 14px; border-radius: var(--r); }
.nf-search .btn { min-height: 46px; }

/* ---------- صفحة المكوّنات */
.kit { padding-block: 26px 40px; }
.kit-box { border: 1px solid var(--line); padding: 20px; margin-bottom: 18px; border-radius: var(--r); }
.kit-soft { background: var(--soft); }
.kit-title { font-size: 17px; font-weight: 800; color: var(--store-primary); margin-bottom: 14px; }
.kit-note { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.kit-note code { background: var(--soft); padding: 1px 6px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0; }
.kit-label { font-weight: 700; min-width: 110px; }
.kit-sky { background: var(--store-accent); padding: 10px 14px; border-radius: var(--r); }
.kit-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.kit-two .kit-box { margin-bottom: 18px; }
.kit-trust { grid-template-columns: 1fr 1fr; background: var(--soft); padding: 12px; }
.kit-band { padding: 24px 12px; border-radius: var(--r); }
.kit-tabs { justify-content: flex-start; margin-bottom: 0; padding: 0; }
.kit-flag { padding: 6px 4px; border: 1px solid var(--line); }
.kit-grid { --cols: 4; }

/* ---------- خيارات الإظهار */
body[data-show-trust-bar="false"] .trust-bar { display: none; }
body[data-show-reviews="false"] .reviews-band { display: none; }
body[data-show-newsletter="false"] .newsletter { display: none; }
body[data-show-newsletter="false"] .footer-grid { grid-template-columns: 1.4fr 1fr 1.25fr; }

/* ==========================================================================
   العروض
   ========================================================================== */
@media (max-width: 1279px) {
	body[data-books-per-row="6"] .book-grid { --cols: 5; }
	body[data-books-per-row="6"] .listing-grid { --cols: 4; }
	.nav-user span:not(.count-badge) { display: none; }
	.nav-list { gap: 20px; }
	.cats-btn, .cats-drop { width: 220px; }
	.pdp { grid-template-columns: 300px minmax(0, 1fr) 220px; gap: 24px; }
	.recent-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.recent-row > :nth-child(n+5) { display: none; }
}

@media (max-width: 1099px) {
	.book-grid { --cols: 4; }
	.listing-grid { --cols: 3; }
	.header-nav { display: none; }
	.menu-toggle { display: inline-grid; }
	.header-main .container { gap: 16px; }
	.featured-wrap { grid-template-columns: 1fr; }
	.side-list .hlist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pdp { grid-template-columns: 300px minmax(0, 1fr); }
	.pdp-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.author-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.author-row > :nth-child(n+5) { display: none; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	body[data-show-newsletter="false"] .footer-grid { grid-template-columns: 1fr 1fr; }
	.reviews-layout { grid-template-columns: 1fr; }

	.listing-layout { grid-template-columns: 1fr; }
	.filters-toggle { display: inline-flex; }
	.filters {
		position: fixed; top: 0; bottom: 0; right: 0; z-index: 90; width: min(320px, 88vw);
		background: var(--surface); overflow-y: auto; padding: 0 14px 20px; display: none;
	}
	body.filters-open .filters { display: block; animation: slide-in .25s ease-out; }
	.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
	.cart-layout { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
	.book-grid { --cols: 3; }
	.listing-grid { --cols: 3; }
	.trio { grid-template-columns: 1fr; }
	.trio-pair { grid-column: auto; }
	.trio-one .banner { aspect-ratio: 920 / 240; }
	.trio-one .banner-text { width: 50%; }
	.lists { grid-template-columns: 1fr; }
	.lists .hlist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.slide-text { padding: 20px 24%; }
	.banner-wide .banner-text { padding: 16px 22%; }
	.header-cart .cart-text { display: none; }
	.cart-cols { display: none; }
	.cart-row { grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; border-top: 1px solid var(--line); margin-bottom: 10px; border-radius: var(--r); }
	.cart-product { grid-column: 1 / -1; padding-inline-end: 44px; }
	.cell-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
	.remove-btn { position: absolute; top: 14px; left: 14px; }
}

@media (max-width: 767px) {
	.header-main .container { flex-wrap: wrap; min-height: 0; padding-block: 10px; gap: 8px 12px; }
	.brand-name { font-size: 20px; }
	.brand img { width: 38px; height: 38px; }
	.header-cart { margin-inline-start: auto; }
	.header-search { order: 5; flex-basis: 100%; max-width: none; height: 44px; }
	.header-search select { display: none; }
	.topbar .container { justify-content: center; text-align: center; }
	.topbar-links { display: none; }
	.quick-cats .container { justify-content: flex-start; }
	.hero .slide { aspect-ratio: auto; min-height: 260px; }
	.slide-text { padding: 20px 46px 56px; gap: 16px; }
	.slide-text h1, .slide-text h2 { font-size: 24px; }
	.slide-badge { padding: 8px 16px; font-size: 13.5px; }
	.slider-arrow { width: 34px; height: 34px; }
	.slider-arrow[data-slide="prev"] { right: 6px; }
	.slider-arrow[data-slide="next"] { left: 6px; }
	.hero .slider-dots { right: auto; left: 50%; transform: translateX(-50%); bottom: 50px; }
	.banner-wide { aspect-ratio: auto; min-height: 210px; }
	.banner-wide .banner-text { padding: 16px; }
	.deal-inner { flex-direction: column; align-items: flex-start; }
	.cat-row { justify-content: flex-start; }
	.cat-ring { width: 96px; }
	.trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.lists .hlist, .side-list .hlist { grid-template-columns: 1fr; }
	.feat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.feat-item:first-child { grid-column: 1 / -1; grid-row: auto; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: start; }
	.feat-item:not(:first-child) { grid-column: auto; }
	.feat-item:not(:first-child) .feat-media { max-width: 110px; margin-inline: auto; }
	.feat-title { font-size: 19px; }
	.featured { padding: 16px; }
	.review-slide { flex-direction: column; text-align: center; gap: 18px; }
	.review-slide .rating { justify-content: center; }
	.authors-strip { display: flex; flex-direction: column-reverse; }
	.authors-box { position: static; transform: none; box-shadow: none; padding: 16px; }
	.author-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.author-row > :nth-child(n+4) { display: none; }
	.recent-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.recent-row > :nth-child(n+5) { display: flex; }
	.recent-card { flex: 0 0 230px; scroll-snap-align: start; }
	.footer-grid { grid-template-columns: 1fr; gap: 26px; padding: 34px 0 26px; }
	body[data-show-newsletter="false"] .footer-grid { grid-template-columns: 1fr; }
	.footer-bottom .container { flex-direction: column; justify-content: center; text-align: center; }
	.page-head h1 { font-size: 22px; }
	.pdp { grid-template-columns: 1fr; gap: 20px; }
	.pdp-gallery { max-width: 320px; margin-inline: auto; width: 100%; }
	.pdp-side { grid-template-columns: 1fr 1fr; }
	.pdp-title { font-size: 23px; }
	.buy-row .btn { flex: 1; }
	.author-hero .container { flex-direction: column; text-align: center; }
	.author-hero .breadcrumb { justify-content: center; }
	.sort-field { margin-inline-start: 0; }
	.listing-grid[data-view="list"] .book-media { width: 110px; }
	.nf-code { font-size: 96px; }
	.nf-zero { width: 100px; height: 100px; font-size: 66px; }
	.kit-two { grid-template-columns: 1fr; }
	.kit-grid { --cols: 2; }
}

@media (max-width: 599px) {
	.book-grid, .listing-grid { --cols: 2; }
	.book-grid { gap: 10px; }
	.listing-grid, .author-grid { padding: 10px; }
	.book-card { padding: 10px 10px 12px; }
	.flag-new { width: 36px; height: 36px; font-size: 11.5px; }
	.trio-pair { grid-template-columns: 1fr; }
	.trio-one .banner { aspect-ratio: 460 / 240; }
	.trio-one .banner-text { width: 56%; }
	.banner-text strong { font-size: 20px; }
	.tab-btns { justify-content: flex-start; gap: 24px; }
	.tab-btns button { font-size: 15px; }
	.section { padding: 26px 0; }
	.pdp-side { grid-template-columns: 1fr; }
	.facts { grid-template-columns: 1fr; }
	.cart-row { grid-template-columns: 1fr 1fr; }
	.cart-line { grid-column: 1 / -1; }
}

/* ==== ميزات المنصّة (الملحق 8) ==== */
/* المدوّنة: بطاقة المقال وصفحتا blog.html وpost.html */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: none; overflow: hidden; }
.post-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r); background: var(--line); }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 18px 18px; padding-top: 14px; }
.post-date { font-size: .82rem; color: var(--accent-ink); font-weight: 700; }
.post-title { margin: 0; font-size: 16.5px; font-weight: 800; line-height: 1.5; color: var(--heading); }
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--store-primary); }
.post-excerpt { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.post-more { margin-top: 4px; font-size: .88rem; font-weight: 700; color: var(--store-primary); text-decoration: none; }
.post-more:hover { text-decoration: underline; }
.blog-section { padding: 8px 0 56px; }
.post-grid-page { row-gap: 36px; }
.post-page { padding: 8px 0 24px; }
.post-article { max-width: 760px; margin-inline: auto; }
.post-header { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
.post-back { font-size: .88rem; font-weight: 700; color: var(--store-primary); text-decoration: none; }
.post-back::before { content: "→ "; }
.post-page-title { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.4; font-weight: 800; color: var(--heading); }
.post-figure { margin: 0 0 24px; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; background: var(--line); }
.post-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-content { font-size: 1.02rem; line-height: 2; color: var(--store-text); }
.post-content p { margin: 0 0 1.1em; }
.blog-related { padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 991px) {
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid > .post-card:nth-child(3):last-child { display: none; }
}
@media (max-width: 600px) {
	.post-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.post-grid > .post-card:nth-child(3):last-child { display: flex; }
}

.post-card { transition: box-shadow .2s; }
.post-card:hover { box-shadow: 0 8px 24px rgba(20, 35, 80, .12); }
.post-card .post-media { border-radius: 0; }
.sec-link { font-size: 14.5px; font-weight: 700; color: var(--store-primary); }
.sec-link:hover { text-decoration: underline; }
.blog-section { padding-top: 26px; }
.post-page-title { font-size: clamp(26px, 3vw, 34px); color: var(--heading); }


/* صفقة اليوم: العدّاد */
.deal-timer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: -6px 0 20px; }
.deal-timer-label { font-size: 14px; font-weight: 700; color: var(--muted); margin-inline-end: 4px; }
.cd { display: grid; place-items: center; min-width: 58px; padding: 6px 4px; border-radius: var(--r); background: var(--store-primary); color: var(--on-primary); line-height: 1.2; }
.cd b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd small { font-size: 11.5px; color: var(--on-primary-muted); }
@media (max-width: 600px) { .deal-timer-label { width: 100%; text-align: center; margin: 0; } .cd { min-width: 52px; } }

/* «حمّل التطبيق» في الشريط العلويّ */
.topbar-app { display: inline-flex; align-items: center; gap: 6px; }
.topbar-app a { text-decoration: underline; text-underline-offset: 3px; }

/* ما يُخفيه theme.js بالسمة hidden (مثل العرض المنتهي) يختفي ولو كان لعنصره display */
[hidden] { display: none !important; }

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

/* ==== تطوير المتجر (أكتوبر 2026) ==== */
/* صفوفٌ كاملة: الشبكة فيها 12 كتابًا تملأ 2 و3 و4 و6 أعمدة، وفي الخمسة يُخفى ما زاد على عشرة */
@media (min-width: 1280px) {
	body[data-books-per-row="5"] .book-grid.fill-rows:not(.listing-grid) > :nth-child(n+11) { display: none; }
	body[data-books-per-row="6"] .listing-grid.fill-rows:not([data-view="list"]) > :nth-child(n+11) { display: none; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
	body[data-books-per-row="5"] .book-grid.fill-rows:not(.listing-grid) > :nth-child(n+11),
	body[data-books-per-row="6"] .book-grid.fill-rows:not(.listing-grid) > :nth-child(n+11) { display: none; }
}

/* الصفّ الدوّار: صفٌّ واحد يُمرَّر أفقيًّا بعدد أعمدة الشبكة، فلا يبقى صفٌّ ناقص */
.scroller { position: relative; }
.book-scroll {
	grid-template-columns: none; grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--cols) - 1) * 14px) / var(--cols));
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.book-scroll::-webkit-scrollbar { display: none; }
.book-scroll > * { scroll-snap-align: start; }
.scroll-arrow {
	position: absolute; top: 38%; z-index: 4; width: 40px; height: 40px; display: grid; place-items: center;
	border: 0; border-radius: var(--r); background: var(--store-accent); color: var(--store-primary);
	box-shadow: 0 4px 12px rgba(15, 25, 50, .16);
}
.scroll-arrow:hover { background: var(--store-primary); color: var(--on-primary); }
.scroll-arrow[data-scroll="prev"] { right: -12px; }
.scroll-arrow[data-scroll="next"] { left: -12px; }
.scroll-arrow[disabled] { opacity: 0; pointer-events: none; }
@media (hover: none), (max-width: 767px) { .scroll-arrow { display: none; } }

/* «صفقة اليوم» والعمود الجانبيّ بطولٍ واحد */
.featured-wrap { align-items: stretch; }
.side-list { display: flex; flex-direction: column; }
.side-list .hlist { flex: 1; justify-content: space-evenly; }
.featured { display: flex; flex-direction: column; }
.featured .feat-grid { flex: 1; align-items: center; }

/* البطاقة الأفقيّة: مربّع السلّة في طرفها */
.hcard .cart-btn { width: 36px; height: 36px; }
.hcard .cart-btn .icon { width: 18px; height: 18px; }
.hcard .rating-row .count { font-size: 12px; }

/* صفحة التصنيف: المرشّحات المختارة، وعرض القائمة في عمودين */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 14px; }
.active-filters:not(:has(.fchip)) { display: none; }
.fchip {
	display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px 0 12px;
	background: var(--soft-2); color: var(--store-primary); font-size: 13.5px; font-weight: 700; border-radius: 999px;
}
.fchip .icon { width: 14px; height: 14px; }
.fchip:hover { background: var(--store-accent); }
.fclear { font-size: 13.5px; font-weight: 700; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; margin-inline-start: 4px; }
.listing-grid[data-view="list"] { --cols: 2; }
.listing-grid[data-view="list"] .book-card { flex-direction: row; align-items: stretch; gap: 18px; }
.listing-grid[data-view="list"] .book-media { width: 130px; flex: none; margin: 0; aspect-ratio: auto; padding: 0; }
.listing-grid[data-view="list"] .book-media > a { position: static; }
.listing-grid[data-view="list"] .book-media img { width: 100%; height: auto; }
.listing-grid[data-view="list"] .book-body { flex: 1; align-self: stretch; }
.listing-grid[data-view="list"] .book-desc {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
	margin-top: 6px; font-size: 13.5px; line-height: 1.75; color: var(--muted);
}
.listing-grid[data-view="list"] .book-title a { -webkit-line-clamp: 1; }
.listing-grid[data-view="list"] .book-actions { bottom: 8px; }
@media (max-width: 1279px) { .listing-grid[data-view="list"] .book-desc { -webkit-line-clamp: 2; } }
@media (max-width: 767px) { .listing-grid[data-view="list"] { --cols: 1; } }
@media (max-width: 599px) {
	.listing-grid[data-view="list"] .book-media { width: 96px; }
	.listing-grid[data-view="list"] .book-card { gap: 12px; }
}

/* صفحة الكتاب: اختيار الصيغة، والوصف بجانب التفاصيل */
.formats-box { margin: 14px 0 4px; }
.formats-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.formats { display: flex; flex-wrap: wrap; gap: 8px; }
.format-opt {
	display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; min-width: 128px;
	padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface);
}
.format-opt .type-dot { grid-row: span 2; width: 26px; height: 26px; box-shadow: none; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-name { font-size: 14px; font-weight: 700; color: var(--heading); line-height: 1.3; }
.format-price { font-size: 13px; font-weight: 800; color: var(--store-primary); }
.format-opt:hover { border-color: var(--store-accent); }
.format-opt.is-current { border: 2px solid var(--store-accent); background: var(--soft); padding: 7px 11px; }
.pdp-panels { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 40px; }
.pdp-panels > #reviews { grid-column: 1 / -1; }
.pdp-panels .spec-table { max-width: none; }
.prose { max-width: none; }
@media (max-width: 991px) { .pdp-panels { grid-template-columns: 1fr; } }

/* الهاتف: الواجهة صورةٌ فوق النصّ، والبانرات والقوائم والثقة شرائط تُمرَّر */
@media (max-width: 991px) {
	.topbar-links { display: none; }
	.topbar .container { justify-content: center; text-align: center; }
	.hero .slide { display: flex; flex-direction: column; min-height: 0; aspect-ratio: auto; background: var(--soft); }
	.hero .slide img { position: static; height: auto; aspect-ratio: 1400 / 500; }
	.slide-text { position: static; padding: 14px 16px 44px; gap: 12px; }
	.slide-text h1, .slide-text h2 { font-size: 22px; }
	.slide-badge { top: 0; bottom: auto; }
	.hero .slider-arrow { display: none; }
	.hero .slider-dots { bottom: 16px; right: 50%; left: auto; transform: translateX(50%); }
}
@media (max-width: 767px) {
	.trust-bar { padding: 10px 0; }
	.trust-grid { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-grid::-webkit-scrollbar { display: none; }
	.trust-item {
		flex: 0 0 auto; scroll-snap-align: start; display: grid; grid-template-columns: auto auto; column-gap: 10px;
		align-items: center; text-align: start; padding: 10px 14px;
	}
	.trust-item .icon { grid-row: span 2; margin: 0; width: 24px; height: 24px; }
	.trust-item b { font-size: 14px; }
	.trust-item small { font-size: 12px; }
	.lists { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.lists::-webkit-scrollbar { display: none; }
	.list-col { flex: 0 0 86%; scroll-snap-align: start; padding: 16px; }
	.featured-wrap .side-list .hlist { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
	.book-grid.fill-rows:not(.listing-grid) > :nth-child(n+9) { display: none; }
	.trio { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trio::-webkit-scrollbar { display: none; }
	.trio-pair, .trio-one { display: contents; }
	.trio .banner { flex: 0 0 84%; scroll-snap-align: start; aspect-ratio: 460 / 240; }
	.book-scroll { grid-auto-columns: calc((100% - 10px) / 2.2); }
}

/* صفحة الكتاب: عمود المزايا بطول المعلومات، وكلّ شيءٍ مدمجٌ في الهاتف */
@media (min-width: 1100px) {
	.pdp-side { align-self: stretch; }
	.side-perk { flex: 1; }
}
@media (max-width: 599px) {
	.formats { flex-wrap: nowrap; gap: 6px; }
	.format-opt { flex: 1; min-width: 0; padding: 7px 8px; column-gap: 6px; }
	.format-opt.is-current { padding: 6px 7px; }
	.format-opt .type-dot { width: 22px; height: 22px; }
	.format-name { font-size: 13px; }
	.format-price { font-size: 12px; }
	.facts { grid-template-columns: 1fr 1fr; gap: 8px; }
	.fact { grid-template-columns: 22px 1fr; column-gap: 8px; padding: 10px; }
	.fact .icon { width: 20px; height: 20px; }
	.fact b { font-size: 13.5px; }
	.pdp-side { grid-template-columns: 1fr 1fr; gap: 8px; }
	.side-perk { padding: 10px; gap: 8px; }
	.side-perk .icon { width: 24px; height: 24px; }
	.side-perk b { font-size: 13.5px; }
	.side-perk small { font-size: 12px; line-height: 1.5; display: block; }
}

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