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

:root {
	/* ألوان المتجر (قيمٌ تجريبيّة يغيّرها الناشر) */
	--store-primary: #6D3FB5;
	--store-primary-dark: #52298F;
	--store-accent: #212E47;
	--store-bg: #FFFFFF;
	--store-text: #111827;

	/* ألوانٌ محايدة */
	--muted: #4E5561;
	--grey: #F1F4F7;
	--grey-2: #F6F8FA;
	--line: #E3E7ED;
	--on-dark: #D5DAE5;
	--gold: #F5B301;
	--star-off: #D3D8E0;
	--tint: color-mix(in srgb, var(--store-primary) 8%, #FFFFFF);
	--tint-2: color-mix(in srgb, var(--store-primary) 14%, #FFFFFF);

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

	--font: 'Tajawal', system-ui, sans-serif;
	--radius: 14px;
	--r-sm: 10px;
	--pill: 999px;
	--shadow: 0 6px 24px rgba(17, 24, 39, .07);
	--shadow-lg: 0 14px 40px rgba(17, 24, 39, .12);
	--hdr-h: 92px;
	--gap: 24px;
	--per: 4;
}

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

/* ---------------------------------------------------------------- أساسيّات */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 12px); }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.7;
	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, p, ul, ol, dl, dd, blockquote, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; }
:focus-visible { outline: 3px solid var(--store-primary); outline-offset: 2px; }
.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); }
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }

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

.stars { display: inline-flex; gap: 2px; }
.stars .icon { width: 16px; height: 16px; color: var(--gold); }
.stars .icon.off { color: var(--star-off); }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.r-num { font-weight: 700; }
.r-count { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 24px; border: 2px solid transparent; border-radius: var(--pill);
	font-size: 15px; font-weight: 700; line-height: 1.3; white-space: nowrap;
	transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--store-primary); color: #FFFFFF; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-accent { background: var(--store-accent); color: #FFFFFF; }
.btn-accent:hover { background: var(--store-primary-dark); }
.btn-outline { background: #FFFFFF; border-color: var(--store-primary); color: var(--store-primary-dark); }
.btn-outline:hover { background: var(--tint); }
.btn-light { background: var(--grey); color: var(--store-text); }
.btn-light:hover { background: var(--line); }
.btn-white { background: #FFFFFF; color: var(--store-accent); }
.btn-white:hover { background: var(--tint-2); }
.btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }

.icon-btn {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--store-text);
	transition: background .2s;
}
.icon-btn:hover { background: var(--grey); }
.icon-btn .count {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 4px;
	border-radius: 9px; background: var(--store-primary); color: #FFFFFF; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.icon-btn-line { width: 52px; height: 52px; border: 1.5px solid var(--line); border-radius: var(--pill); }
.icon-btn-line[aria-pressed="true"], .heart[aria-pressed="true"] { color: #C8364A; }
.icon-btn-line[aria-pressed="true"] .icon, .heart[aria-pressed="true"] .icon { fill: currentColor; }

.account-pill {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: var(--pill);
	background: var(--store-accent); color: #FFFFFF; font-size: 14px; font-weight: 700;
}
.account-pill .icon { width: 18px; height: 18px; }
.account-pill:hover { background: var(--store-primary-dark); }

.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-size: 14px; }
.link-btn:hover { color: #B4232F; }
.link-btn .icon { width: 18px; height: 18px; }
.see-link { color: var(--store-primary-dark); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 700; line-height: 1.5; }
.badge-sale { background: var(--store-primary); color: #FFFFFF; }
.badge-new { background: var(--store-accent); color: #FFFFFF; }
.chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--pill); background: var(--tint-2); color: var(--store-primary-dark); font-size: 13px; font-weight: 700; }
.eyebrow { color: var(--store-primary-dark); font-size: 14px; font-weight: 700; margin-bottom: 6px; }

.price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 800; color: var(--store-primary-dark); font-size: 18px; }
.price del { color: var(--muted); font-size: 13px; font-weight: 500; }
.price-lg { font-size: 30px; }
.price-lg del { font-size: 16px; }

/* دائرة نوع الكتاب (القاعدة 6) */
.type-dot {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; border-radius: 50%; border: 3px solid #FFFFFF; color: #FFFFFF;
	box-shadow: 0 3px 10px rgba(17, 24, 39, .18);
}
.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); }

/* ---------------------------------------------------------------- عنوان القسم */
.section { padding: 80px 0; }
.section-tight { padding: 40px 0; }
.band-grey { background: var(--grey); }
.sec-head { margin-bottom: 40px; }
.sec-head.center { text-align: center; }
.sec-title { font-size: 34px; font-weight: 800; line-height: 1.35; }
.hl { color: var(--store-primary); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 10px; }
.sec-sub { color: var(--muted); margin-top: 10px; font-size: 16px; }
.sec-head.center .sec-sub { max-width: 560px; margin-inline: auto; }
.sec-more { text-align: center; margin-top: 40px; }

/* ---------------------------------------------------------------- الرأس */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--grey); padding: 14px 0; transition: background-color .2s; }
/* فوق الواجهة أو الشريط الداكن يطفو الصندوق الأبيض وحده، ويثبت الرأس على خلفيّته الرماديّة بعد التمرير */
body:has(.hero, .band-dark, .band-404) .site-header:not(.is-scrolled) { background: transparent; }
.hdr-box {
	position: relative; z-index: 30; display: flex; align-items: center; gap: 16px;
	height: 64px; padding: 0 12px 0 16px; padding-inline: 20px 12px;
	background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu-btn { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand-name { font-size: 20px; font-weight: 800; color: var(--store-text); }
.hdr-nav { margin-inline: auto; }
.hdr-nav > ul { display: flex; align-items: center; gap: 4px; }
.hdr-nav > ul > li > a, .drop-btn {
	position: relative; display: inline-flex; align-items: center; gap: 4px;
	padding: 8px 12px; border: 0; background: none; font-size: 15px; font-weight: 500; color: var(--store-text);
}
.drop-btn .icon { width: 16px; height: 16px; }
.hdr-nav a:hover, .drop-btn:hover { color: var(--store-primary-dark); }
.hdr-nav a.is-current { font-weight: 700; }
/* ثلاث نقاطٍ تحت الصفحة الحاليّة */
.hdr-nav a.is-current::after {
	content: ""; position: absolute; bottom: 0; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
	background: var(--store-primary); box-shadow: 7px 0 0 var(--store-primary), -7px 0 0 var(--store-primary);
}
.has-drop { position: relative; }
.drop {
	position: absolute; top: calc(100% + 14px); inset-inline-start: 0; min-width: 210px; padding: 8px;
	background: #FFFFFF; border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-drop.open .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.drop a:hover { background: var(--tint); color: var(--store-primary-dark); }
.hdr-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.hdr-actions .account-pill { margin-inline-start: 6px; }
.hdr-search {
	position: absolute; top: calc(100% + 10px); inset-inline: 0; display: none; gap: 8px; padding: 10px;
	background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.search-open .hdr-search { display: flex; }
.hdr-search input { flex: 1; min-width: 0; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: var(--pill); }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(17, 24, 39, .45); opacity: 0; visibility: hidden; transition: .25s; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100; width: min(320px, 86vw);
	display: flex; flex-direction: column; gap: 16px; padding: 18px; overflow-y: auto;
	background: #FFFFFF; transform: translateX(105%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.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: block; padding: 10px 4px; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-label { padding: 12px 4px 4px; color: var(--muted); font-size: 13px; font-weight: 700; }
.drawer-sub { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.drawer-sub a { padding: 5px 12px; border-radius: var(--pill); background: var(--tint); color: var(--store-primary-dark); font-size: 14px; }
.drawer-contact { display: grid; gap: 10px; margin-top: auto; padding: 14px; border-radius: var(--r-sm); background: var(--grey); font-size: 14px; }
.drawer-contact a { display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- الواجهة */
.hero {
	position: relative; display: flex; flex-direction: column; justify-content: flex-end;
	min-height: 700px; margin-top: calc(-1 * var(--hdr-h)); padding: calc(var(--hdr-h) + 20px) 0 72px;
	background: var(--store-accent); color: #FFFFFF; overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s, visibility .9s; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.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, rgba(16, 12, 36, .62), rgba(16, 12, 36, .15) 62%, rgba(16, 12, 36, 0)); }
.slide-copy { position: absolute; z-index: 2; top: calc(var(--hdr-h) + 84px); inset-inline: 0; display: flex; flex-direction: column; gap: 14px; }
.slide-title { max-width: 620px; font-size: 52px; font-weight: 800; line-height: 1.25; color: #FFFFFF; }
.slide-title mark { background: none; color: #FFD991; }
.slide-text { max-width: 520px; font-size: 18px; font-weight: 500; color: #FFFFFF; }
.hero-search-wrap { position: relative; z-index: 3; }
.hero-search { padding: 18px 20px 20px; background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow-lg); color: var(--store-text); }
.hs-cap { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.hs-row { display: flex; gap: 16px; align-items: stretch; }
.hs-box { flex: 1; display: flex; min-width: 0; border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.hs-field { flex: 1.3; display: flex; flex-direction: column; justify-content: center; padding: 10px 16px; min-width: 0; }
.hs-field label { font-size: 13px; color: var(--muted); }
.hs-field input { width: 100%; padding: 2px 0; border: 0; outline: 0; background: none; font-size: 18px; font-weight: 700; }
.hs-field input::placeholder { color: #6B7280; font-weight: 500; font-size: 16px; }
.hs-field:focus-within { box-shadow: inset 0 -3px 0 var(--store-primary); }
.hs-quick { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px 16px; border-inline-start: 1.5px solid var(--line); min-width: 0; }
.hs-quick > span { font-size: 13px; color: var(--muted); }
.hs-quick ul { display: flex; flex-wrap: wrap; gap: 6px; }
.hs-quick a { display: inline-block; padding: 2px 10px; border-radius: var(--pill); background: var(--tint); color: var(--store-primary-dark); font-size: 13px; font-weight: 700; }
.hs-quick a:hover { background: var(--tint-2); }
.hs-go {
	display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	min-width: 118px; border: 0; border-radius: var(--r-sm); background: var(--store-primary); color: #FFFFFF; font-weight: 700; font-size: 16px;
}
.hs-go:hover { background: var(--store-primary-dark); }
.hero-dots { position: absolute; z-index: 3; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 5px; background: rgba(255, 255, 255, .55); transition: width .3s; }
.hero-dots button[aria-pressed="true"] { width: 28px; background: #FFFFFF; }

/* ---------------------------------------------------------------- المسارات الأفقيّة والأسهم الجانبيّة */
.track-wrap { position: relative; }
.track { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 2px 18px; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.side-arrow {
	position: absolute; z-index: 4; top: 38%; display: inline-flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; border: 0; border-radius: 50%; background: #FFFFFF; color: var(--store-text); box-shadow: var(--shadow-lg);
	transition: background .2s, color .2s, opacity .2s;
}
.side-arrow:hover { background: var(--store-primary); color: #FFFFFF; }
.side-arrow:disabled { opacity: .45; cursor: default; background: #FFFFFF; color: var(--muted); }
.side-prev { inset-inline-start: -16px; }
.side-next { inset-inline-end: -16px; }

/* ---------------------------------------------------------------- التصنيفات البيضاويّة */
.oval-track .oval-cat { flex: 0 0 calc((100% - 5 * var(--gap)) / 6); }
.oval-cat { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.oval-img { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 50%; overflow: hidden; background: var(--grey); transition: transform .3s; }
body[data-category-shape="circle"] .oval-img { aspect-ratio: 1; }
.oval-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.oval-cat:hover .oval-img img { transform: scale(1.06); }
.oval-cat b { margin-top: 10px; font-size: 17px; }
.oval-cat small { color: var(--muted); font-size: 13px; }
.ovals-sec .side-arrow { top: 30%; }

/* ---------------------------------------------------------------- شريط العبارات */
.marquee { overflow: hidden; background: var(--store-accent); color: #FFFFFF; padding: 16px 0; }
.marquee-track { display: flex; width: max-content; gap: 40px; padding-inline: 20px; }
.marquee.is-running .marquee-track { animation: fanar-marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track:empty, .marquee:has(.marquee-track:empty) { display: none; }
.mq-item { display: inline-flex; align-items: center; gap: 40px; font-size: 20px; font-weight: 700; white-space: nowrap; }
.mq-item .icon { width: 22px; height: 22px; color: #FFD991; stroke-width: 2.4; }
@keyframes fanar-marquee { to { transform: translateX(50%); } }

/* ---------------------------------------------------------------- بانر «عن المكتبة» */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.about-media { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 112px 300px; grid-template-areas: "box tall" "img tall"; gap: 16px; }
.about-box {
	grid-area: box; display: flex; align-items: center; justify-content: center; padding: 14px 20px; text-align: center;
	background: var(--store-primary); color: #FFFFFF; font-size: 20px; font-weight: 800; line-height: 1.4;
	border-start-start-radius: 90px 70px; border-start-end-radius: var(--r-sm);
}
.about-frame { display: block; overflow: hidden; background: var(--grey); }
.about-frame img { width: 100%; height: 100%; object-fit: cover; }
.af-1 { grid-area: img; border-end-start-radius: 120px; border-start-start-radius: var(--r-sm); border-start-end-radius: var(--r-sm); border-end-end-radius: var(--r-sm); }
.af-1 img { object-position: 100% 50%; }
.af-2 { grid-area: tall; border-radius: var(--r-sm); border-start-end-radius: 140px; border-end-end-radius: 140px; }
.af-2 img { object-position: 0 50%; }
.about-copy .sec-title { margin-bottom: 14px; }
.about-text { color: var(--muted); font-size: 16px; }
.feat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0 30px; }
.feat { display: flex; gap: 14px; padding: 18px; background: #FFFFFF; border-radius: var(--r-sm); box-shadow: var(--shadow); }
.feat b { display: block; font-size: 16px; }
.feat small { display: block; color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 2px; }
.feat-ico {
	flex: 0 0 48px; height: 52px; display: inline-flex; align-items: center; justify-content: center; color: #FFFFFF;
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.fi-1 { background: var(--store-primary); }
.fi-2 { background: var(--type-educational); }

/* ---------------------------------------------------------------- الشبكة البنائيّة */
.masonry { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(10, 52px); grid-auto-flow: column; gap: 20px; }
.m-tile { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--store-accent); min-height: 160px; }
.m-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.m-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 14, 30, .78), rgba(12, 14, 30, 0) 55%); }
.m-tile:hover img { transform: scale(1.06); }
.m-cap { position: absolute; z-index: 1; inset-inline: 0; bottom: 18px; display: flex; flex-direction: column; align-items: center; color: #FFFFFF; text-align: center; }
.m-cap b { font-size: 19px; }
.m-cap small { font-size: 14px; }
.m-1, .m-4, .m-5, .m-8 { grid-row: span 4; }
.m-2, .m-3, .m-6, .m-7 { grid-row: span 6; }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); gap: var(--gap); }
.book-grid.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.book-track .bcard { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); }
.bcard { position: relative; display: flex; flex-direction: column; background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .25s, transform .25s; }
.bcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
body[data-card-style="framed"] .bcard { box-shadow: none; border: 1.5px solid var(--line); }
body[data-card-style="flat"] .bcard { box-shadow: none; background: transparent; }
body[data-card-style="flat"] .bcard-body { padding-inline: 2px; }
body[data-card-style="flat"] .bcard:hover { transform: none; }
.bcard-media { position: relative; }
.bcard-cover { display: block; overflow: hidden; border-start-start-radius: var(--radius); border-start-end-radius: var(--radius); background: var(--grey); }
body[data-card-style="flat"] .bcard-cover { border-radius: var(--radius); }
.bcard-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .5s; }
.bcard:hover .bcard-cover img { transform: scale(1.04); }
.badges { position: absolute; top: 12px; inset-inline-end: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.card-tools { position: absolute; z-index: 3; top: 12px; inset-inline-start: 12px; display: flex; flex-direction: column; gap: 8px; }
.heart {
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; border: 0; border-radius: 50%; background: #FFFFFF; color: var(--store-text); box-shadow: 0 3px 10px rgba(17, 24, 39, .14);
	opacity: 0; transition: opacity .2s;
}
.heart .icon { width: 18px; height: 18px; }
.heart:hover { color: var(--store-primary-dark); }
.bcard:hover .heart, .bcard:focus-within .heart, .heart[aria-pressed="true"] { opacity: 1; }
@media (hover: none) { .heart { opacity: 1; } }
.bcard-media .type-dot { position: absolute; bottom: -17px; inset-inline-end: 14px; z-index: 2; }
.stock-band { position: absolute; inset-inline: 0; bottom: 0; padding: 6px; background: #1F2433; color: #FFFFFF; text-align: center; font-size: 13px; font-weight: 700; }
.bcard-media .stock-band { border-radius: 0; }
.is-out .bcard-cover img, .is-out .hcard-cover img { filter: grayscale(.6); opacity: .7; }
.bcard-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 16px 16px 14px; }
.bcard-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.bcard-author { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); min-width: 0; }
.ava { flex: 0 0 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tint-2); color: var(--store-primary-dark); font-size: 12px; font-weight: 800; }
.bcard-meta .rating { gap: 3px; font-size: 13px; }
.bcard-meta .rating > .icon { width: 15px; height: 15px; color: var(--gold); fill: var(--gold); }
.bcard-title { font-size: 16px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-title a:hover { color: var(--store-primary-dark); }
.bcard-cat { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--store-primary-dark); font-size: 12px; font-weight: 700; line-height: 1.4; }
.bcard-cat .icon { width: 14px; height: 14px; }
.bcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; border-top: 1px solid var(--line); }
.add-btn {
	flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
	border: 0; border-radius: 50%; background: var(--tint-2); color: var(--store-primary-dark); transition: background .2s, color .2s;
}
.add-btn:hover { background: var(--store-primary); color: #FFFFFF; }
.add-btn:disabled { background: var(--grey); color: #8A919C; cursor: not-allowed; }
.add-btn .icon { width: 19px; height: 19px; }

/* البطاقة الأفقيّة */
.hlist { display: grid; gap: 16px; }
.hcard { display: grid; grid-template-columns: 112px 1fr; gap: 18px; padding: 14px; background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow); }
body[data-card-style="framed"] .hcard { box-shadow: none; border: 1.5px solid var(--line); }
.hcard-cover { position: relative; display: block; align-self: start; }
.hcard-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-sm); }
.hcard-cover .type-dot { position: absolute; bottom: 8px; inset-inline-end: -10px; width: 30px; height: 30px; }
.hcard-cover .type-dot .icon { width: 14px; height: 14px; }
.hcard-cover .stock-band { border-end-start-radius: var(--r-sm); border-end-end-radius: var(--r-sm); font-size: 12px; }
.hcard-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hcard-top .badges { position: static; flex-direction: row; }
.hcard-top .rating { margin-inline-start: auto; }
.hcard-title { font-size: 17px; font-weight: 700; line-height: 1.45; }
.hcard-title a:hover { color: var(--store-primary-dark); }
.hcard-author { color: var(--muted); font-size: 14px; }
.hcard-desc { color: var(--muted); font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hcard-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.hcard-foot .price { margin-inline-end: auto; }
.heart-line { position: static; opacity: 1; width: 40px; height: 40px; border: 1.5px solid var(--line); box-shadow: none; }

/* ---------------------------------------------------------------- شريط الثقة */
.trust-box {
	position: relative; overflow: hidden; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
	padding: 40px 36px; background: var(--store-accent); color: #FFFFFF; border-radius: var(--radius);
}
.trust-box::before, .trust-box::after { content: ""; position: absolute; width: 120px; height: 60px; pointer-events: none; }
.trust-box::before {
	top: -2px; inset-inline-end: 24px;
	background: radial-gradient(circle at 30% 0, #E57A5F 0 34px, transparent 35px), radial-gradient(circle at 70% 0, var(--store-primary) 0 30px, transparent 31px);
}
.trust-box::after {
	bottom: -2px; inset-inline-start: 24px;
	background: radial-gradient(circle at 70% 100%, #E57A5F 0 34px, transparent 35px), radial-gradient(circle at 30% 100%, var(--store-primary) 0 30px, transparent 31px);
}
.trust-item { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ti-head { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; }
.ti-head .icon { width: 24px; height: 24px; color: #FFD991; }
.ti-text { color: var(--on-dark); font-size: 14px; }
body[data-show-trust-bar="false"] .trust { display: none; }

/* ---------------------------------------------------------------- «وصل حديثًا» */
.new-sec { position: relative; overflow: hidden; background: var(--tint); }
.new-lines { position: absolute; top: 0; inset-inline-end: 0; width: 55%; height: 100%; fill: none; stroke: var(--store-primary); stroke-opacity: .16; stroke-width: 1.2; pointer-events: none; }
.new-grid { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.tilt { position: relative; height: 540px; }
.tilt-card { position: absolute; display: block; overflow: hidden; border: 7px solid #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow-lg); background: #FFFFFF; }
.tilt-card img { width: 100%; height: 100%; object-fit: cover; }
.tc-1 { width: 38%; height: 72%; top: 14%; inset-inline-start: 0; transform: rotate(7deg); }
.tc-1 img { object-position: 50% 0; }
.tc-3 { width: 38%; height: 72%; top: 14%; inset-inline-end: 0; transform: rotate(-7deg); }
.tc-3 img { object-position: 50% 100%; }
.tc-2 { z-index: 2; width: 54%; height: 96%; top: 2%; inset-inline-start: 23%; }
.tilt-chip { position: absolute; bottom: 16px; inset-inline: 16px; padding: 8px 12px; border-radius: var(--pill); background: #FFFFFF; color: var(--store-primary-dark); font-weight: 800; font-size: 14px; text-align: center; }
.new-list .sec-head { margin-bottom: 24px; }

/* ---------------------------------------------------------------- الآراء */
.rv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.rv-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 24px; text-align: center; background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow); }
.rv-card h3 { font-size: 17px; font-weight: 800; }
.rv-card blockquote { color: var(--muted); font-size: 15px; line-height: 1.75; }
.rv-who { display: flex; align-items: center; gap: 10px; }
.rv-card .rv-who { margin-top: auto; }
.rv-ava { flex: 0 0 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tint-2); color: var(--store-primary-dark); font-weight: 800; }
body[data-show-reviews="false"] .reviews { display: none; }

/* ---------------------------------------------------------------- المؤلّفون */
.authors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.acard { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.acard-img { display: block; width: 150px; aspect-ratio: 3 / 4; border-radius: 50%; overflow: hidden; margin-bottom: 12px; border: 5px solid #FFFFFF; box-shadow: var(--shadow); }
body[data-category-shape="circle"] .acard-img { aspect-ratio: 1; }
.acard-img img { width: 100%; height: 100%; object-fit: cover; }
.acard b { font-size: 17px; }
.acard small { color: var(--muted); font-size: 14px; }
.acard:hover b { color: var(--store-primary-dark); }

/* ---------------------------------------------------------------- البانر العريض */
.wide { position: relative; display: block; min-height: 340px; overflow: hidden; background: var(--store-accent); color: #FFFFFF; border-radius: var(--radius); }
.wide-img { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; background: var(--store-primary); clip-path: polygon(0 0, 76% 0, 100% 100%, 0 100%); }
.wide-img img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; clip-path: polygon(0 0, 72% 0, 96% 100%, 0 100%); }
.wide-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: 52%; padding: 56px 56px 80px; }
.wide-title { font-size: 32px; font-weight: 800; line-height: 1.35; }
.wide-text { color: var(--on-dark); font-size: 16px; max-width: 460px; }
.wide-block { position: absolute; bottom: 0; right: 0; width: 22%; height: 48px; background: var(--store-primary); }

/* ---------------------------------------------------------------- شاهدتَه مؤخّرًا */
.mini-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.mini { display: flex; flex-direction: column; gap: 10px; }
.mini-cover { position: relative; display: block; }
.mini-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-sm); box-shadow: var(--shadow); }
.mini-cover .type-dot { position: absolute; bottom: -10px; inset-inline-end: 8px; width: 28px; height: 28px; border-width: 2px; }
.mini-cover .type-dot .icon { width: 13px; height: 13px; }
.mini-body h3 { font-size: 14px; font-weight: 700; line-height: 1.5; }
.mini-body p { color: var(--muted); font-size: 13px; }
.mini-body .price { font-size: 15px; }

/* ---------------------------------------------------------------- التذييل */
.site-footer { background: var(--grey); padding-top: 64px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.foot-about { color: var(--muted); font-size: 15px; margin: 14px 0 22px; max-width: 400px; }
.site-footer h3 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.foot-brand h3 { margin-bottom: 2px; }
.foot-brand .muted { font-size: 14px; }
.news-pill { display: flex; align-items: center; gap: 8px; max-width: 420px; margin-top: 14px; padding: 6px; padding-inline-start: 16px; background: #FFFFFF; border-radius: var(--pill); box-shadow: var(--shadow); }
.news-pill .icon { color: var(--muted); }
.news-pill input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 6px 0; }
.foot-col ul { display: grid; gap: 10px; }
.foot-col a { color: #374151; font-size: 15px; }
.foot-col a:hover { color: var(--store-primary-dark); }
.fc-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fc-ico { flex: 0 0 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #E3E7ED; color: var(--store-text); }
.fc-line small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.fc-line b { display: block; font-size: 14px; }
.foot-bottom { border-top: 1px solid var(--line); padding: 18px 0; font-size: 14px; color: var(--muted); }
.foot-bottom-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-social { display: flex; gap: 10px; }
.foot-social a { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #FFFFFF; color: var(--store-text); }
.foot-social a:hover { background: var(--store-primary); color: #FFFFFF; }
.foot-social .icon { width: 18px; height: 18px; }
.to-top {
	position: fixed; z-index: 50; bottom: 22px; inset-inline-end: 22px; display: inline-flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--store-primary); color: #FFFFFF; box-shadow: var(--shadow-lg);
	opacity: 0; visibility: hidden; transition: .25s;
}
.to-top.show { opacity: 1; visibility: visible; }

/* ---------------------------------------------------------------- رؤوس الصفحات الداخليّة */
.page-band { position: relative; }
.band-dark {
	margin-top: calc(-1 * var(--hdr-h)); padding: calc(var(--hdr-h) + 56px) 0 64px;
	background: var(--store-accent); color: #FFFFFF; overflow: hidden;
}
.band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band-dark::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(16, 12, 36, .78), rgba(16, 12, 36, .35)); }
.band-in { position: relative; z-index: 1; }
.band-light { background: var(--grey); padding: 18px 0 30px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; opacity: .7; }
.band-light .breadcrumb { color: var(--muted); }
.band-light .breadcrumb [aria-current] { color: var(--store-text); font-weight: 700; }
.band-dark .breadcrumb [aria-current] { font-weight: 700; }
.page-title { font-size: 40px; font-weight: 800; line-height: 1.3; margin-top: 10px; }
.page-sub { margin-top: 8px; max-width: 620px; font-size: 16px; }
.band-light .page-sub { color: var(--muted); }

/* ---------------------------------------------------------------- صفحة التصنيف */
.mini-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.chip-track { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }
.sub-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 10px; padding: 6px; padding-inline-end: 18px; background: #FFFFFF; border: 1.5px solid var(--line); border-radius: var(--pill); transition: border-color .2s; }
.sub-chip:hover { border-color: var(--store-primary); }
.sub-chip img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.sub-chip b { display: block; font-size: 14px; line-height: 1.3; }
.sub-chip small { color: var(--muted); font-size: 12px; }
.listing { display: grid; grid-template-columns: 270px 1fr; gap: 32px; align-items: start; padding-bottom: 80px; }
.filters { position: sticky; top: calc(var(--hdr-h) + 16px); padding: 18px; background: #FFFFFF; border: 1.5px solid var(--line); border-radius: var(--radius); }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.filters-head b { display: inline-flex; align-items: center; gap: 8px; }
.filters-head .icon-btn { display: none; }
.f-group { border-bottom: 1px solid var(--line); padding: 12px 0; }
.f-group:last-child { border-bottom: 0; }
.f-group summary { display: flex; align-items: center; justify-content: space-between; font-weight: 700; cursor: pointer; list-style: none; }
.f-group summary::-webkit-details-marker { display: none; }
.f-group summary .icon { width: 18px; height: 18px; transition: transform .2s; }
.f-group[open] summary .icon { transform: rotate(180deg); }
.f-body { display: grid; gap: 8px; padding-top: 10px; font-size: 14px; }
.f-body label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.f-body input[type="checkbox"], .f-body input[type="radio"] { width: 17px; height: 17px; accent-color: var(--store-primary); }
.f-body .n { margin-inline-start: auto; padding: 0 8px; border-radius: var(--pill); background: var(--grey); color: var(--muted); font-size: 12px; }
.f-type .type-dot { width: 26px; height: 26px; border-width: 2px; box-shadow: none; }
.f-type .type-dot .icon { width: 12px; height: 12px; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { width: 100%; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.filters-toggle { display: none; }
.count-text { margin-inline-end: auto; color: var(--muted); font-size: 15px; }
.count-text b { color: var(--store-text); }
.view-toggle { display: flex; gap: 4px; }
.view-toggle .icon-btn.is-on { background: var(--tint-2); color: var(--store-primary-dark); }
.select { padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--pill); background: #FFFFFF; }
[data-listing][data-view="list"] .listing-grid { grid-template-columns: 1fr; }
[data-listing][data-view="list"] .listing-grid .bcard { flex-direction: row; }
[data-listing][data-view="list"] .listing-grid .bcard-media { flex: 0 0 150px; }
[data-listing][data-view="list"] .listing-grid .bcard-cover { border-radius: var(--radius); border-start-end-radius: 0; border-end-end-radius: 0; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; border-radius: 50%; background: #FFFFFF; border: 1.5px solid var(--line); font-weight: 700; }
.pagination [aria-current] { background: var(--store-primary); border-color: var(--store-primary); color: #FFFFFF; }
.pagination .dots { border: 0; background: none; }
.pagination a:hover { border-color: var(--store-primary); color: var(--store-primary-dark); }

/* ---------------------------------------------------------------- صفحات الكتاب */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 32px; align-items: start; padding-top: 28px; padding-bottom: 80px; }
.pdp-top, .pdp-box, .buy-box { background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow); }
.pdp-top { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 32px; padding: 24px; }
.gallery { display: grid; grid-template-columns: 66px 1fr; gap: 12px; align-items: start; }
.g-thumbs { display: grid; gap: 10px; }
.g-thumb { padding: 3px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #FFFFFF; }
.g-thumb.is-on { border-color: var(--store-primary); }
.g-thumb img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; }
.g-stage { position: relative; padding: 22px; background: var(--grey); border-radius: var(--radius); }
.g-main { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.g-stage .type-dot { position: absolute; top: 12px; inset-inline-start: 12px; width: 40px; height: 40px; }
.pdp-head { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pdp-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pdp-title { font-size: 32px; font-weight: 800; line-height: 1.3; }
.pdp-by { color: var(--muted); }
.pdp-by a { color: var(--store-primary-dark); font-weight: 700; }
.pdp-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pdp-lead { color: var(--muted); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.fact { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--grey); border-radius: var(--r-sm); }
.f-ico { flex: 0 0 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #FFFFFF; color: var(--store-primary-dark); }
.fact small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.fact b { display: block; font-size: 14px; }
.pdp-box { margin-top: 24px; padding: 28px; }
.pdp-box h2 { font-size: 21px; font-weight: 800; margin-bottom: 14px; }
.prose p + p { margin-top: 10px; }
.prose { color: #2B3340; }
.hi-title { font-size: 17px; font-weight: 800; margin: 22px 0 10px; }
.highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.highlights li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.highlights .icon { flex: 0 0 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--tint-2); color: var(--store-primary-dark); stroke-width: 2.4; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td { padding: 12px 4px; border-bottom: 1px solid var(--line); text-align: start; }
.spec-table th { width: 38%; color: var(--muted); font-weight: 500; }
.rv-summary { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; padding: 20px; background: var(--grey); border-radius: var(--radius); }
.rv-score { text-align: center; }
.rv-score strong { display: block; font-size: 46px; line-height: 1.1; }
.rv-bars { display: grid; gap: 6px; font-size: 13px; }
.rv-bars li { display: grid; grid-template-columns: 60px 1fr 40px; align-items: center; gap: 10px; }
.bar { height: 8px; border-radius: 4px; background: #DDE2E9; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); border-radius: 4px; }
.rv-list { margin-top: 10px; }
.rv-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.rv-item .rv-who small { display: block; color: var(--muted); font-size: 13px; }
.rv-item .rv-who .rating { margin-inline-start: auto; }
.rv-item p { margin-top: 10px; color: #2B3340; }
.rv-form { margin-top: 22px; padding: 22px; background: var(--tint); border-radius: var(--radius); display: grid; gap: 12px; justify-items: start; }
.rv-form h3 { font-size: 18px; font-weight: 800; }
.star-input { 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: var(--star-off); }
.star-input label .icon { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary); border-radius: 4px; }
.field { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #FFFFFF; resize: vertical; }
.buy-box { display: grid; align-content: start; gap: 14px; padding: 24px; }
.bb-head { display: flex; align-items: center; justify-content: space-between; }
.bb-label { color: var(--muted); font-size: 14px; }
.stock { justify-self: start; padding: 4px 12px; border-radius: var(--pill); background: #E4F3EA; color: #17643F; font-size: 13px; font-weight: 700; }
.bb-type { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--grey); border-radius: var(--r-sm); font-size: 14px; }
.bb-type .type-dot { width: 32px; height: 32px; box-shadow: none; }
.sample-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--tint); border-radius: var(--r-sm); }
.sample-bar small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.play { flex: 0 0 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--store-primary); color: #FFFFFF; }
.play .icon { width: 16px; height: 16px; }
.wave-bars { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; }
.wave-bars i { flex: 1; background: color-mix(in srgb, var(--store-primary) 55%, #FFFFFF); border-radius: 2px; }
.bb-actions { display: grid; gap: 10px; }
.bb-row { display: flex; gap: 10px; }
.bb-row .btn { flex: 1; }
.perks { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.perks li { display: flex; align-items: center; gap: 8px; }
.perks .icon { color: var(--store-primary-dark); width: 18px; height: 18px; }

/* ---------------------------------------------------------------- صفحة المؤلّف */
.author-sec { padding-top: 0; }
.author-card { position: relative; z-index: 2; display: flex; align-items: center; gap: 28px; margin-top: -70px; padding: 24px 28px; background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.ah-photo { flex: 0 0 130px; aspect-ratio: 3 / 4; border-radius: 50%; overflow: hidden; border: 5px solid #FFFFFF; box-shadow: var(--shadow); }
body[data-category-shape="circle"] .ah-photo { aspect-ratio: 1; }
.ah-photo img { width: 100%; height: 100%; object-fit: cover; }
.ah-info .page-title { margin-top: 0; font-size: 34px; }
.ah-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.author-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; margin-top: 24px; }
.bio-box { padding: 26px; background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow); }
.bio-box h2 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.bio-box p { color: #2B3340; }
.bio-box p + p { margin-top: 10px; }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 32px; align-items: start; padding-top: 32px; padding-bottom: 80px; }
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cart-head h2 { font-size: 21px; font-weight: 800; }
.cart-list { display: grid; gap: 14px; }
.cart-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto auto auto; align-items: center; gap: 18px; padding: 14px 16px; background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-thumb { position: relative; display: block; }
.cart-thumb img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; }
.cart-thumb .type-dot { position: absolute; bottom: -6px; inset-inline-end: -8px; width: 26px; height: 26px; border-width: 2px; }
.cart-thumb .type-dot .icon { width: 12px; height: 12px; }
.cart-info h3 { font-size: 16px; font-weight: 700; }
.cart-info p { color: var(--muted); font-size: 14px; }
.cart-info .price { font-size: 15px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--pill); }
.qty button { width: 36px; height: 38px; border: 0; background: none; font-size: 18px; font-weight: 700; }
.qty button:hover { color: var(--store-primary-dark); }
.qty input { width: 40px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; background: none; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-total { font-size: 16px; min-width: 96px; text-align: end; }
.rm { color: var(--muted); }
.rm:hover { color: #B4232F; background: #FCECEE; }
.cart-empty { display: grid; justify-items: center; gap: 10px; padding: 48px 24px; text-align: center; background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow); }
.cart-empty[hidden] { display: none; }
.ce-ico { display: inline-flex; width: 70px; height: 70px; align-items: center; justify-content: center; border-radius: 50%; background: var(--tint-2); color: var(--store-primary-dark); }
.ce-ico .icon { width: 32px; height: 32px; }
.summary { position: sticky; top: calc(var(--hdr-h) + 16px); display: grid; gap: 14px; padding: 26px; background: var(--store-accent); color: #FFFFFF; border-radius: var(--radius); overflow: hidden; }
.summary h2 { font-size: 21px; font-weight: 800; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; padding: 9px 16px; border: 0; border-radius: var(--pill); background: #FFFFFF; color: var(--store-text); }
.coupon-chip { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; padding-inline: 12px 6px; border-radius: var(--pill); background: #34405A; font-size: 13px; }
.coupon-chip button { display: inline-flex; border: 0; background: none; color: #FFFFFF; padding: 2px; }
.coupon-chip .icon { width: 14px; height: 14px; }
.sum-rows div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #3A4661; font-size: 15px; }
.sum-rows span { color: var(--on-dark); }
.sum-total { display: flex; justify-content: space-between; font-size: 21px; font-weight: 800; padding-top: 4px; }
.secure { display: flex; align-items: center; gap: 8px; color: var(--on-dark); font-size: 13px; }
.secure .icon { width: 18px; height: 18px; }
.summary .see-link { color: #FFFFFF; justify-self: center; }

/* ---------------------------------------------------------------- 404 */
.band-404 { margin-top: calc(-1 * var(--hdr-h)); padding: calc(var(--hdr-h) + 40px) 0 72px; background: var(--tint); }
.nf { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.nf-code { font-size: 150px; font-weight: 800; line-height: 1; color: var(--store-primary); letter-spacing: 4px; }
.nf-art { width: 380px; max-width: 100%; height: auto; margin-top: -18px; }
.nf-beam { fill: #FFD991; opacity: .7; }
.nf-b1 { fill: var(--store-primary); }
.nf-b2 { fill: #E57A5F; }
.nf-b3 { fill: var(--store-accent); }
.nf-lamp { fill: #FFD991; }
.nf-roof { fill: var(--store-accent); }
.nf-sea { fill: color-mix(in srgb, var(--store-primary) 28%, #FFFFFF); }
.nf h1 { font-size: 32px; font-weight: 800; }
.nf-text { color: var(--muted); max-width: 560px; }
.nf-search { display: flex; gap: 8px; width: min(520px, 100%); padding: 6px; padding-inline-start: 18px; background: #FFFFFF; border-radius: var(--pill); box-shadow: var(--shadow); }
.nf-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; }
.nf-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------------------------------------------------------------- صفحة المكوّنات */
.kit-sec { padding: 44px 0; border-bottom: 1px solid var(--line); }
.kit-sec > .container > h2 { font-size: 22px; font-weight: 800; }
.kit-sec > .container > p { color: var(--muted); margin: 4px 0 24px; max-width: 760px; }
.kit-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kit-card { display: flex; flex-direction: column; gap: 8px; }
.kit-card > small { color: var(--muted); font-weight: 700; }
.kit-card .bcard { flex: 1; }
.kit-hlist { grid-template-columns: 1fr 1fr; }
.kit-cats { display: grid; grid-template-columns: 180px 180px minmax(0, 320px); gap: var(--gap); align-items: start; }
.kit-cats .m-tile { height: 340px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.kit-type { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.kit-deal { padding: 32px; border-radius: var(--radius); }
.kit-deal .deal-grid { grid-template-columns: 300px minmax(0, 1fr); }
.kit-pdp { align-items: flex-end; gap: 24px; }
.kit-dark { display: inline-flex; padding: 12px; background: var(--store-accent); border-radius: var(--radius); }

/* ---------------------------------------------------------------- العروض المتوسّطة */
@media (max-width: 1180px) {
	.hdr-nav > ul > li > a, .drop-btn { padding-inline: 8px; font-size: 14px; }
	.pdp { grid-template-columns: minmax(0, 1fr); }
	.pdp-top { grid-template-columns: 300px minmax(0, 1fr); }
	.buy-box { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; }
	.buy-box > * { grid-column: 1; }
	.buy-box > .bb-actions { grid-column: 2; grid-row: 1 / span 4; }
	.buy-box > .perks { grid-column: 2; }
}

@media (max-width: 1023px) {
	.menu-btn { display: inline-flex; }
	.hdr-nav { display: none; }
	.hdr-box { padding-inline: 8px 12px; }
	.brand { margin-inline-end: auto; }
	.section { padding: 64px 0; }
	.sec-title { font-size: 28px; }
	.slide-title { font-size: 42px; }
	.oval-track .oval-cat { flex-basis: calc((100% - 3 * var(--gap)) / 4); }
	.about-grid, .new-grid { grid-template-columns: 1fr; gap: 40px; }
	.about-media { max-width: 560px; }
	.masonry { grid-template-rows: repeat(10, 40px); gap: 14px; }
	.book-grid, .book-grid.grid-3 { grid-template-columns: repeat(min(var(--per), 3), minmax(0, 1fr)); }
	.book-track .bcard { flex-basis: calc((100% - 2 * var(--gap)) / 3); }
	.trust-box { grid-template-columns: repeat(2, 1fr); gap: 28px; }
	.rv-grid { grid-template-columns: 1fr 1fr; }
	.rv-grid .rv-card:last-child { grid-column: span 2; }
	.mini-row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
	.foot-grid { grid-template-columns: 1fr 1fr; }
	.wide-copy { width: 60%; padding: 44px 36px 76px; }
	.wide-img { width: 44%; }
	.listing { grid-template-columns: 1fr; }
	.filters { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100; width: min(330px, 88vw); overflow-y: auto; border-radius: 0; transform: translateX(105%); visibility: hidden; transition: transform .3s, visibility .3s; }
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head .icon-btn, .filters-toggle { display: inline-flex; }
	.pdp, .cart-layout { grid-template-columns: 1fr; }
	.buy-box, .summary { position: static; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- الهاتف */
@media (max-width: 767px) {
	:root { --gap: 14px; --hdr-h: 80px; }
	.container { padding-inline: 16px; }
	.site-header { padding: 12px 0; }
	.hdr-box { height: 56px; gap: 4px; }
	.hide-sm { display: none !important; }
	.brand-name { font-size: 17px; }
	.brand img { width: 34px; height: 34px; }
	.icon-btn { width: 38px; height: 38px; }
	.section { padding: 52px 0; }
	.section-tight { padding: 28px 0; }
	.sec-head { margin-bottom: 26px; }
	.sec-title { font-size: 24px; }
	.hl { text-underline-offset: 7px; }
	.hero { display: block; min-height: 0; padding: 0 0 32px; }
	.hero-slides { position: relative; height: 430px; }
	.slide img { height: 262px; object-position: 12% 50%; }
	.slide::after { bottom: auto; height: 262px; background: linear-gradient(to bottom, rgba(16, 12, 36, .3), rgba(16, 12, 36, 0) 45%); }
	.slide-copy { top: 280px; gap: 8px; }
	.slide-title { font-size: 27px; }
	.slide-text { font-size: 15px; color: var(--on-dark); }
	.hero-search { padding: 8px; }
	.hs-cap, .hs-quick { display: none; }
	.hs-row { gap: 8px; }
	.hs-field { padding: 6px 12px; }
	.hs-field label { font-size: 12px; }
	.hs-field input { font-size: 16px; }
	.hs-go { min-width: 64px; font-size: 13px; }
	.hero-dots { top: 226px; bottom: auto; }
	.side-prev { inset-inline-start: 2px; }
	.side-next { inset-inline-end: 2px; }
	.side-arrow { width: 38px; height: 38px; }
	.oval-track .oval-cat { flex-basis: calc((100% - 2 * var(--gap)) / 2.6); }
	.oval-cat b { font-size: 15px; }
	.mq-item { font-size: 16px; gap: 28px; }
	.marquee-track { gap: 28px; }
	.about-media { grid-template-rows: 90px 220px; gap: 10px; }
	.about-box { font-size: 15px; padding: 10px; border-start-start-radius: 60px 50px; }
	.af-1 { border-end-start-radius: 80px; }
	.af-2 { border-start-end-radius: 90px; border-end-end-radius: 90px; }
	.feat-cards { grid-template-columns: 1fr; }
	.masonry { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 28px; grid-auto-flow: row dense; gap: 12px; }
	.m-cap b { font-size: 16px; }
	.book-grid, .book-grid.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.book-track .bcard { flex-basis: calc((100% - var(--gap)) / 2); }
	.bcard-body { padding: 14px 10px 10px; }
	.bcard-meta { flex-direction: column; align-items: flex-start; gap: 2px; }
	.bcard-title { font-size: 14px; }
	.price { font-size: 15px; }
	.add-btn { position: relative; width: 34px; height: 34px; }
	.add-btn::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; } /* مساحة لمسٍ 40px حول الدائرة */
	.bcard .price { flex-wrap: nowrap; gap: 4px; font-size: 14px; white-space: nowrap; }
	.bcard .price del { font-size: 11px; }
	.bcard-foot { gap: 4px; padding-top: 2px; }
	.bcard-title { line-height: 1.4; }
	.badges { top: 8px; inset-inline-end: 8px; }
	.card-tools { top: 8px; inset-inline-start: 8px; gap: 6px; }
	.heart { width: 34px; height: 34px; }
	.bcard-media .type-dot { width: 30px; height: 30px; bottom: -15px; inset-inline-end: 10px; }
	.trust-box { display: flex; gap: 10px; padding: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-box::-webkit-scrollbar { display: none; }
	.trust-box::before, .trust-box::after { display: none; }
	.trust-item { flex: 0 0 68%; align-items: flex-start; gap: 2px; padding: 4px 6px; text-align: start; scroll-snap-align: start; }
	.ti-head { font-size: 15px; }
	.ti-head .icon { width: 20px; height: 20px; }
	.ti-text { font-size: 13px; }
	.tilt { height: 380px; }
	.hcard { grid-template-columns: 86px 1fr; gap: 14px; padding: 12px; }
	.hcard-desc { display: none; }
	.hcard-title { font-size: 15px; }
	.rv-grid, .mini-row, .posts-grid { display: flex; gap: 12px; margin-inline: -16px; padding: 4px 16px 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.rv-grid::-webkit-scrollbar, .mini-row::-webkit-scrollbar, .posts-grid::-webkit-scrollbar { display: none; }
	.rv-grid > *, .posts-grid > * { flex: 0 0 82%; scroll-snap-align: center; }
	.rv-grid .rv-card:last-child { grid-column: auto; }
	.authors-grid { grid-template-columns: 1fr 1fr; row-gap: 28px; }
	.acard-img { width: 120px; }
	.wide { min-height: 0; }
	.wide-img { position: relative; display: block; width: 100%; height: 190px; clip-path: polygon(0 0, 100% 0, 100% 82%, 0 100%); }
	.wide-img img { clip-path: polygon(0 0, 100% 0, 100% 76%, 0 94%); }
	.wide-copy { width: 100%; padding: 22px 22px 70px; }
	.wide-title { font-size: 24px; }
	.wide-block { width: 36%; height: 36px; }
	.mini-row > * { flex: 0 0 40%; scroll-snap-align: start; }
	.foot-grid { grid-template-columns: 1fr 1fr; gap: 30px 16px; }
	.foot-brand, .foot-contact { grid-column: span 2; }
	.foot-bottom-in { justify-content: center; text-align: center; }
	.band-dark { padding: calc(var(--hdr-h) + 32px) 0 48px; }
	.page-title { font-size: 28px; }
	.toolbar .count-text { flex-basis: 100%; order: 3; }
	.pdp { padding-top: 18px; }
	.pdp-top { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 20px; }
	.buy-box { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
	.buy-box > *, .buy-box > .bb-actions, .buy-box > .perks { grid-column: auto; grid-row: auto; }
	.fmt { flex: 1 1 0; min-width: 0; gap: 6px; padding-inline-end: 8px; }
	.fmt .type-dot { width: 24px; height: 24px; }
	.fmt .type-dot .icon { width: 12px; height: 12px; }
	.fmt-txt small { font-size: 12px; }
	.gallery { grid-template-columns: 52px 1fr; }
	.pdp-title { font-size: 25px; }
	.facts, .highlights { grid-template-columns: 1fr; }
	.pdp-box { padding: 20px 16px; }
	.rv-summary { grid-template-columns: 1fr; }
	.author-card { flex-direction: column; text-align: center; padding: 22px 16px; }
	.ah-stats { justify-content: center; }
	.cart-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px 14px; padding: 12px; }
	.cart-row .qty { grid-column: 2; justify-self: start; }
	.cart-row .cart-total { grid-column: 3; grid-row: 2; min-width: 0; }
	.cart-row .rm { grid-column: 3; grid-row: 1; align-self: start; }
	.nf-code { font-size: 104px; }
	.nf h1 { font-size: 24px; }
	.kit-cards, .kit-hlist { grid-template-columns: 1fr; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kit-cats { grid-template-columns: 1fr 1fr; }
	.kit-cats .m-tile { grid-column: span 2; height: 260px; }
	.kit-deal { padding: 18px 14px; }
	.kit-deal .deal-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- الأسئلة الشائعة (الملحق 8) */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .25s; }
.faq-item[open] { box-shadow: var(--shadow-lg); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; font-weight: 700; font-size: 17px; color: var(--store-text); cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-ic { flex: 0 0 auto; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--tint-2); color: var(--store-primary-dark); transition: transform .25s, background .25s, color .25s; }
.faq-item[open] .faq-ic { transform: rotate(45deg); background: var(--store-primary); color: #FFFFFF; }
.faq-item p { padding: 0 20px 18px; color: var(--muted); line-height: 1.8; }
@media (max-width: 599px) {
	.faq-item summary { padding: 14px 16px; font-size: 15px; }
	.faq-item p { padding: 0 16px 14px; font-size: 14px; }
}

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

/* صفوفٌ كاملة بأيّ عددٍ في الصفّ: rows-2 صفّان، وrow-1 صفٌّ واحد، وما زاد يُخفى */
@media (min-width: 1024px) {
	body[data-books-per-row="3"] .rows-2 > :nth-child(n+7),
	body[data-books-per-row="4"] .rows-2 > :nth-child(n+9),
	body[data-books-per-row="5"] .rows-2 > :nth-child(n+11),
	body[data-books-per-row="6"] .rows-2 > :nth-child(n+13),
	body[data-books-per-row="3"] .row-1 > :nth-child(n+4),
	body[data-books-per-row="4"] .row-1 > :nth-child(n+5),
	body[data-books-per-row="5"] .row-1 > :nth-child(n+6),
	body[data-books-per-row="6"] .row-1 > :nth-child(n+7) { display: none; }
}
@media (min-width: 768px) and (max-width: 1023px) {
	.rows-2 > :nth-child(n+7), .row-1 > :nth-child(n+4) { display: none; }
}
@media (max-width: 767px) {
	.rows-2 > :nth-child(n+5), .row-1 > :nth-child(n+5) { display: none; }
}

/* ---------------------------------------------------------------- عروض الموسم: شريطٌ كحليّ بعدّادٍ واحد */
.deal-band { position: relative; overflow: hidden; background: var(--store-accent); color: #FFFFFF; }
.deal-band::before {
	content: ""; position: absolute; top: -40%; inset-inline-start: -8%; width: 70%; height: 180%; pointer-events: none;
	background: radial-gradient(ellipse at 50% 50%, rgba(255, 217, 145, .13), rgba(255, 217, 145, 0) 66%);
}
.deal-band::after {
	content: ""; position: absolute; bottom: -2px; inset-inline-end: 6%; width: 120px; height: 60px; pointer-events: none;
	background: radial-gradient(circle at 70% 100%, #E57A5F 0 34px, transparent 35px), radial-gradient(circle at 30% 100%, var(--store-primary) 0 30px, transparent 31px);
}
.deal-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 48px; align-items: center; }
.deal-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.deal-band .sec-title { color: #FFFFFF; }
.deal-band .hl { color: #FFD991; }
.deal-band .sec-sub { margin-top: 0; color: var(--on-dark); }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: var(--pill); background: rgba(255, 255, 255, .1); color: #FFD991; font-size: 14px; font-weight: 700; }
.deal-kicker .icon { width: 16px; height: 16px; }
.countdown { display: grid; gap: 8px; }
.countdown[hidden] { display: none; }
.cd-label { color: var(--on-dark); font-size: 14px; }
.cd-units { display: flex; gap: 8px; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 66px; padding: 10px 6px 8px; border-radius: var(--r-sm); background: #FFFFFF; color: var(--store-accent); }
.cd-unit b { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-unit small { color: var(--muted); font-size: 12px; }
.deal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.deal-list .hcard { grid-template-columns: 96px minmax(0, 1fr); box-shadow: none; color: var(--store-text); }
body[data-card-style="framed"] .deal-list .hcard { border-color: transparent; }
.hcard-foot .add-btn { margin-inline-start: auto; }
.deal-list .hcard-body { justify-content: center; }
.deal-list .hcard-foot { flex-wrap: nowrap; margin-top: 0; padding-top: 0; }
.deal-list .price { flex-wrap: nowrap; gap: 6px; font-size: 16px; white-space: nowrap; }
.deal-list .price del { font-size: 12px; }

/* ---------------------------------------------------------------- كتاب الشهر: غلافٌ كبير في إطارٍ قوسيّ */
.bom-book { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.bom-media {
	position: relative; display: flex; justify-content: center; padding: 44px 32px;
	background: var(--tint); border-radius: var(--r-sm); border-start-end-radius: 160px; border-end-start-radius: 160px; overflow: hidden;
}
.bom-media::before {
	content: ""; position: absolute; top: 18%; inset-inline-start: 50%; width: 140%; height: 46%; pointer-events: none;
	background: linear-gradient(to left, color-mix(in srgb, var(--store-primary) 22%, transparent), transparent 70%);
	clip-path: polygon(0 50%, 100% 0, 100% 100%);
}
.bom-cover { position: relative; display: block; }
.bom-cover img { width: 250px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); transform: rotate(-3deg); transition: transform .4s; }
.bom-cover:hover img { transform: rotate(0); }
.bom-media .type-dot { position: absolute; top: 26px; inset-inline-start: 26px; width: 40px; height: 40px; }
.bom-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.bom-head { margin-bottom: 4px; }
.bom-title { font-size: 26px; font-weight: 800; line-height: 1.35; }
.bom-title a:hover { color: var(--store-primary-dark); }
.bom-by { color: var(--muted); }
.bom-by a { color: var(--store-primary-dark); font-weight: 700; }
.bom-desc { color: #2B3340; }
.bom-desc p + p { margin-top: 8px; }
.bom-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.bom-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }

/* ---------------------------------------------------------------- المدوّنة: بطاقات المقالات */
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.post-card { display: flex; flex-direction: column; overflow: hidden; background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow); }
.post-media { display: block; overflow: hidden; }
.post-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 20px 20px; }
.post-date { color: var(--muted); font-size: 13px; }
.post-title { font-size: 18px; font-weight: 800; line-height: 1.45; }
.post-title a:hover { color: var(--store-primary-dark); }
.post-excerpt { color: var(--muted); font-size: 15px; }
.post-more { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 6px; color: var(--store-primary-dark); font-size: 14px; font-weight: 700; }
.post-more .icon { width: 16px; height: 16px; }

@media (max-width: 1180px) {
	.deal-grid { grid-template-columns: 270px minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 1023px) {
	.hero { min-height: 600px; }
	.slide-title { max-width: 500px; }
	.slide img { object-position: 12% 50%; }
	.deal-grid { grid-template-columns: 1fr; gap: 28px; }
	.bom-book { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 32px; }
	.bom-cover img { width: 200px; }
}
@media (max-width: 767px) {
	.row-tabs { flex-wrap: nowrap; justify-content: flex-start; margin: -8px -16px 22px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tab { flex-shrink: 0; padding: 8px 16px; font-size: 14px; }
	.deal-list { grid-template-columns: 1fr; gap: 10px; }
	.deal-list .hcard { grid-template-columns: 76px minmax(0, 1fr); }
	.cd-unit { min-width: 58px; padding: 8px 4px 6px; }
	.cd-unit b { font-size: 22px; }
	.bom-book { grid-template-columns: 1fr; gap: 22px; }
	.bom-media { padding: 28px 20px; border-start-end-radius: 100px; border-end-start-radius: 100px; }
	.bom-cover img { width: 170px; }
	.bom-title { font-size: 22px; }
	.posts-grid { display: flex; }
	.post-body { padding: 14px 16px 16px; }
	.post-title { font-size: 16px; }
}

/* ---------------------------------------------------------------- صفحات الكتاب: اختيار الصيغة، والكمّيّة، والتفاصيل بعرض الصفحة */
.pdp-details { grid-column: 1 / -1; }
.pdp-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.pdp-cols .pdp-box { margin-top: 0; }
.pdp-cols .highlights { grid-template-columns: 1fr; }
.pdp-cols .spec-table th, .pdp-cols .spec-table td { padding: 10px 4px; }
@media (min-width: 1024px) {
	.pdp { align-items: stretch; }
	#reviews { display: grid; grid-template-columns: 360px minmax(0, 1fr); column-gap: 32px; align-items: start; }
	#reviews > h2 { grid-column: 1 / -1; }
	#reviews > .rv-summary { grid-column: 1; grid-template-columns: 1fr; gap: 14px; }
	#reviews > .rv-form { grid-column: 1; }
	#reviews > .rv-list { grid-column: 2; grid-row: 2 / span 2; margin-top: -18px; }
}
.formats { display: grid; gap: 6px; }
.formats-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.fmt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fmt { display: inline-flex; align-items: center; gap: 8px; padding: 6px; padding-inline-end: 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #FFFFFF; transition: border-color .2s; }
.fmt:hover { border-color: var(--store-primary); }
.fmt.is-current { border-color: var(--store-primary); background: var(--tint); }
.fmt .type-dot { flex-shrink: 0; width: 30px; height: 30px; border-width: 2px; box-shadow: none; }
.fmt .type-dot .icon { width: 14px; height: 14px; }
.fmt-txt b { display: block; font-size: 14px; line-height: 1.3; }
.fmt-txt small { display: block; white-space: nowrap; color: var(--store-primary-dark); font-size: 13px; font-weight: 700; line-height: 1.4; }
.bb-add { display: flex; gap: 10px; }
.bb-add .qty { flex-shrink: 0; }
.bb-add .qty button { height: 48px; }
.bb-add .qty .icon { width: 16px; height: 16px; }
.bb-add .btn { flex: 1; padding-inline: 14px; }
@media (max-width: 1023px) {
	.pdp-cols { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- صفحة التصنيف: التصفية المختارة */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 22px; }
.af-label { color: var(--muted); font-size: 14px; }
.af-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; padding-inline-start: 14px; border: 0; border-radius: var(--pill); background: var(--tint-2); color: var(--store-primary-dark); font-size: 13px; font-weight: 700; }
.af-chip .icon { width: 15px; height: 15px; }
.af-chip:hover { background: var(--store-primary); color: #FFFFFF; }
.af-clear { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.af-clear:hover { color: #B4232F; }
[data-listing][data-view="list"] .listing-grid { gap: 14px; }
[data-listing][data-view="list"] .listing-grid .bcard-media { flex-basis: 112px; }
[data-listing][data-view="list"] .listing-grid .bcard-body { justify-content: center; padding: 14px 20px; }
[data-listing][data-view="list"] .listing-grid .bcard-foot { margin-top: 8px; }
[data-listing][data-view="list"] .listing-grid .badges { top: 6px; inset-inline-end: 6px; }

/* ---------------------------------------------------------------- صفحة المؤلّف: الحقائق في بطاقة الرأس، والأعمال في مسار */
.ah-info { flex: 1; min-width: 0; }
.ah-facts { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, auto); gap: 10px; }
.ah-facts div { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--grey); border-radius: var(--r-sm); font-size: 14px; }
.ah-facts dt { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.ah-facts dt .icon { width: 16px; height: 16px; color: var(--store-primary-dark); }
.ah-facts dd { font-weight: 700; }
.author-cols { grid-template-columns: minmax(0, 1fr); }
/* ---------------------------------------------------------------- المدوّنة والمقال */
.blog-sec { padding-top: 48px; }
.posts-grid.is-blog .is-lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.is-lead .post-media img { height: 100%; }
.is-lead .post-body { justify-content: center; gap: 10px; padding: 32px 36px; }
.is-lead .post-title { font-size: 26px; }
.is-lead .post-excerpt { font-size: 16px; }
.is-lead .post-more { margin-top: 6px; }
.article { max-width: 820px; padding-top: 36px; padding-bottom: 72px; }
.article-head { display: grid; gap: 8px; margin-bottom: 22px; }
.article-title { font-size: 36px; font-weight: 800; line-height: 1.35; }
.article-lead { color: var(--muted); font-size: 18px; }
.article-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-body { margin-top: 28px; color: #2B3340; font-size: 17px; line-height: 1.95; }
.article-body p + p, .article-body h2 + p { margin-top: 10px; }
.article-body h2 { margin-top: 28px; font-size: 22px; font-weight: 800; color: var(--store-text); }
.article-body blockquote { margin: 26px 0; padding: 18px 24px; border-inline-start: 4px solid var(--store-primary); border-radius: var(--r-sm); background: var(--tint); color: var(--store-primary-dark); font-size: 19px; font-weight: 700; }
.article-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
@media (max-width: 1023px) {
	.posts-grid.is-blog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.posts-grid.is-blog .post-card:last-child { display: none; }
}
@media (max-width: 767px) {
	.posts-grid.is-blog { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; overflow: visible; }
	.posts-grid.is-blog .post-card:last-child { display: flex; }
	.posts-grid.is-blog .is-lead { display: flex; }
	.is-lead .post-body { padding: 16px; }
	.is-lead .post-title { font-size: 19px; }
	.article-title { font-size: 26px; }
	.article-body { font-size: 16px; }
}
@media (max-width: 1180px) {
	.author-card { flex-wrap: wrap; }
	.ah-facts { flex-basis: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.ah-facts { grid-template-columns: minmax(0, 1fr); text-align: start; }
	.ah-facts div { flex-direction: row; justify-content: space-between; padding: 10px 14px; }
}

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

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