/* =====================================================================
   دليل (dalil) — قالب متجر كتب لمنصّة «ناشر»
   مأخوذ عن الرئيسيّة التاسعة من «Viatour»: واجهةٌ داخل بطاقةٍ مستديرة
   بهامشٍ حول الصفحة والرأسُ فيها، وترقيمٌ رقميّ بخطّ تقدّم، والمؤلّفون
   تحتها مباشرةً ببطاقاتٍ أفقيّة، وبطاقاتٌ داكنة للمختارات، ولوحٌ كريميّ
   مزاح، وشريط آراءٍ كحليّ ببطاقاتٍ مكدّسة، وتذييلٌ عائم.
   ===================================================================== */

:root {
	/* ألوان المتجر: يختارها الناشر (القاعدة 4) */
	--store-primary: #F9AB00;
	--store-primary-dark: #C98A00;
	--store-accent: #05073C;
	--store-bg: #FFFFFF;
	--store-text: #05073C;

	/* محايدات ومشتقّات */
	--on-primary: var(--store-accent);   /* الكحليّ على الذهبيّ ≈ 9.9؛ لا يُكتب بالذهبيّ على الأبيض */
	--cream: color-mix(in srgb, var(--store-primary) 13%, #FFFFFF);     /* اللوح المزاح والتذييل */
	--cream-2: color-mix(in srgb, var(--store-primary) 22%, #FFFFFF);
	--dark: var(--store-accent);
	--dark-2: color-mix(in srgb, var(--store-accent) 88%, #FFFFFF);
	--on-dark-muted: rgba(255, 255, 255, .78);
	--muted: #5E5E66;
	--line: #DDDDDD;
	--line-soft: #EBEBEF;
	--white: #FFFFFF;
	--star: #F5A623;
	--shadow: 0 14px 34px rgba(5, 7, 60, .12);
	--shadow-sm: 0 4px 14px rgba(5, 7, 60, .09);
	--radius: 12px;
	--radius-lg: 16px;
	--radius-xl: 22px;
	--frame: clamp(10px, 1.5vw, 22px);   /* هامش البطاقات العائمة حول الصفحة */
	--gap: 22px;
	--per-row: 5;
	--hdr-h: 78px;
	--font: "Tajawal", system-ui, sans-serif;
}

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-corners="soft"] { --radius: 6px; --radius-lg: 8px; --radius-xl: 10px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 16px); }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
blockquote { margin: 0; }
:focus-visible { outline: 3px solid var(--store-primary-dark); outline-offset: 2px; }

.container { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 24px; }
.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;
}
.muted { color: var(--muted); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }
.flip { transform: scaleX(-1); }

/* ---------------------------------------------------------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 22px; border-radius: var(--radius);
	border: 1.5px solid transparent; font-weight: 700; font-size: 15px;
	transition: background .2s, color .2s, border-color .2s; white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-primary); color: var(--on-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--store-primary) 85%, #FFFFFF); }
.btn-dark { background: var(--dark); color: #FFFFFF; }
.btn-dark:hover { background: var(--dark-2); }
.btn-light { background: var(--white); color: var(--store-text); border-color: var(--line); }
.btn-light:hover { border-color: var(--store-text); }
.btn-ghost-white { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .85); }
.btn-ghost-white:hover { background: rgba(255, 255, 255, .12); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
	display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--white); color: var(--store-text);
}
.icon-btn:hover { border-color: var(--store-text); }
.icon-btn.on-dark { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .7); }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 15px; white-space: nowrap; }
.see-all:hover { text-decoration: underline; text-underline-offset: 5px; }
.see-all .icon { width: 18px; height: 18px; }
/* زرّ البحث الدائريّ المؤطَّر */
.search-circle {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	border: 1.5px solid currentColor; background: transparent; color: inherit;
}
.search-circle:hover { background: rgba(127, 127, 160, .14); }
/* كبسولة «حسابي» المفرَّغة (زرّ الدخول في المرجع) */
.pill-out { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border: 1.5px solid currentColor; border-radius: 999px; font-weight: 500; font-size: 15px; }
.pill-out .icon { width: 18px; height: 18px; }
.pill-out:hover { background: rgba(127, 127, 160, .12); }

/* ---------------------------------------------------------------- عنوان القسم */
.section { padding-block: 52px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-title { font-size: clamp(22px, 2vw, 28px); font-weight: 700; }
.sec-sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.soft-word { color: var(--muted); font-weight: 500; }

/* ---------------------------------------------------------------- التقييم والسعر ودوائر النوع والشارات */
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: #D5D5DC; }
.rating-lg .stars .icon { width: 18px; height: 18px; }
.rating-lg { font-size: 15px; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-weight: 700; font-size: 16px; color: var(--store-text); }
.price del { font-weight: 400; font-size: 13px; color: var(--muted); }
.price-lg { font-size: 32px; }
.price-lg del { font-size: 17px; }
.type-dot {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	color: #FFFFFF; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); flex: none;
}
.type-dot .icon { width: 16px; height: 16px; stroke-width: 2; }
.type-dot[data-type="print"] { background: #DB7056; }
.type-dot[data-type="ebook"] { background: #5675A3; }
.type-dot[data-type="audio"] { background: #986AB0; }
.type-dot[data-type="educational"] { background: #3f8f6b; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge-disc { background: var(--store-primary); color: var(--on-primary); }
.badge-new { background: var(--dark); color: #FFFFFF; }
.badge-lg { height: 32px; padding: 0 14px; font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--store-text); font-size: 14px; font-weight: 500; }

/* ---------------------------------------------------------------- الرأس */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line-soft); }
.hdr { display: flex; align-items: center; gap: 20px; min-height: var(--hdr-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand-name { font-weight: 800; font-size: 21px; }
.hdr-nav { margin-inline-start: 14px; }
.hdr-nav > ul { display: flex; align-items: center; gap: 2px; }
.hdr-nav a, .hdr-nav .drop-btn {
	display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 12px;
	border: 0; background: none; font-size: 15px; font-weight: 500; color: inherit; border-radius: 999px;
}
.hdr-nav a:hover, .hdr-nav .drop-btn:hover { background: rgba(127, 127, 160, .12); }
.hdr-nav a[aria-current="page"] { font-weight: 800; }
.hdr-nav a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--store-primary); margin-inline-end: 4px; }
.has-drop { position: relative; }
.drop-btn .icon { width: 16px; height: 16px; transition: transform .2s; }
.has-drop.open .drop-btn .icon { transform: rotate(180deg); }
.drop {
	position: absolute; top: 100%; inset-inline-start: 0; min-width: 230px; padding: 8px; z-index: 5;
	background: var(--white); color: var(--store-text); border-radius: var(--radius); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-drop:hover .drop, .has-drop.open .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: flex; height: 40px; width: 100%; border-radius: 8px; }
.drop a:hover { background: var(--cream); }
.hdr-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; flex: none; }
.hdr-icon {
	position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
	border: 0; background: transparent; color: inherit;
}
.hdr-icon:hover { background: rgba(127, 127, 160, .14); }
.count {
	position: absolute; top: 0; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
	background: var(--store-primary); color: var(--on-primary); font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1;
}
.menu-btn { display: none; }
/* حقل البحث يفتحه زرّ البحث الدائريّ */
.hdr-search { display: none; padding-bottom: 16px; }
.search-open .hdr-search { display: block; }
.hs-box { display: flex; align-items: center; gap: 10px; background: var(--white); color: var(--store-text); border: 1px solid var(--line); border-radius: 999px; padding: 6px; padding-inline-start: 18px; box-shadow: var(--shadow-sm); }
.hs-box > .icon { color: var(--muted); }
.hs-box input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; outline: none; }
.hs-box .btn { border-radius: 999px; min-height: 44px; }

/* الرأس داخل بطاقة الواجهة في الرئيسيّة (إن أُخفيت الواجهة بقي أبيض) */
body:has(.hero-card) .site-header {
	position: fixed; top: var(--frame); inset-inline: var(--frame); background: transparent; color: #FFFFFF; border-bottom: 0;
	transition: background-color .2s, color .2s;
}
body:has(.hero-card) .site-header:not(.is-scrolled) .hdr { border-bottom: 1px solid rgba(255, 255, 255, .28); }
body:has(.hero-card) .site-header:not(.is-scrolled) .hdr-nav a:hover,
body:has(.hero-card) .site-header:not(.is-scrolled) .hdr-nav .drop-btn:hover,
body:has(.hero-card) .site-header:not(.is-scrolled) .hdr-icon:hover,
body:has(.hero-card) .site-header:not(.is-scrolled) .pill-out:hover,
body:has(.hero-card) .site-header:not(.is-scrolled) .search-circle:hover { background: rgba(255, 255, 255, .14); }
/* بعد النزول عن أعلى الصفحة يثبت الرأس أبيضَ بعرض الشاشة */
body:has(.hero-card) .site-header.is-scrolled { top: 0; inset-inline: 0; background: var(--white); color: var(--store-text); border-bottom: 1px solid var(--line-soft); }
body:has(.hero-card) .hdr-search { padding-top: 14px; }

/* ---------------------------------------------------------------- الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(5, 7, 60, .5); opacity: 0; visibility: hidden; transition: .25s; z-index: 60; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(350px, 88vw); background: var(--white); color: var(--store-text); z-index: 61;
	transform: translateX(100%); transition: transform .3s; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; visibility: hidden;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-nav > li > a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--line-soft); font-weight: 500; }
.drawer-sub { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.drawer-sub a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
.drawer-card { background: var(--dark); color: #FFFFFF; border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; }
.drawer-card small { display: block; }

/* ---------------------------------------------------------------- الواجهة في بطاقةٍ مستديرة */
.hero-card {
	position: relative; margin: var(--frame); border-radius: var(--radius-xl); overflow: hidden;
	height: clamp(560px, 45vw, 680px); background: var(--dark); color: #FFFFFF;
}
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s; }
.slide:first-child, .slider-ready .slide.is-active { opacity: 1; visibility: visible; }
.slider-ready .slide:not(.is-active) { opacity: 0; visibility: hidden; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to left, color-mix(in srgb, var(--store-accent) 72%, transparent) 0%, color-mix(in srgb, var(--store-accent) 30%, transparent) 55%, transparent 85%),
		linear-gradient(to bottom, color-mix(in srgb, var(--store-accent) 45%, transparent) 0%, transparent 30%);
}
[dir="ltr"] .slide::after { transform: scaleX(-1); }
.slide-body {
	position: absolute; z-index: 1; inset-inline: 0; top: 50%; transform: translateY(-38%);
	display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
}
.slide-kicker { font-size: 17px; font-weight: 500; }
.slide-body h2 { font-size: clamp(36px, 5vw, 72px); font-weight: 800; line-height: 1.12; max-width: 720px; text-shadow: 0 2px 24px rgba(5, 7, 60, .3); }
.slide-body .btn { margin-top: 10px; }
/* الترقيم الرقميّ بخطّ التقدّم */
.hero-pager-wrap { position: absolute; z-index: 3; inset-inline: 0; bottom: 34px; }
.hero-pager { display: flex; align-items: center; gap: 4px; }
.hero-pager:empty { display: none; }
.hero-pager button { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; color: rgba(255, 255, 255, .78); font-weight: 500; font-size: 15px; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.hero-pager button:hover { color: #FFFFFF; }
.hero-pager i { display: block; width: 0; height: 2px; background: rgba(255, 255, 255, .35); position: relative; transition: width .4s; }
.hero-pager .is-on { color: #FFFFFF; }
.hero-pager .is-on i { width: 96px; }
.hero-pager .is-on i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 100%; background: #FFFFFF; transform-origin: right; animation: fill 6.5s linear; }
[dir="ltr"] .hero-pager .is-on i::after { transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------------------------------------------------------------- المسارات الأفقيّة والأسهم أسفل الصفّ */
.track-wrap { position: relative; }
.track { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; padding: 2px 2px 8px; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.track-nav { display: flex; gap: 10px; margin-top: 18px; }
.track-nav:has(.track-arrow[disabled] + .track-arrow[disabled]) { display: none; }
.track-arrow {
	width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
	background: var(--white); color: var(--store-text); display: grid; place-items: center; transition: .2s;
}
.track-arrow .icon { width: 18px; height: 18px; }
.track-arrow:hover:not([disabled]) { background: var(--dark); border-color: var(--dark); color: #FFFFFF; }
.track-arrow[disabled] { opacity: .4; cursor: default; }
.track-arrow.on-dark { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .55); }
.track-arrow.on-dark:hover { background: #FFFFFF; color: var(--dark); border-color: #FFFFFF; }

/* ---------------------------------------------------------------- البطاقة المؤطَّرة */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 30px var(--gap); }
.bcard { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.track .bcard { flex: 0 0 calc((100% - (var(--per-row) - 1) * var(--gap)) / var(--per-row)); }
.bcard-media { position: relative; }
.bcard-cover { display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--cream); }
.bcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.bcard:hover .bcard-cover img { transform: scale(1.04); }
.bcard .type-dot { position: absolute; top: 10px; inset-inline-start: 10px; }
.bcard-badges { position: absolute; top: 12px; inset-inline-end: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.heart {
	position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 0; z-index: 2; display: grid; place-items: center;
	background: var(--white); color: var(--store-text); box-shadow: 0 3px 10px rgba(5, 7, 60, .16);
}
.heart .icon { width: 16px; height: 16px; }
.heart[aria-pressed="true"] .icon { fill: currentColor; }
.bcard .heart { bottom: -17px; inset-inline-end: 12px; }
.stock-band { position: absolute; inset-inline: 0; bottom: 38%; background: rgba(5, 7, 60, .88); color: #FFFFFF; text-align: center; font-weight: 700; font-size: 14px; padding: 6px 0; z-index: 1; }
.is-out .bcard-cover img, .is-out .dcard-cover img { filter: grayscale(.7); opacity: .8; }
.bcard-body { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.bcard-author { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.bcard-author .icon { width: 14px; height: 14px; }
.bcard-title { font-size: 15.5px; font-weight: 500; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bcard-foot { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bcard-body .rating { margin-bottom: 2px; }
.cart-btn {
	width: 38px; height: 38px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center;
	background: var(--store-primary); color: var(--on-primary);
}
.cart-btn .icon { width: 18px; height: 18px; }
.cart-btn:hover { background: color-mix(in srgb, var(--store-primary) 80%, #FFFFFF); }
.cart-btn[disabled] { background: #E4E4EA; color: var(--muted); cursor: not-allowed; }
@media (max-width: 767px) { .cart-btn { width: 40px; height: 40px; } } /* لمسٌ مريح في الجوّال، والشكل الأصليّ نفسه */
/* شكل البطاقة */
body[data-card-style="soft"] .bcard { border-color: transparent; box-shadow: var(--shadow-sm); }
body[data-card-style="plain"] .bcard { border-color: transparent; background: transparent; }
body[data-card-style="plain"] .bcard-cover { border-radius: var(--radius); }
body[data-card-style="plain"] .bcard-body { padding-inline: 2px; }
/* عرض القائمة في صفحة التصنيف */
.listing .book-grid.is-list { grid-template-columns: 1fr; gap: 20px; }
.is-list .bcard { flex-direction: row; }
.is-list .bcard-media { width: 150px; flex: none; }
.is-list .bcard-cover { border-radius: var(--radius) 0 0 var(--radius); height: 100%; }
[dir="rtl"] .is-list .bcard-cover { border-radius: 0 var(--radius) var(--radius) 0; }
.is-list .bcard .heart { bottom: 10px; }
.is-list .bcard-title { min-height: 0; font-size: 18px; }
.bcard-desc { display: none; color: var(--muted); font-size: 14.5px; }
.is-list .bcard-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- البطاقة الداكنة (المختارات) */
.dcard { position: relative; display: flex; flex-direction: column; background: var(--dark); color: #FFFFFF; border-radius: var(--radius-lg); padding: 14px; }
.track-dark .dcard { flex: 0 0 calc((100% - 3.3 * var(--gap)) / 4.3); }
.dcard-media { position: relative; }
.dcard-cover { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); background: var(--dark-2); }
.dcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.dcard:hover .dcard-cover img { transform: scale(1.04); }
.dcard .type-dot { position: absolute; top: 10px; inset-inline-start: 10px; }
.dcard .heart { top: 10px; inset-inline-end: 10px; background: rgba(5, 7, 60, .35); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .7); box-shadow: none; backdrop-filter: blur(4px); }
.dcard .bcard-badges { top: 52px; }
.dcard-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 4px 2px; flex: 1; }
.dcard-author { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--on-dark-muted); }
.dcard-author .icon { width: 14px; height: 14px; }
.dcard-title { font-size: 17px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dcard-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.dcard .rating { color: var(--on-dark-muted); }
.dcard .stars .off { color: rgba(255, 255, 255, .28); }
.dcard-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dcard .price, .dark-card .price { color: #FFFFFF; }
.dcard .price del, .dark-card .price del { color: var(--on-dark-muted); }
.dcard .cart-btn[disabled] { background: rgba(255, 255, 255, .16); color: var(--on-dark-muted); }

/* ---------------------------------------------------------------- المؤلّفون: بطاقاتٌ أفقيّة مؤطَّرة */
.authors-sec { padding-top: 44px; }
.author-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px var(--gap); }
.author-card { display: flex; align-items: center; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); transition: border-color .2s, box-shadow .2s; min-width: 0; }
.author-card:hover { border-color: var(--store-text); box-shadow: var(--shadow-sm); }
.ac-img { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; flex: none; background: var(--cream); }
.ac-img img { width: 100%; height: 100%; object-fit: cover; }
.ac-text { display: flex; flex-direction: column; min-width: 0; }
.ac-text b { font-size: 16px; font-weight: 700; line-height: 1.35; }
.ac-text small { font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- «لماذا نحن»: اللوح الكريميّ المزاح */
.why-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); align-items: center; gap: 48px; padding-block: 64px; }
.why-wrap::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 9%; inset-inline-end: 0; background: var(--cream); border-radius: var(--radius-xl); z-index: -1; }
.why-banner { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow); background: var(--cream-2); max-height: 480px; }
.why-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.why-banner:hover img { transform: scale(1.03); }
.wb-text { position: absolute; z-index: 1; inset-inline: 0; bottom: 0; padding: 60px 24px 22px; display: flex; flex-direction: column; color: #FFFFFF; background: linear-gradient(to top, color-mix(in srgb, var(--store-accent) 80%, transparent), transparent); }
.wb-text b { font-size: 21px; font-weight: 800; }
.wb-text small { font-size: 14.5px; }
.why-body { padding-inline-end: 40px; }
.why-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.why-card { background: var(--white); border-radius: var(--radius-lg); padding: 22px 20px; box-shadow: var(--shadow-sm); }
.why-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--cream-2); color: var(--store-text); margin-bottom: 14px; }
.why-ico .icon { width: 26px; height: 26px; stroke-width: 1.5; }
.why-card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; }
.why-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }
/* إن أُخفي البانر اصطفّت البطاقات وحدها في اللوح */
.why-wrap:not(:has(.why-banner)) { grid-template-columns: 1fr; padding: 48px; }
.why-wrap:not(:has(.why-banner))::before { inset-inline-start: 0; }
.why-wrap:not(:has(.why-banner)) .why-body { padding: 0; }
/* إن أُخفي شريط الثقة بقي البانر وحده في وسط اللوح */
body[data-show-trust-bar="false"] .why-body { display: none; }
body[data-show-trust-bar="false"] .why-wrap { grid-template-columns: minmax(0, 460px); justify-content: center; }
body[data-show-trust-bar="false"] .why-wrap::before { inset-inline-start: 0; }
body[data-show-trust-bar="false"] .why:not(:has(.why-banner)) { display: none; }

/* ---------------------------------------------------------------- التصنيفات: بلاطاتٌ بالاسم عليها */
.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.cat-tile { position: relative; display: block; aspect-ratio: 280 / 320; border-radius: var(--radius-lg); overflow: hidden; background: var(--dark); }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.cat-tile:hover img { transform: scale(1.06); }
.ct-text { position: absolute; z-index: 1; inset-inline: 0; bottom: 0; padding: 40px 16px 16px; display: flex; flex-direction: column; color: #FFFFFF; background: linear-gradient(to top, color-mix(in srgb, var(--store-accent) 75%, transparent), transparent); }
.ct-text b { font-size: 17px; font-weight: 700; }
.ct-text small { font-size: 13.5px; }

/* ---------------------------------------------------------------- البانر العريض في بطاقةٍ مستديرة */
.wide-sec { padding-block: 20px; }
.wide-card { position: relative; display: flex; align-items: center; margin-inline: var(--frame); min-height: 380px; border-radius: var(--radius-xl); overflow: hidden; background: var(--dark); color: #FFFFFF; }
.wide-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wide-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, color-mix(in srgb, var(--store-accent) 78%, transparent) 0%, color-mix(in srgb, var(--store-accent) 20%, transparent) 60%, transparent); }
[dir="ltr"] .wide-card::after { transform: scaleX(-1); }
.wide-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.wide-text b { font-size: clamp(26px, 3vw, 40px); font-weight: 800; line-height: 1.2; max-width: 560px; }
.wide-text > span:not(.btn) { max-width: 480px; font-size: 16px; }
.wide-text .btn { margin-top: 8px; }

/* ---------------------------------------------------------------- آراء القرّاء: الشريط الكحليّ والبطاقات المكدّسة */
.reviews-band { background: var(--dark); color: #FFFFFF; padding-block: 90px; margin-block: 40px; }
.rv-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 60px; align-items: center; }
.rv-intro h2 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 700; max-width: 360px; }
.rv-intro p { color: var(--on-dark-muted); margin-top: 10px; max-width: 420px; }
.rv-nav { display: flex; gap: 10px; margin-top: 26px; }
.rv-stack { display: grid; padding-inline-end: 34px; padding-block-end: 26px; }
.rv-card {
	grid-area: 1 / 1; position: relative; background: var(--white); color: var(--store-text); border-radius: var(--radius-xl);
	padding: 28px; display: flex; flex-direction: column; gap: 12px; z-index: 3; transition: transform .35s, opacity .35s;
}
.rv-card:nth-child(2) { z-index: 2; transform: translate(-18px, 14px) scale(.97); background: #E7E7EE; }
.rv-card:nth-child(3) { z-index: 1; transform: translate(-34px, 28px) scale(.94); background: #CFCFDA; }
[dir="ltr"] .rv-card:nth-child(2) { transform: translate(18px, 14px) scale(.97); }
[dir="ltr"] .rv-card:nth-child(3) { transform: translate(34px, 28px) scale(.94); }
.rv-card:nth-child(n+2) > * { visibility: hidden; }
.rv-card:nth-child(n+4) { display: none; }
.rv-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rv-what { font-weight: 700; font-size: 15px; }
.rv-q { color: #D5D5DE; }
.rv-q .icon { width: 36px; height: 36px; }
.rv-card blockquote { font-size: 15.5px; line-height: 1.85; }
.rv-who { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.rv-av { width: 46px; height: 46px; border-radius: 50%; background: var(--store-primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.rv-who b { display: block; font-weight: 700; }
.rv-date { color: var(--muted); font-size: 13px; }
body[data-show-reviews="false"] .reviews,
body[data-show-reviews="false"] .pdp-reviews { display: none; }

/* ---------------------------------------------------------------- شاهدتَه مؤخّرًا */
.mini-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px var(--gap); }
.mini-card { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); min-width: 0; }
.mc-cover { position: relative; display: block; width: 68px; flex: none; border-radius: 8px; overflow: hidden; aspect-ratio: 2 / 3; }
.mc-cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-card .type-dot { position: absolute; top: 4px; inset-inline-start: 4px; width: 22px; height: 22px; }
.mini-card .type-dot .icon { width: 12px; height: 12px; }
.mc-body { min-width: 0; }
.mc-author { font-size: 13px; color: var(--muted); }
.mini-card h3 { font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.mini-card .price { font-size: 14.5px; }

/* ---------------------------------------------------------------- التذييل العائم */
.site-footer { margin-top: 40px; }
.foot-panel { margin-inline: var(--frame); background: var(--cream); border-radius: var(--radius-xl); }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px 0 26px; border-bottom: 1px solid color-mix(in srgb, var(--store-primary) 30%, #FFFFFF); }
.foot-call { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 500; flex-wrap: wrap; }
.fc-ico { width: 46px; height: 46px; border-radius: 50%; background: var(--dark); color: #FFFFFF; display: grid; place-items: center; }
.foot-call a { font-weight: 800; }
.foot-social { display: flex; align-items: center; gap: 4px; font-weight: 500; }
.foot-social span { margin-inline-end: 6px; }
.foot-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.foot-social a:hover { background: var(--white); }
.foot-social .icon { width: 18px; height: 18px; }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 36px; padding: 34px 0 38px; }
.foot-cols h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.foot-cols li { margin-bottom: 9px; font-size: 14.5px; }
.foot-cols li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; }
.foot-contact .icon { width: 18px; height: 18px; margin-top: 3px; }
.foot-news p { font-size: 14.5px; margin-bottom: 14px; }
.fnf { background: var(--white); border-radius: var(--radius); display: flex; align-items: center; padding: 5px; border: 1px solid var(--line); }
.fnf input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; padding: 0 12px; outline: none; color: var(--store-text); }
.fnf input::placeholder { color: var(--muted); }
.fnf button { border: 0; border-radius: calc(var(--radius) - 3px); background: var(--dark); color: #FFFFFF; font-weight: 700; padding: 0 20px; height: 44px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); padding-block: 18px 22px; }
.to-top {
	position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 30; width: 46px; height: 46px; border-radius: 50%;
	background: var(--dark); border: 0; box-shadow: var(--shadow); color: #FFFFFF; display: grid; place-items: center;
	opacity: 0; visibility: hidden; transition: .25s;
}
.to-top.show { opacity: 1; visibility: visible; }

/* ---------------------------------------------------------------- الصفحات الداخليّة */
.page-head { padding-block: 24px 14px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; }
.breadcrumb a:hover { color: var(--store-text); text-decoration: underline; }
.breadcrumb.on-dark { color: var(--on-dark-muted); }
.breadcrumb.on-dark a:hover { color: #FFFFFF; }
.page-title { font-size: clamp(28px, 3vw, 40px); font-weight: 800; margin-top: 10px; }
.page-sub { color: var(--muted); margin-top: 2px; }
.dark-card { background: var(--dark); color: #FFFFFF; border-radius: var(--radius-xl); }
.dark-card .page-sub { color: var(--on-dark-muted); }

/* رأس التصنيف: بطاقةٌ داكنة قصيرة */
.dark-head { padding-top: 6px; }
.container-card { margin-inline: var(--frame); padding-block: 30px 34px; }
.sub-strip { margin-top: 22px; }
.sub-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.sub-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 999px; font-weight: 500; font-size: 14.5px; transition: .2s; }
.sub-pill small { color: var(--on-dark-muted); font-size: 12.5px; }
.sub-pill:hover { background: #FFFFFF; color: var(--dark); }
.sub-pill:hover small { color: var(--muted); }

/* ---------------------------------------------------------------- صفحة التصنيف */
.listing { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; padding-block: 34px 70px; }
.filters { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.filters-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.filters-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 16.5px; }
.filters-head .hdr-icon { display: none; }
.f-group { padding: 18px 20px; border-top: 1px solid var(--line-soft); }
.f-group:first-of-type { border-top: 0; }
.f-group h3 { font-size: 15.5px; margin-bottom: 12px; }
.f-body { display: flex; flex-direction: column; gap: 10px; }
.f-body label { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.f-body input[type="checkbox"], .f-body input[type="radio"] { accent-color: var(--store-accent); width: 17px; height: 17px; flex: none; }
.f-body .n { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.f-types .type-dot { width: 26px; height: 26px; box-shadow: none; }
.f-types .type-dot .icon { width: 14px; height: 14px; }
.price-range { display: flex; gap: 10px; align-items: center; }
.price-range input { width: 100%; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
.range-bar { position: relative; height: 4px; background: var(--line); border-radius: 4px; margin: 8px 4px; }
.range-bar span { position: absolute; inset-inline: 15% 30%; top: 0; bottom: 0; background: var(--dark); border-radius: 4px; }
.range-bar span::before, .range-bar span::after { content: ""; position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 3px solid var(--dark); transform: translateY(-50%); }
.range-bar span::before { inset-inline-start: -8px; }
.range-bar span::after { inset-inline-end: -8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar .count-text { color: var(--muted); }
.toolbar .count-text b { color: var(--store-text); }
.tool-end { display: flex; align-items: center; gap: 8px; }
.view-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; }
.view-btn[aria-pressed="true"] { background: var(--dark); color: #FFFFFF; border-color: var(--dark); }
.select { height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; background: var(--white); min-width: 180px; }
.filters-toggle { display: none; }
.listing .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* الترقيم: أرقامٌ وخطٌّ تحت النشط */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 44px; flex-wrap: wrap; }
.pagination a, .pagination span { position: relative; min-width: 42px; height: 42px; display: grid; place-items: center; font-weight: 500; padding: 0 6px; font-variant-numeric: tabular-nums; border-radius: 10px; }
.pagination a:hover { background: var(--cream); }
.pagination [aria-current="page"] { font-weight: 800; }
.pagination [aria-current="page"]::after { content: ""; position: absolute; inset-inline: 8px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--store-primary); }
.pagination .pg-arrow { border: 1px solid var(--line); border-radius: 50%; }

/* ---------------------------------------------------------------- صفحة الكتاب: اللوح الداكن */
.pdp-crumbs { padding-block: 22px 16px; }
.pdp { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 52px; align-items: center; padding: 44px 52px; }
.g-main { position: relative; border-radius: var(--radius-lg); background: var(--dark-2); display: grid; place-items: center; padding: 40px 30px; }
.g-main img { width: 100%; max-width: 270px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 22px 44px rgba(0, 0, 0, .35); }
.g-main .type-dot { position: absolute; top: 16px; inset-inline-start: 16px; width: 40px; height: 40px; }
.g-main .type-dot .icon { width: 20px; height: 20px; }
.g-main .badge-disc { position: absolute; top: 20px; inset-inline-end: 16px; }
.g-thumbs { display: flex; gap: 12px; margin-top: 14px; }
.g-thumb { width: 70px; padding: 5px; border-radius: 10px; border: 1.5px solid rgba(255, 255, 255, .3); background: transparent; }
.g-thumb.is-on { border-color: var(--store-primary); }
.g-thumb img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.pdp-info { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.pdp-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.type-pill { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding-inline: 5px 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 14px; }
.type-pill .type-dot { width: 28px; height: 28px; box-shadow: none; }
.pdp .badge-new { background: #FFFFFF; color: var(--store-text); }
.pdp-title { font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; line-height: 1.2; }
.pdp-by { color: var(--on-dark-muted); margin-top: -6px; }
.pdp-by a { color: #FFFFFF; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.pdp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.pdp .rating { color: var(--on-dark-muted); }
.pdp .stars .off { color: rgba(255, 255, 255, .28); }
.stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14.5px; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5ED39A; }
.pdp-lead { color: var(--on-dark-muted); max-width: 620px; }
.bb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.bb-actions .icon-btn { width: 52px; height: 52px; }
.sample-bar { display: flex; align-items: center; gap: 12px; padding: 8px; padding-inline-end: 16px; border-radius: 999px; background: rgba(255, 255, 255, .1); width: 100%; max-width: 600px; }
.sample-bar .play { width: 42px; height: 42px; border-radius: 50%; background: var(--store-primary); color: var(--on-primary); border: 0; display: grid; place-items: center; flex: none; }
.sample-bar .wave-bars { flex: 1; height: 26px; display: flex; align-items: center; gap: 3px; min-width: 60px; }
.sample-bar .wave-bars i { flex: 1; background: var(--store-primary); opacity: .75; border-radius: 2px; }
.sample-bar small { color: var(--on-dark-muted); font-size: 13px; }
/* التفاصيل في بطاقاتٍ أفقيّة مؤطَّرة */
.fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px var(--gap); margin-top: 22px; }
.fact-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.f-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--cream-2); display: grid; place-items: center; flex: none; }
.f-ico .icon { width: 24px; height: 24px; }
.fact-card small { display: block; color: var(--muted); font-size: 13px; }
.fact-card b { font-weight: 700; font-size: 15px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.prose { margin-top: 14px; color: #2E3047; }
.prose p + p { margin-top: 12px; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; margin: 22px 0 0; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 700; text-align: end; }
.chap-box { background: var(--cream); border-radius: var(--radius-xl); padding: 26px; }
.tab-sub { font-size: 19px; margin-bottom: 14px; }
.chapters { display: grid; gap: 10px; }
.chapters li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--white); }
.ch-n { font-weight: 800; font-size: 15px; min-width: 28px; font-variant-numeric: tabular-nums; border-bottom: 2px solid var(--store-primary); line-height: 1.6; text-align: center; }
.chapters b { display: block; font-weight: 700; font-size: 15px; }
.chapters p { color: var(--muted); font-size: 14px; }
/* الآراء في صفحة الكتاب */
.pr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 56px; align-items: start; }
.rv-summary { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.rv-score { text-align: center; }
.rv-score strong { display: block; font-size: 48px; font-weight: 800; line-height: 1; }
.rv-score .rating { justify-content: center; margin-top: 8px; }
.rv-score p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.rv-bars li { display: grid; grid-template-columns: 62px 1fr 40px; gap: 12px; align-items: center; font-size: 14px; margin-bottom: 6px; }
.rv-bars .bar { height: 7px; border-radius: 9px; background: var(--line-soft); overflow: hidden; }
.rv-bars .bar span { display: block; height: 100%; background: var(--store-primary); border-radius: 9px; }
.rv-form { margin-top: 18px; background: var(--cream); border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 12px; }
.rv-form h3 { font-size: 18px; }
.rv-form p { color: var(--muted); font-size: 14px; }
.star-input { border: 0; padding: 0; margin: 0; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #CFCFD6; }
.star-input label .icon { width: 26px; height: 26px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 3px solid var(--store-primary-dark); border-radius: 4px; }
.field { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--white); resize: vertical; }
.field:focus { outline: none; border-color: var(--store-text); }
.rv-form .btn { justify-self: start; }
.pr-stack .rv-card { border: 1px solid var(--line); }
.pr-stack .rv-card:nth-child(2) { background: #EEEEF3; }
.pr-stack .rv-card:nth-child(3) { background: #E1E1E9; }
.pr-stack .rv-nav { margin-top: 18px; }

/* ---------------------------------------------------------------- صفحة المؤلّف */
.author-hero { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: center; padding: 44px 48px; padding-inline-start: 0; }
.author-hero::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 110px; inset-inline-end: 0; background: var(--cream); border-radius: var(--radius-xl); z-index: -1; }
.ah-photo { width: 220px; height: 220px; border-radius: 50%; overflow: hidden; border: 8px solid var(--white); box-shadow: var(--shadow); background: var(--cream-2); }
.ah-photo img { width: 100%; height: 100%; object-fit: cover; }
.ah-text { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.eyebrow { font-weight: 700; color: var(--muted); }
.author-hero h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; }
.ah-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.author-hero .bio { max-width: 720px; }
.author-hero .bio p + p { margin-top: 10px; }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; padding-block: 10px 50px; }
.cart-list { display: grid; gap: 14px; }
.cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 130px 110px 40px; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cart-book { display: flex; gap: 16px; align-items: center; min-width: 0; }
.cart-thumb { width: 72px; flex: none; border-radius: 8px; overflow: hidden; aspect-ratio: 2 / 3; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info h3 { font-size: 16px; font-weight: 700; }
.cart-info p { color: var(--muted); font-size: 14px; }
.cart-type { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 6px; }
.cart-type .type-dot { width: 22px; height: 22px; box-shadow: none; }
.cart-type .type-dot .icon { width: 12px; height: 12px; }
.cart-price { font-size: 15px; flex-direction: column; gap: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; height: 42px; justify-self: start; }
.qty button { width: 38px; height: 40px; border: 0; background: none; display: grid; place-items: center; font-size: 18px; }
.qty input { width: 36px; text-align: center; border: 0; background: transparent; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cart-total { font-weight: 700; }
.rm { width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.rm:hover { background: var(--cream); color: var(--store-text); }
.cart-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 18px; flex-wrap: wrap; }
.link-btn { border: 0; background: none; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; font-weight: 500; padding: 6px; }
.link-btn:hover { color: var(--store-text); }
.summary { position: sticky; top: calc(var(--hdr-h) + 20px); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.summary h2 { font-size: 21px; }
.sum-count { color: var(--on-dark-muted); font-size: 14.5px; margin-top: -8px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; height: 46px; border: 0; border-radius: var(--radius); padding: 0 14px; background: var(--white); color: var(--store-text); }
.coupon .btn { min-height: 46px; padding: 0 18px; }
.coupon-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px dashed rgba(255, 255, 255, .7); border-radius: 999px; padding: 4px; padding-inline: 14px 4px; font-size: 13.5px; align-self: flex-start; }
.coupon-chip button { border: 0; background: rgba(255, 255, 255, .16); color: #FFFFFF; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.coupon-chip button .icon { width: 14px; height: 14px; }
.sum-rows { display: grid; gap: 10px; padding: 14px 0; border-block: 1px solid rgba(255, 255, 255, .2); }
.sum-rows div { display: flex; justify-content: space-between; font-size: 15px; }
.sum-total { display: flex; justify-content: space-between; font-size: 21px; font-weight: 800; }
.secure { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--on-dark-muted); justify-content: center; }
.cart-empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius-lg); }
.cart-empty .icon { width: 60px; height: 60px; stroke-width: 1.2; }
.cart-empty h2 { margin: 12px 0 6px; }
.cart-empty p { color: var(--muted); margin-bottom: 18px; }

/* ---------------------------------------------------------------- 404 */
.nf-wrap { padding-top: 6px; }
.nf-card { margin-inline: var(--frame); }
.nf-body { display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: 80px 84px; }
.nf-code { font-size: clamp(110px, 16vw, 220px); font-weight: 800; line-height: .9; color: var(--store-primary); letter-spacing: .02em; }
.nf-line { display: flex; align-items: center; gap: 16px; margin: 26px 0 18px; color: var(--on-dark-muted); font-weight: 500; }
.nf-line span:first-child { color: #FFFFFF; }
.nf-line i { width: 110px; height: 2px; background: rgba(255, 255, 255, .3); position: relative; }
.nf-line i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 45%; background: #FFFFFF; }
.nf-body h1 { font-size: clamp(24px, 2.6vw, 34px); }
.nf-body > p { margin-top: 8px; max-width: 560px; color: var(--on-dark-muted); }
.nf-search { display: flex; align-items: center; gap: 6px; margin-top: 26px; width: min(560px, 100%); background: var(--white); border-radius: 999px; padding: 6px; padding-inline-start: 20px; }
.nf-search input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; outline: none; color: var(--store-text); }
.nf-search .btn { border-radius: 999px; }
.nf-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }

/* ---------------------------------------------------------------- صفحة المكوّنات */
.kit-sec { padding: 36px 0; border-bottom: 1px solid var(--line-soft); }
.kit-sec > .container > h2 { font-size: 22px; margin-bottom: 6px; }
.kit-sec > .container > p { color: var(--muted); margin-bottom: 22px; }
.kit-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.kit-on-dark { margin-top: 18px; padding: 22px; }
.kit-pager { display: inline-flex; }
.kit-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); max-width: 1060px; }
.kit-cards > div > small { display: block; color: var(--muted); margin-bottom: 8px; font-size: 13px; }
.kit-type { display: inline-flex; align-items: center; gap: 8px; }
.kit-authors .author-card { width: 300px; }
.kit-cats .cat-tile { width: 200px; }
.kit-rv { margin: 0; padding: 40px; border-radius: var(--radius-xl); }
.kit-rv .rv-stack { max-width: 520px; }

/* ---------------------------------------------------------------- الحركة */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- العروض */
@media (max-width: 1280px) {
	.hdr-nav li:nth-child(6) { display: none; }
	.hdr { gap: 14px; }
}
@media (max-width: 1100px) {
	body, body[data-books-per-row="4"], body[data-books-per-row="5"], body[data-books-per-row="6"] { --per-row: 4; }
	.hdr-nav li:nth-child(5) { display: none; }
	.track-dark .dcard { flex-basis: calc((100% - 2.3 * var(--gap)) / 3.3); }
	.author-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.author-grid > :nth-child(n+7) { display: none; }
	.why-wrap { grid-template-columns: minmax(0, 36%) minmax(0, 1fr); gap: 32px; }
	.why-cards { grid-template-columns: 1fr; gap: 12px; }
	.why-card { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; padding: 16px; }
	.why-ico { grid-row: span 2; margin: 0; }
	.cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.listing { grid-template-columns: 250px 1fr; gap: 24px; }
	.listing .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.foot-cols { grid-template-columns: 1fr 1fr; }
	.pdp { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 34px; padding: 34px; }
	.fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mini-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mini-row > :nth-child(n+5) { display: none; }
	.cart-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; }
	.cart-row { grid-template-columns: minmax(0, 1fr) 96px 120px 90px 38px; gap: 12px; }
	.pr-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
	.rv-layout { gap: 40px; }
}
@media (max-width: 900px) {
	:root { --hdr-h: 66px; }
	.hdr-nav, .hdr-actions .hide-md { display: none; }
	.menu-btn { display: inline-grid; }
	.hdr { gap: 4px; }
	.brand img { width: 34px; height: 34px; }
	.brand-name { font-size: 18px; }
	.hdr-actions { gap: 2px; }
	.search-circle { width: 40px; height: 40px; }
	.hero-card { height: 600px; }
	.track-dark .dcard { flex-basis: calc((100% - 1.3 * var(--gap)) / 2.3); }
	.why-wrap { grid-template-columns: 1fr; padding: 0 0 32px; gap: 24px; }
	.why-wrap::before { inset-block-start: 22%; inset-inline: 0; }
	.why-banner { max-height: none; aspect-ratio: 16 / 10; margin-inline: 24px; }
	.why-body { padding-inline: 24px; }
	.why-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.why-card { display: block; }
	.why-ico { margin-bottom: 12px; }
	body[data-show-trust-bar="false"] .why-wrap { padding: 24px 0; }
	.rv-layout { grid-template-columns: 1fr; }
	.reviews-band { padding-block: 64px; }
	.pdp { grid-template-columns: 1fr; padding: 26px; }
	.about-grid { grid-template-columns: 1fr; gap: 28px; }
	.pr-grid { grid-template-columns: 1fr; }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; inset-block: 0; inset-inline-start: 0; width: min(360px, 90vw); z-index: 61; border-radius: 0; border: 0;
		overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head .hdr-icon { display: inline-grid; }
	.filters-toggle { display: inline-flex; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.author-hero { grid-template-columns: 1fr; padding: 0 26px 30px; gap: 18px; justify-items: center; text-align: center; }
	.author-hero::before { inset-block-start: 90px; inset-inline: 0; }
	.ah-photo { width: 180px; height: 180px; }
	.ah-text { align-items: center; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	body, body[data-books-per-row="4"], body[data-books-per-row="5"], body[data-books-per-row="6"] { --per-row: 2; }
	.container { padding-inline: 16px; }
	.section { padding-block: 40px; }
	.hero-card { height: 560px; }
	.slide-body { top: auto; bottom: 92px; transform: none; }
	.slide-body h2 { font-size: 36px; }
	.slide-kicker { font-size: 15px; }
	.slide::after { background: linear-gradient(to top, color-mix(in srgb, var(--store-accent) 82%, transparent) 0%, color-mix(in srgb, var(--store-accent) 30%, transparent) 60%, color-mix(in srgb, var(--store-accent) 50%, transparent) 100%); transform: none; }
	.hero-pager-wrap { bottom: 26px; }
	.hero-pager .is-on i { width: 56px; }
	.hero-pager button { padding: 6px; gap: 8px; }
	.track { --gap: 14px; }
	.track .bcard { flex-basis: calc((100% - var(--gap)) / 2.15); }
	.track-dark .dcard { flex-basis: calc((100% - var(--gap)) / 1.6); }
	.book-grid { --gap: 14px; row-gap: 22px; }
	.bcard-body { padding: 12px 10px 10px; }
	.bcard-title { font-size: 15px; }
	.price { font-size: 15px; }
	.price-lg { font-size: 27px; }
	.author-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.author-grid > :nth-child(n+7) { display: flex; }
	.author-card { padding: 10px; gap: 10px; flex-direction: column; text-align: center; }
	.ac-img { width: 64px; height: 64px; }
	.ac-text b { font-size: 15px; }
	.why-banner { margin-inline: 12px; }
	.why-body { padding-inline: 16px; }
	.why-cards { grid-template-columns: 1fr; }
	.why-card { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; padding: 16px; }
	.why-ico { grid-row: span 2; margin: 0; }
	.cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.wide-card { min-height: 420px; align-items: flex-end; padding-bottom: 30px; }
	.wide-card::after { background: linear-gradient(to top, color-mix(in srgb, var(--store-accent) 88%, transparent) 0%, color-mix(in srgb, var(--store-accent) 40%, transparent) 70%, transparent); transform: none; }
	.wide-card > img { object-position: 15% center; }
	.rv-card { padding: 22px; }
	.rv-stack { padding-inline-end: 24px; }
	.mini-row { grid-template-columns: 1fr; }
	.mini-row > :nth-child(n+4) { display: none; }
	.listing .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.is-list .bcard-media { width: 110px; }
	.toolbar .count-text { order: 3; width: 100%; }
	.select { min-width: 0; }
	.container-card { padding-block: 24px 26px; }
	.foot-cols { grid-template-columns: 1fr; gap: 26px; }
	.foot-call { font-size: 15.5px; }
	.g-main { padding: 28px 20px; }
	.g-main img { max-width: 210px; }
	.bb-actions { width: 100%; }
	.bb-actions .btn { flex: 1 1 auto; }
	.fact-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.fact-card { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
	.f-ico { width: 42px; height: 42px; }
	.f-ico .icon { width: 20px; height: 20px; }
	.spec { grid-template-columns: 1fr; }
	.rv-summary { grid-template-columns: 1fr; }
	.cart-row { position: relative; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "b b" "q t"; gap: 12px; padding: 14px; }
	.cart-book { grid-area: b; padding-inline-end: 34px; }
	.cart-price { display: none; }
	.cart-row .qty { grid-area: q; }
	.cart-row .cart-total { grid-area: t; text-align: end; }
	.cart-row .rm { position: absolute; top: 10px; inset-inline-end: 8px; }
	.nf-body { padding-block: 56px 60px; }
	.kit-rv { padding: 24px 16px; }
	.kit-authors .author-card { width: 100%; flex-direction: row; text-align: start; }
	.kit-cats .cat-tile { width: calc(50% - 7px); }
	.sec-head { align-items: center; }
	.to-top { bottom: 16px; inset-inline-end: 16px; }
}
@media (max-width: 480px) {
	.hdr-actions .hide-sm { display: none; }
	.brand-name { font-size: 17px; }
	.pdp { padding: 20px 16px; }
	.pdp-title { font-size: 28px; }
	.foot-top { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 900px) {
	.slide img { object-position: 24% center; }
}

/* ==================================================================
   ميزات المنصّة المعتمدة: تبويبات «الأكثر مبيعًا في»، والمدوّنة، وتطبيق المتجر
   ================================================================== */

/* تبويبات التصنيف داخل العنوان: كلماتٌ باهتة كالقائمة في المرجع، والنشطة كحليّة بخطٍّ ذهبيّ */
.tabs-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.title-tabs { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; }
.title-tabs button {
	padding: 2px 8px 4px; border: 0; background: none; font: inherit;
	font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; color: var(--muted); cursor: pointer;
	border-bottom: 3px solid transparent; transition: color .2s, border-color .2s;
}
.title-tabs button:hover { color: var(--store-text); }
.title-tabs button[aria-selected="true"] { color: var(--store-text); font-weight: 700; border-bottom-color: var(--store-primary); }

/* المدوّنة: صورةٌ مستديرة، وتاريخٌ صغير، وعنوانٌ كحليّ */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px var(--gap); }
.post-card { display: flex; flex-direction: column; min-width: 0; }
.post-media { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: var(--cream); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-date { margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.post-title { margin-top: 6px; font-size: 17px; font-weight: 700; line-height: 1.5; }
.post-title a:hover { text-decoration: underline; text-underline-offset: 5px; }
.post-excerpt { margin-top: 6px; font-size: 14.5px; line-height: 1.8; color: var(--muted); }
.post-grid-page { margin-bottom: 40px; }
.post-article { max-width: 820px; margin-inline: auto; }
.post-hero { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-xl); }
.post-content { margin-top: 28px; font-size: 17px; line-height: 2; }
.post-content p + p { margin-top: 16px; }
.post-back { margin-top: 28px; }

/* تطبيق المتجر في التذييل */
.foot-apps { margin-top: 22px; }
.foot-apps h3 { margin-bottom: 10px; }
.foot-apps ul { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-apps li { margin: 0; }
.foot-apps a {
	display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
	border-radius: var(--radius); background: var(--dark); color: #FFFFFF; font-size: 13.5px; font-weight: 500;
}
.foot-apps a:hover { text-decoration: none !important; opacity: .9; }
.foot-apps .icon { width: 17px; height: 17px; }

@media (max-width: 900px) {
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.posts-sec .post-grid > :nth-child(3) { display: none; }
}
@media (max-width: 767px) {
	.post-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
	.posts-sec .post-grid > :nth-child(3) { display: flex; }
	.post-content { font-size: 16px; }
	.tabs-title .sec-title { flex: 0 0 100%; }
}

/* ==================================================================
   الإصدار الثاني: النظرة السريعة، و«كتاب الأسبوع» بعدّاده، وشبكة «وصل حديثًا»،
   وتقييم المتجر، وتخطيط الهاتف (الواجهة والمؤلّفون والثقة والمدوّنة)
   ================================================================== */

/* النظرة السريعة: تطفو على الغلاف بجانب القلب، تظهر عند التحويم في الحاسوب ودائمًا في اللمس */
.qv {
	position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 0; z-index: 2; display: grid; place-items: center;
	background: var(--white); color: var(--store-text); box-shadow: 0 3px 10px rgba(5, 7, 60, .16); transition: opacity .2s, transform .2s;
}
.qv .icon { width: 17px; height: 17px; }
.qv:hover, .heart:hover { background: var(--dark); color: #FFFFFF; }
.bcard .qv { bottom: -17px; inset-inline-end: 52px; }
.is-list .bcard .qv { bottom: 10px; }
.dcard .qv { bottom: 10px; inset-inline-end: 10px; background: rgba(5, 7, 60, .35); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .7); box-shadow: none; backdrop-filter: blur(4px); }
@media (hover: hover) {
	.bcard .qv, .dcard .qv { opacity: 0; transform: translateY(4px); }
	.bcard:hover .qv, .bcard:focus-within .qv, .dcard:hover .qv, .dcard:focus-within .qv { opacity: 1; transform: none; }
}

/* وصل حديثًا: شبكةٌ بصفوفٍ كاملة لأيّ عددٍ في الصفّ */
body[data-books-per-row="4"] .new-grid > :nth-child(n+9),
body[data-books-per-row="5"] .new-grid > :nth-child(n+11) { display: none; }

/* كتاب الأسبوع: بطاقةٌ مؤطَّرة برأسٍ كحليّ فيه العدّاد، والغلاف على لوحٍ كريميّ */
.week-card { border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; background: var(--white); }
.week-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; background: var(--dark); color: #FFFFFF; padding: 14px 28px; }
.week-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.week-kicker .icon { width: 22px; height: 22px; fill: var(--store-primary); stroke: none; }
.countdown { display: flex; align-items: center; gap: 8px; }
.countdown[hidden] { display: none; }
.cd-label { color: var(--on-dark-muted); font-size: 14px; margin-inline-end: 6px; }
.cd-unit { display: grid; justify-items: center; min-width: 56px; padding: 6px 8px; border-radius: var(--radius); background: rgba(255, 255, 255, .1); line-height: 1.15; }
.cd-unit b { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 11.5px; color: var(--on-dark-muted); }
.wbook { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); }
.wbook-media { position: relative; display: grid; place-items: center; padding: 36px 30px; background: var(--cream); }
.wbook-cover { display: block; width: min(230px, 100%); aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; box-shadow: 0 22px 40px rgba(5, 7, 60, .25); transform: rotate(-2deg); transition: transform .4s; }
.wbook:hover .wbook-cover { transform: rotate(0); }
.wbook-cover img { width: 100%; height: 100%; object-fit: cover; }
.wbook-media .type-dot { position: absolute; top: 16px; inset-inline-start: 16px; }
.wbook-media .bcard-badges { top: 18px; inset-inline-end: 16px; }
.wbook-body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; padding: 32px 40px; min-width: 0; }
.wbook-title { font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; }
.wbook-title a:hover { text-decoration: underline; text-underline-offset: 6px; }
.wbook-by { color: var(--muted); margin-top: -4px; }
.wbook-by span { color: var(--store-text); font-weight: 700; }
.wbook-desc { color: #2E3047; max-width: 640px; }
.wbook-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.wbook-facts li { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 500; }
.wbook-facts .icon { width: 16px; height: 16px; color: var(--muted); }
.wbook-price { margin-top: 2px; }
.wbook-buy { width: 100%; margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.wbook-actions { display: flex; align-items: center; gap: 10px; }
.wbook-actions .icon-btn { width: 52px; height: 52px; }

/* تقييم المتجر في شريط الآراء */
.reviews-band { padding-block: 72px; }
.rv-store { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 20px; border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--radius-lg); width: max-content; max-width: 100%; }
.rv-store b { font-size: 40px; font-weight: 800; line-height: 1; }
.rv-store > span { display: flex; flex-direction: column; gap: 2px; }
.rv-store small { color: var(--on-dark-muted); font-size: 13.5px; }

@media (max-width: 1100px) {
	.new-grid > :nth-child(n+9) { display: none; }
	.wbook { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
	.wbook-body { padding: 26px 28px; }
}
@media (max-width: 900px) {
	.why-banner { aspect-ratio: 2 / 1; }
}
@media (max-width: 767px) {
	/* الواجهة: الصورة أعلى البطاقة والعنوان تحتها على الكحليّ، لا فوقها */
	.hero-card { height: 600px; }
	.slide img { bottom: auto; height: 58%; }
	.slide::after { background: linear-gradient(to bottom, color-mix(in srgb, var(--store-accent) 45%, transparent) 0%, transparent 16%, transparent 38%, var(--store-accent) 58%); }
	.slide-body { bottom: 84px; }
	/* المؤلّفون: صفٌّ يُمرَّر بالإصبع */
	.author-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; }
	.author-grid::-webkit-scrollbar { display: none; }
	.author-grid > .author-card { flex: 0 0 138px; scroll-snap-align: start; }
	/* شريط الثقة: بطاقاتٌ صغيرة تُمرَّر */
	.why-wrap { grid-template-columns: minmax(0, 1fr); padding-bottom: 22px; gap: 18px; }
	.why-body { min-width: 0; }
	.why-cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 16px -16px 0; padding: 2px 16px 6px; }
	.why-cards::-webkit-scrollbar { display: none; }
	.why-card { flex: 0 0 76%; scroll-snap-align: start; grid-template-columns: 42px 1fr; column-gap: 12px; padding: 12px 14px; }
	.why-ico { width: 42px; height: 42px; }
	.why-ico .icon { width: 22px; height: 22px; }
	.why-card h3 { font-size: 15px; margin-bottom: 2px; }
	.why-card p { font-size: 13px; line-height: 1.5; }
	.why-banner { aspect-ratio: 16 / 9; }
	/* البانر العريض: الصورة أعلى والنصّ تحتها */
	.wide-card { min-height: 440px; padding-bottom: 28px; }
	.wide-card > img { bottom: auto; height: 56%; object-position: 15% center; }
	.wide-card::after { background: linear-gradient(to bottom, transparent 30%, var(--store-accent) 56%); }
	/* المدوّنة: صفٌّ يُمرَّر */
	.posts-sec .post-grid { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
	.posts-sec .post-grid::-webkit-scrollbar { display: none; }
	.posts-sec .post-card { flex: 0 0 82%; scroll-snap-align: start; }
	.new-grid > :nth-child(n+5) { display: none; }
	/* كتاب الأسبوع */
	.week-bar { padding: 14px 16px; }
	.week-kicker { font-size: 18px; }
	.countdown { width: 100%; }
	.cd-label { flex: 0 0 100%; margin: 0; }
	.countdown { flex-wrap: wrap; }
	.cd-unit { flex: 1; min-width: 0; }
	.wbook { grid-template-columns: 1fr; }
	.wbook-media { padding: 26px 20px; }
	.wbook-cover { width: 170px; }
	.wbook-body { padding: 20px 16px 22px; }
	.rv-store b { font-size: 34px; }
}

/* صفحات الكتاب: اختيار النسخة، والكمّيّة قبل الإضافة، وسطر التوصيل والدفع */
.formats { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.formats-label { font-size: 13.5px; font-weight: 500; color: var(--on-dark-muted); }
.fmt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fmt { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding-inline: 6px 18px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .28); color: #FFFFFF; transition: border-color .2s, background .2s; }
.fmt:hover { border-color: rgba(255, 255, 255, .7); }
.fmt.is-current { border-color: var(--store-primary); background: rgba(255, 255, 255, .08); }
.fmt .type-dot { width: 38px; height: 38px; box-shadow: none; }
.fmt-txt { display: flex; flex-direction: column; line-height: 1.25; }
.fmt-txt b { font-size: 14.5px; font-weight: 700; }
.fmt-txt small { font-size: 13px; color: var(--on-dark-muted); }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ *)) { display: none; }
.qty .icon { width: 16px; height: 16px; }
.qty-dark { height: 52px; border-color: rgba(255, 255, 255, .5); color: #FFFFFF; }
.qty-dark button { height: 50px; color: #FFFFFF; }
.qty-dark input { width: 40px; color: #FFFFFF; }
.pdp-perks { display: flex; flex-wrap: wrap; gap: 8px 22px; width: 100%; margin-top: 2px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 14px; color: var(--on-dark-muted); }
.pdp-perks li { display: inline-flex; align-items: center; gap: 8px; }
.pdp-perks .icon { width: 18px; height: 18px; color: var(--store-primary); }

/* صفحة التصنيف: التصفيات المختارة */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding-inline: 14px 10px; border-radius: 999px; background: var(--cream); border: 1px solid color-mix(in srgb, var(--store-primary) 35%, #FFFFFF); font-size: 14px; font-weight: 500; }
.chip .icon { width: 14px; height: 14px; }
.chip:hover { border-color: var(--store-text); }
.chips-clear { font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; padding: 0 6px; }

/* صفحة المؤلّف: الأعمال صفٌّ أفقيّ بسهمين، فلا يبقى صفٌّ ناقص */
.works-track .bcard { flex-basis: calc((100% - (var(--per-row) - 1) * var(--gap)) / var(--per-row)); }

@media (max-width: 767px) {
	.author-grid, .why-cards, .posts-sec .post-grid { scroll-padding-inline: 16px; }
	.bb-actions .qty-dark { flex: none; }
	.pdp-perks { flex-direction: column; gap: 8px; }
	.fmt-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
	.fmt { height: 50px; padding-inline: 4px 8px; gap: 6px; }
	.fmt .type-dot { width: 26px; height: 26px; }
	.fmt .type-dot .icon { width: 13px; height: 13px; }
	.fmt-txt b { font-size: 13.5px; }
	.fmt-txt small { font-size: 12px; white-space: nowrap; }
}

/* التصنيفات: ستّ بلاطات في الحاسوب الصغير، وصفٌّ يُمرَّر في الهاتف */
@media (max-width: 1100px) and (min-width: 901px) {
	.cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
	.ct-text { padding: 30px 12px 12px; }
	.ct-text b { font-size: 15.5px; }
}
@media (max-width: 767px) {
	.cat-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; }
	.cat-grid::-webkit-scrollbar { display: none; }
	.cat-grid > .cat-tile { flex: 0 0 40%; scroll-snap-align: start; }
}

/* تبويبات صفّ الكتب (القاعدة 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; }
