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

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

	/* محايدات ومشتقّات */
	--on-primary: #FFFFFF;             /* الأبيض على النيليّ ≈ 7.3 */
	--on-accent: #05073C;              /* البرتقاليّ للزخرفة؛ وإن حمل نصًّا فكحليّ */
	--soft: color-mix(in srgb, var(--store-primary) 5%, #FFFFFF);      /* الشريط النيليّ الفاتح */
	--soft-2: color-mix(in srgb, var(--store-primary) 9%, #FFFFFF);
	--lav: color-mix(in srgb, var(--store-primary) 17%, #FFFFFF);      /* لافنديّ البانر الأوّل */
	--beige: #F2F1EC;
	--muted: #5A5C6E;
	--line: #E3E3EA;
	--white: #FFFFFF;
	--star: #F5A623;
	--shadow: 0 12px 32px rgba(5, 7, 60, .1);
	--shadow-sm: 0 4px 14px rgba(5, 7, 60, .1);
	--radius: 12px;
	--radius-lg: 16px;
	--gap: 22px;
	--per-row: 5;
	--hdr-h: 80px;
	--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; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: hidden;
}
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; }
:focus-visible { outline: 3px solid var(--store-primary); outline-offset: 2px; }

.container { width: 100%; max-width: 1340px; margin-inline: auto; padding-inline: 20px; }
.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-primary { background: var(--store-primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-dark { background: var(--store-text); color: #FFFFFF; }
.btn-dark:hover { background: color-mix(in srgb, var(--store-text) 82%, var(--store-primary)); }
.btn-soft { background: var(--soft-2); color: var(--store-primary-dark); }
.btn-soft:hover { background: var(--lav); }
.btn-light { background: var(--white); color: var(--store-text); border-color: var(--line); }
.btn-light:hover { border-color: var(--store-text); }
.btn-white { background: #FFFFFF; color: var(--store-text); }
.btn-ghost-white { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .8); border-radius: 999px; }
.btn-ghost-white:hover { background: rgba(255, 255, 255, .12); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--white); color: var(--store-text); position: relative;
}
.icon-btn:hover { border-color: var(--store-text); }
.icon-btn[aria-pressed="true"] { color: var(--store-primary); }
.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 { color: var(--store-primary); }
.see-all .icon { width: 18px; height: 18px; }
/* زرّ البحث الدائريّ النيليّ */
.hs-go {
	width: 54px; height: 54px; border-radius: 50%; border: 0; flex: none;
	background: var(--store-primary); color: var(--on-primary); display: grid; place-items: center;
}
.hs-go:hover { background: var(--store-primary-dark); }

/* ---------------------------------------------------------------- عنوان القسم */
.section { padding-block: 56px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-title { font-size: clamp(22px, 2.1vw, 28px); font-weight: 700; }
.sec-sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.band-soft { background: var(--soft); }
/* قسمان أبيضان متتاليان: مسافةٌ واحدة بينهما لا حشوتان */
.section:not(.band-soft) + .section:not(.band-soft) { padding-top: 0; }

/* ---------------------------------------------------------------- التقييم والسعر ودوائر النوع والخصم */
.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: #D9D9DE; }
.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: 30px; }
.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, .18); 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; }
.type-dot-xl { width: 56px; height: 56px; box-shadow: 0 0 0 5px var(--white), 0 8px 18px rgba(5, 7, 60, .18); }
.type-dot-xl .icon { width: 26px; height: 26px; stroke-width: 1.8; }
/* دائرة الخصم النيليّة */
.disc-dot {
	display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 50%; background: var(--store-primary); color: var(--on-primary);
	line-height: 1.05; box-shadow: 0 4px 12px rgba(5, 7, 60, .2);
}
.disc-dot b { font-size: 15px; font-weight: 800; }
.disc-dot small { font-size: 11.5px; font-weight: 500; }
.disc-dot-lg { width: 76px; height: 76px; }
.disc-dot-lg b { font-size: 21px; }
.disc-dot-lg small { font-size: 13px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge-new { background: var(--store-accent); color: var(--on-accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--soft-2); color: var(--store-text); font-size: 13.5px; font-weight: 500; }
.pill-white { background: #FFFFFF; }

/* ---------------------------------------------------------------- الحافّة الممزّقة */
.torn { position: absolute; display: block; pointer-events: none; z-index: 3; }
.torn path { fill: var(--store-bg); }
.torn .torn-rear { fill: rgba(255, 255, 255, .55); }
.torn-bottom { inset-inline: 0; bottom: -1px; width: 100%; height: 40px; }
.torn-side { top: 0; bottom: 0; inset-inline-start: -1px; width: 24px; height: 100%; }
[dir="rtl"] .torn-side { transform: scaleX(-1); }
.torn-side path { fill: var(--panel, var(--store-bg)); }
body[data-torn-edges="straight"] .torn { display: none; }

/* ---------------------------------------------------------------- الرأس */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); transition: background .25s, box-shadow .25s; }
.hdr { display: flex; align-items: center; gap: 22px; min-height: var(--hdr-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.hdr-nav { margin-inline-start: 12px; }
.hdr-nav > ul { display: flex; align-items: center; gap: 2px; }
.hdr-nav a, .hdr-nav .drop-btn {
	position: relative; 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;
}
.hdr-nav a::after, .hdr-nav .drop-btn::after {
	content: ""; position: absolute; inset-inline: 12px; bottom: 6px; height: 2px; border-radius: 2px;
	background: var(--store-accent); transform: scaleX(0); transition: transform .2s;
}
.hdr-nav a:hover::after, .hdr-nav a[aria-current="page"]::after, .hdr-nav .drop-btn:hover::after { transform: none; }
.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;
	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::after { display: none; }
.drop a:hover { background: var(--soft-2); }
.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); }
.hdr-link { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 10px; font-weight: 500; font-size: 15px; }
.count {
	position: absolute; top: 1px; inset-inline-end: -1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
	background: var(--store-accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}
/* زرّ السلّة: كبسولةٌ مفرَّغة كزرّ الدخول في المرجع */
.cart-pill {
	display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 18px; padding-inline: 16px 8px;
	border: 1.5px solid currentColor; border-radius: 999px; font-weight: 700; font-size: 15px;
}
.cart-pill:hover { background: rgba(127, 127, 160, .12); }
.cart-pill .cart-num { background: var(--store-accent); color: var(--on-accent); border-radius: 999px; min-width: 26px; height: 26px; display: inline-grid; place-items: center; font-size: 12.5px; padding: 0 7px; }
.menu-btn, .search-toggle { display: none; }
.m-search { display: none; background: var(--white); border-top: 1px solid var(--line); padding-block: 12px; }
.m-search-row { display: flex; gap: 8px; }
.m-search input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; background: var(--white); color: var(--store-text); }
.m-search button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--store-primary); color: var(--on-primary); display: grid; place-items: center; flex: none; }
.search-open .m-search { display: block; }

/* الرأس الشفّاف فوق الواجهة (الرئيسيّة و404) */
body:has(.hero-top > .hero) .site-header,
body:has(.nf-hero) .site-header {
	position: fixed; inset-inline: 0; top: 0; background: transparent; border-bottom-color: transparent; color: #FFFFFF;
}
body:has(.hero-top > .hero) .site-header.is-stuck,
body:has(.nf-hero) .site-header.is-stuck { background: var(--store-primary-dark); box-shadow: 0 6px 20px rgba(5, 7, 60, .2); }
body:has(.hero-top > .hero) .hdr-icon:hover,
body:has(.nf-hero) .hdr-icon:hover,
body:has(.hero-top > .hero) .cart-pill:hover,
body:has(.nf-hero) .cart-pill:hover { background: rgba(255, 255, 255, .14); }
/* الرأس الأبيض: لونٌ نيليّ للرابط عند التحويم */
.site-header:not(.is-over) .drop a:hover { color: var(--store-primary-dark); }

/* ---------------------------------------------------------------- الدرج الجانبيّ */
.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); 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); font-weight: 500; }
.drawer-sub { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.drawer-sub a { padding: 6px 12px; border-radius: 999px; background: var(--soft-2); font-size: 14px; }
.drawer-card { background: var(--store-primary-dark); color: #FFFFFF; border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; }
.drawer-card small { display: block; }

/* ---------------------------------------------------------------- الواجهة */
.hero-top { position: relative; }
.hero { position: relative; height: clamp(560px, 52vw, 740px); background: #3730A3; overflow: hidden; }
.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(180deg, rgba(5, 7, 60, .5) 0%, rgba(5, 7, 60, .38) 45%, rgba(5, 7, 60, .05) 80%); }
.slide-body {
	position: absolute; z-index: 1; inset-inline: 0; top: 268px; text-align: center; color: #FFFFFF; padding-inline: 24px;
	display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.slide-body h2 { font-size: clamp(34px, 5vw, 70px); font-weight: 800; letter-spacing: -.01em; line-height: 1.15; text-shadow: 0 2px 22px rgba(5, 7, 60, .35); }
.slide-body p { font-size: clamp(15px, 1.25vw, 17px); max-width: 560px; text-shadow: 0 1px 10px rgba(5, 7, 60, .4); }
.slide-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; border-bottom: 2px solid var(--store-accent); padding-bottom: 2px; color: #FFFFFF; }
.hero-dots { position: absolute; z-index: 4; bottom: 64px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .6); transition: width .25s, background .25s; }
.hero-dots button[aria-current="true"] { width: 26px; background: #FFFFFF; }
.hero-dots:empty { display: none; }
/* صندوق البحث فوق العنوان */
.hero-over { position: absolute; z-index: 4; top: 148px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.hero-over > * { pointer-events: auto; }
.hero-search {
	width: min(860px, 100%); background: var(--white); color: var(--store-text); border-radius: 999px;
	box-shadow: 0 18px 44px rgba(5, 7, 60, .22); padding: 8px; padding-inline-start: 14px; display: flex; align-items: center; gap: 4px;
}
.hs-field { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-inline-end: 1px solid var(--line); }
.hs-field:nth-child(3) { border-inline-end: 0; }
.hs-ico { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.hs-ico .icon { width: 18px; height: 18px; }
.hs-field label { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.hs-field input, .hs-field select { width: 100%; border: 0; background: transparent; padding: 2px 0; font-size: 13.5px; color: var(--muted); outline: none; appearance: none; }
.hs-field select { cursor: pointer; }
.hs-field .grow { min-width: 0; flex: 1; }
.hero-fallback { display: none; }
/* إن أخفى الناشر السلايدر: يبقى البحث على شريطٍ نيليّ فاتح */
.hero-top:not(:has(.hero)) { background: var(--soft-2); padding: 64px 0 96px; }
.hero-top:not(:has(.hero)) .hero-over { position: static; }
.hero-top:not(:has(.hero)) .hero-fallback { display: block; text-align: center; margin-bottom: 26px; }
.hero-top:not(:has(.hero)) .hero-fallback h1,
.hero-top:not(:has(.hero)) .hero-fallback h2 { font-size: clamp(30px, 4vw, 50px); font-weight: 800; }
.hero-top:not(:has(.hero)) .hero-fallback p { color: var(--muted); margin-top: 6px; }

/* ---------------------------------------------------------------- عروضٌ خاصّة */
.offers { padding-top: 40px; }
.offer-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--gap); }
.offer { position: relative; display: block; aspect-ratio: 2 / 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--store-primary-dark); }
.offer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.offer:hover img { transform: scale(1.04); }
.offer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(5, 7, 60, .66) 0%, rgba(5, 7, 60, .35) 45%, rgba(5, 7, 60, 0) 72%); }
[dir="ltr"] .offer::after { background: linear-gradient(to right, rgba(5, 7, 60, .66) 0%, rgba(5, 7, 60, .35) 45%, rgba(5, 7, 60, 0) 72%); }
.offer-body { position: absolute; z-index: 1; inset-block: 0; inset-inline-start: 0; width: 64%; padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; gap: 6px; color: #FFFFFF; }
.offer-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.offer-kicker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--store-accent); }
.offer-title { font-size: clamp(18px, 1.6vw, 22px); font-weight: 800; line-height: 1.3; }
.offer-text { font-size: 13.5px; line-height: 1.5; }

/* ---------------------------------------------------------------- المسارات الأفقيّة */
.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-bottom: 6px; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.track-arrow {
	position: absolute; top: 33%; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0;
	background: var(--white); color: var(--store-text); box-shadow: var(--shadow-sm); display: grid; place-items: center;
}
.track-arrow .icon { width: 18px; height: 18px; }
.track-arrow:hover { background: var(--store-primary); color: var(--on-primary); }
.track-arrow[data-dir="prev"] { inset-inline-start: -20px; }
.track-arrow[data-dir="next"] { inset-inline-end: -20px; }
.track-arrow[disabled] { opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- بطاقة الكتاب «البسيطة» */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 34px var(--gap); }
.bcard { position: relative; display: flex; flex-direction: column; background: transparent; }
.track .bcard { flex: 0 0 calc((100% - (var(--per-row) - 1) * var(--gap)) / var(--per-row)); }
.bcard-media { position: relative; }
.bcard-cover { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 2 / 3; background: var(--soft-2); }
.bcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.bcard:hover .bcard-cover img { transform: scale(1.05); }
.bcard .type-dot { position: absolute; top: 10px; inset-inline-start: 10px; }
.bcard-badges { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bcard .heart {
	position: absolute; bottom: -17px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; z-index: 2;
	background: var(--white); color: var(--store-text); box-shadow: 0 3px 10px rgba(5, 7, 60, .16); display: grid; place-items: center;
}
.bcard .heart .icon { width: 16px; height: 16px; }
/* النظرة السريعة: تطفو بجانب المفضّلة، تظهر عند التحويم في الحاسوب ودائمًا في اللمس، ولا تحجز مكانًا */
.bcard .qv {
	position: absolute; bottom: -17px; inset-inline-end: 52px; width: 34px; height: 34px; border-radius: 50%; border: 0; z-index: 2;
	background: var(--store-primary); color: var(--on-primary); box-shadow: 0 3px 10px rgba(5, 7, 60, .16); display: grid; place-items: center;
	transition: opacity .2s, transform .2s;
}
.bcard .qv .icon { width: 17px; height: 17px; }
.bcard .qv:hover { background: var(--store-primary-dark); }
@media (hover: hover) {
	.bcard .qv { opacity: 0; transform: translateY(6px); }
	.bcard:hover .qv, .bcard .qv:focus-visible { opacity: 1; transform: none; }
}
.bcard .heart[aria-pressed="true"] { color: var(--store-primary); }
.bcard .heart[aria-pressed="true"] .icon { fill: currentColor; }
.stock-band { position: absolute; inset-inline: 0; bottom: 34%; background: rgba(5, 7, 60, .86); color: #FFFFFF; text-align: center; font-weight: 700; font-size: 14px; padding: 6px 0; }
.bcard.is-out .bcard-cover img { filter: grayscale(.7); opacity: .8; }
.bcard-body { padding: 14px 2px 0; 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 { color: var(--store-primary); }
.bcard-foot { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.add-link { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 4px 0; font-weight: 700; font-size: 14px; color: var(--store-primary); white-space: nowrap; }
.add-link .icon { width: 17px; height: 17px; }
.add-link:hover { color: var(--store-primary-dark); text-decoration: underline; text-underline-offset: 4px; }
.add-link[disabled] { color: var(--muted); cursor: not-allowed; text-decoration: none; }
/* شكل البطاقة */
body[data-card-style="framed"] .bcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--white); }
body[data-card-style="framed"] .bcard-cover { border-radius: 8px; }
body[data-card-style="soft"] .bcard { border-radius: var(--radius); padding: 10px; background: var(--white); box-shadow: var(--shadow-sm); }
body[data-card-style="soft"] .bcard-cover { border-radius: 8px; }
/* البطاقة الأفقيّة (عرض القائمة في صفحة التصنيف) */
.listing .book-grid.is-list { grid-template-columns: 1fr; gap: 26px; }
.is-list .bcard { flex-direction: row; gap: 22px; align-items: stretch; }
.is-list .bcard-media { width: 150px; flex: none; }
.is-list .bcard-body { padding-top: 4px; }
.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; }

/* ---------------------------------------------------------------- التصنيفات الطويلة */
.cat-tall { flex: 0 0 calc((100% - 5 * var(--gap)) / 6); min-width: 150px; }
.cat-tall .ct-img { display: block; aspect-ratio: 320 / 420; border-radius: var(--radius-lg); overflow: hidden; background: var(--soft-2); }
.cat-tall img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.cat-tall:hover img { transform: scale(1.05); }
.cat-tall h3 { font-size: 16.5px; font-weight: 700; margin-top: 12px; }
.cat-tall p { font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- تسوّق حسب النوع */
.type-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.type-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.type-card .tc-img { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; border-radius: var(--radius-lg); background: var(--white); margin-bottom: 38px; }
.type-card .tc-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); transition: transform .4s; }
.type-card:hover .tc-img img { transform: translateY(-3px); }
.type-card .type-dot-xl { position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%); }
.type-card h3 { font-size: 17px; font-weight: 700; }
.type-card p { font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- البانر العريض */
.wide-wrap { padding-block: 0; }
.wide { --panel: var(--lav); position: relative; display: grid; grid-template-columns: 1.4fr 1fr; min-height: 260px; border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); }
.wide-beige { --panel: var(--beige); }
.wide-text { padding: 40px 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; }
.wide-text h2 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 800; line-height: 1.3; max-width: 560px; }
.wide-text p { color: var(--store-text); font-size: 15.5px; max-width: 520px; }
.wide-text .btn { margin-top: 8px; }
.wide-media { position: relative; min-height: 220px; }
.wide-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- شاهدتَه مؤخّرًا */
.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: 10px; border-radius: var(--radius); background: var(--soft); }
.mini-card .mc-cover { position: relative; display: block; width: 66px; flex: none; border-radius: 8px; overflow: hidden; aspect-ratio: 2 / 3; }
.mini-card 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; }
.mini-card h3 { font-size: 15px; font-weight: 500; line-height: 1.4; margin-bottom: 2px; }
.mini-card .price { font-size: 14.5px; }

/* ---------------------------------------------------------------- لماذا نحن (شريط الثقة المدمج) */
.why-bar { padding-block: 22px 26px; }
.why-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.why-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--soft); }
.why-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--white); color: var(--store-accent); display: grid; place-items: center; flex: none; box-shadow: 0 3px 10px rgba(5, 7, 60, .06); }
.why-ico .icon { width: 24px; height: 24px; stroke-width: 1.6; }
.why-item b { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.why-item small { display: block; color: var(--muted); font-size: 13.5px; }
body[data-show-trust-bar="false"] .why { display: none; }

/* ---------------------------------------------------------------- آراء القرّاء */
.rv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.rv-item { position: relative; background: var(--white); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 2px 10px rgba(5, 7, 60, .04); }
.rv-q { position: absolute; top: 22px; inset-inline-end: 22px; color: var(--lav); }
.rv-q .icon { width: 34px; height: 34px; }
.rv-item blockquote { margin: 0; font-size: 15.5px; line-height: 1.85; flex: 1; }
.rv-who { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.rv-av { width: 44px; height: 44px; 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-who small { color: var(--muted); font-size: 13.5px; }
body[data-show-reviews="false"] .reviews,
body[data-show-reviews="false"] .pdp-reviews,
body[data-show-reviews="false"] .tab-reviews { display: none; }

/* ---------------------------------------------------------------- المؤلّفون */
.author-card { flex: 0 0 calc((100% - 4 * var(--gap)) / 5); min-width: 150px; }
.author-card .ac-img { display: block; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; }
.author-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.author-card:hover img { transform: scale(1.05); }
.author-card h3 { font-size: 16.5px; font-weight: 700; margin-top: 12px; }
.author-card p { font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- التذييل النيليّ */
.site-footer { background: var(--store-primary-dark); color: #FFFFFF; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 34px 0 28px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.foot-call { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 500; flex-wrap: wrap; }
.foot-call .icon { width: 34px; height: 34px; stroke-width: 1.4; }
.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: rgba(255, 255, 255, .14); }
.foot-social .icon { width: 18px; height: 18px; }
.foot-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 36px; padding: 36px 0 30px; }
.foot-cols h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.foot-cols li { margin-bottom: 10px; 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: 999px; display: flex; align-items: center; padding: 5px; }
.fnf input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; padding: 0 14px; outline: none; color: var(--store-text); }
.fnf input::placeholder { color: var(--muted); }
.fnf button { border: 0; border-radius: 999px; background: var(--store-primary); color: var(--on-primary); font-weight: 700; padding: 0 20px; height: 44px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; padding: 18px 0 22px; border-top: 1px solid rgba(255, 255, 255, .2); }
.to-top {
	position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 30; width: 46px; height: 46px; border-radius: 50%;
	background: var(--store-primary); border: 0; box-shadow: var(--shadow); color: var(--on-primary); display: grid; place-items: center;
	opacity: 0; visibility: hidden; transition: .25s;
}
.to-top.show { opacity: 1; visibility: visible; }

/* ---------------------------------------------------------------- الصفحات الداخليّة */
.page-head { padding-block: 24px 10px; }
.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); }
.page-title { font-size: clamp(28px, 3vw, 38px); font-weight: 800; margin-top: 10px; }
.page-sub { color: var(--muted); margin-top: 2px; }

/* رأس التصنيف بالحافّة الممزّقة */
.cat-band { position: relative; background: var(--soft-2); padding: 26px 0 70px; }
.strip { margin-top: 26px; }
.cat-circle { flex: 0 0 auto; width: 112px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.cat-circle .cc-img { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--white); margin-bottom: 8px; transition: box-shadow .2s; }
.cat-circle:hover .cc-img { box-shadow: 0 0 0 4px var(--store-primary); }
.cat-circle img { width: 100%; height: 100%; object-fit: cover; }
.cc-name { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.cc-count { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- صفحة التصنيف */
.listing { display: grid; grid-template-columns: 280px 1fr; gap: 34px; align-items: start; padding-block: 20px 70px; }
.filters { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); }
.filters-head { display: flex; justify-content: space-between; align-items: center; background: var(--store-primary); color: var(--on-primary); padding: 14px 20px; }
.filters-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.filters-head .hdr-icon { display: none; }
.f-group { padding: 18px 20px; border-top: 1px solid var(--line); }
.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-primary); 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(--store-primary); 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(--store-primary); 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: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; }
.view-btn[aria-pressed="true"] { background: var(--store-primary); color: var(--on-primary); border-color: var(--store-primary); }
.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: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; font-weight: 500; padding: 0 6px; }
.pagination a:hover { background: var(--soft-2); }
.pagination [aria-current="page"] { background: var(--store-primary); color: var(--on-primary); font-weight: 700; }
.pagination .pg-arrow { border: 1px solid var(--line); }

/* ---------------------------------------------------------------- صفحة الكتاب */
.pdp-crumbs { padding-block: 22px 18px; }
.pdp { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 36px; }
.gallery { position: sticky; top: calc(var(--hdr-h) + 20px); }
.g-main { position: relative; border-radius: var(--radius-lg); background: var(--soft-2); display: grid; place-items: center; padding: 48px 34px; }
.g-main img { width: 100%; max-width: 290px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 22px 44px rgba(5, 7, 60, .24); }
.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 .disc-dot { position: absolute; top: 22px; inset-inline-end: calc(50% - 175px); z-index: 2; }
.g-thumbs { display: flex; gap: 12px; margin-top: 14px; }
.g-thumb { width: 74px; padding: 6px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--white); }
.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: 16px; }
.pdp-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pdp-title-row { display: flex; align-items: center; gap: 18px; }
.pdp-title-row .type-dot-xl { box-shadow: 0 8px 18px rgba(5, 7, 60, .16); }
.pdp-title { font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.2; }
.pdp-by { color: var(--muted); margin-top: 4px; }
.pdp-by a { color: var(--store-text); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.pdp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14.5px; color: #1F6B47; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.price-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 4px; }
.pdp-lead { color: #34364A; max-width: 640px; }
.bb-type { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; padding: 8px 16px 8px 8px; padding-inline: 8px 16px; border-radius: 999px; background: var(--soft); font-size: 14.5px; }
.bb-type .type-dot { width: 28px; height: 28px; box-shadow: none; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-block: 18px; border-block: 1px solid var(--line); }
.fact { display: flex; gap: 10px; align-items: center; }
.fact .f-ico { width: 44px; height: 44px; border-radius: 50%; background: var(--soft-2); color: var(--store-primary-dark); display: grid; place-items: center; flex: none; }
.fact small { display: block; color: var(--muted); font-size: 13px; }
.fact b { font-weight: 700; font-size: 14.5px; }
.bb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bb-actions .icon-btn { width: 52px; height: 52px; }
.perks { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; color: var(--muted); }
.perks li { display: flex; gap: 8px; align-items: center; }
.perks .icon { color: var(--store-primary); width: 18px; height: 18px; }
.sample-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; padding-inline: 10px 14px; border-radius: 999px; background: var(--soft-2); max-width: 640px; }
.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: color-mix(in srgb, var(--store-primary) 55%, #FFFFFF); border-radius: 2px; }
.sample-bar small { color: var(--muted); font-size: 13px; }

/* شريط الشحن بالحافّة الممزّقة */
.ship-strip { --panel: var(--lav); position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; border-radius: var(--radius-lg); background: var(--panel); padding: 22px 30px; padding-inline-end: 34%; }
.ship-strip::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 30%; background: var(--store-primary-dark) url("assets/ship.jpg") center / cover; }
.ship-strip .torn-side { inset-inline-start: auto; inset-inline-end: calc(30% - 23px); z-index: 2; transform: none; }
[dir="ltr"] .ship-strip .torn-side { transform: scaleX(-1); }
.ship-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--white); color: var(--store-primary-dark); display: grid; place-items: center; flex: none; }
.ship-ico .icon { width: 26px; height: 26px; }
.ship-strip b { font-size: 17px; }
.ship-strip p { font-size: 14.5px; }

/* التبويبات */
.pdp-tabs { padding-block: 40px 10px; }
.tab-list { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; border: 0; background: none; padding: 12px 18px; font-weight: 700; font-size: 16px; color: var(--muted); white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--store-primary-dark); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--store-primary); }
.tab-panel { padding-top: 28px; }
.tab-panel[hidden] { display: none; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.prose { color: #2E3047; }
.prose p + p { margin-top: 12px; }
.tab-sub { font-size: 18px; margin-bottom: 14px; }
.chapters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.chapters li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.chapters li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--soft); }
.ch-n { width: 30px; height: 30px; border-radius: 50%; background: var(--store-primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; font-size: 13.5px; flex: none; }
.chapters b { display: block; font-weight: 700; font-size: 15px; }
.chapters p { color: var(--muted); font-size: 14px; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; max-width: 900px; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 700; text-align: end; }

/* الآراء في صفحة الكتاب */
.rv-summary { display: grid; grid-template-columns: 200px 1fr; gap: 30px; align-items: center; background: var(--soft); border-radius: var(--radius-lg); padding: 24px; max-width: 760px; }
.rv-score { text-align: center; }
.rv-score strong { display: block; font-size: 50px; 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: 64px 1fr 40px; gap: 12px; align-items: center; font-size: 14px; margin-bottom: 6px; }
.rv-bars .bar { height: 7px; border-radius: 9px; background: var(--white); overflow: hidden; }
.rv-bars .bar span { display: block; height: 100%; background: var(--store-primary); border-radius: 9px; }
.rv-items { margin-top: 26px; display: grid; gap: 22px; max-width: 900px; }
.rv-card { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.rv-card .rv-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.rv-card .rv-head small { color: var(--muted); }
.rv-card p { margin-top: 6px; color: #2E3047; }
.rv-form { margin-top: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: grid; gap: 12px; max-width: 900px; }
.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: #D9D9DE; }
.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); 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-primary); }
.rv-form .btn { justify-self: start; }

/* ---------------------------------------------------------------- صفحة المؤلّف */
.author-hero { grid-template-columns: 1fr 340px; min-height: 340px; }
.author-hero .eyebrow { color: var(--store-primary-dark); font-weight: 700; }
.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: 680px; color: var(--store-text); }
.author-hero .bio p + p { margin-top: 10px; }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start; padding-block: 14px 50px; }
.cart-cols, .cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 130px 110px 40px; gap: 16px; align-items: center; }
.cart-cols { padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 500; }
.cart-row { padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-book { display: flex; gap: 16px; align-items: center; min-width: 0; }
.cart-thumb { width: 76px; 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(--soft-2); 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); border-radius: var(--radius-lg); background: var(--soft-2); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.summary h2 { font-size: 20px; }
.sum-count { color: var(--muted); font-size: 14.5px; margin-top: -8px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; background: var(--white); }
.coupon .btn { min-height: 46px; padding: 0 18px; }
.coupon-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px dashed var(--store-primary); border-radius: 999px; padding: 4px 14px 4px 6px; padding-inline: 14px 6px; font-size: 13.5px; align-self: flex-start; }
.coupon-chip button { border: 0; background: var(--soft-2); 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 color-mix(in srgb, var(--store-primary) 20%, #FFFFFF); }
.sum-rows div { display: flex; justify-content: space-between; font-size: 15px; }
.sum-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; }
.secure { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); justify-content: center; }
.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty .icon { width: 60px; height: 60px; color: var(--store-primary); stroke-width: 1.2; }
.cart-empty h2 { margin: 12px 0 6px; }
.cart-empty p { color: var(--muted); margin-bottom: 18px; }

/* ---------------------------------------------------------------- 404 */
.nf-hero { position: relative; min-height: 640px; display: flex; align-items: center; overflow: hidden; background: var(--store-primary-dark); }
.nf-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nf-hero::before { content: ""; position: absolute; inset: 0; background: rgba(5, 7, 60, .35); z-index: 1; }
.nf-body { position: relative; z-index: 2; text-align: center; color: #FFFFFF; display: flex; flex-direction: column; align-items: center; padding-block: 120px 90px; }
.nf-code { font-size: clamp(110px, 16vw, 210px); font-weight: 800; line-height: .9; letter-spacing: .02em; text-shadow: 0 10px 40px rgba(5, 7, 60, .4); }
.nf-body h1 { font-size: clamp(24px, 2.6vw, 34px); margin-top: 10px; }
.nf-body > p { margin-top: 8px; max-width: 540px; }
.nf-search { display: flex; align-items: center; gap: 6px; margin-top: 24px; width: min(560px, 100%); background: var(--white); border-radius: 999px; padding: 6px; padding-inline-start: 20px; box-shadow: 0 18px 44px rgba(5, 7, 60, .25); }
.nf-search input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; outline: none; color: var(--store-text); }
.nf-search .hs-go { width: 48px; height: 48px; }
.nf-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.nf-actions .btn-white { border-radius: 999px; }

/* ---------------------------------------------------------------- صفحة المكوّنات */
.kit-sec { padding: 36px 0; border-bottom: 1px solid var(--line); }
.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-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); max-width: 1000px; }
.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-cats { align-items: flex-start; gap: 30px; }
.kit-cats .cat-tall { flex: 0 0 200px; }
.kit-cats .type-card { width: 260px; }
.kit-hero { margin-top: 4px; }

/* ---------------------------------------------------------------- الحركة */
@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(5) { display: none; }
	.hdr { gap: 14px; }
}
@media (max-width: 1100px) {
	body { --per-row: 4; }
	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(6) { display: none; }
	.cat-tall { flex-basis: calc((100% - 3 * var(--gap)) / 4); }
	.author-card { flex-basis: calc((100% - 3 * var(--gap)) / 4); }
	.offer-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
	.offer-grid::-webkit-scrollbar { display: none; }
	.offer { flex: 0 0 min(440px, 78%); scroll-snap-align: start; }
	.listing { grid-template-columns: 250px 1fr; gap: 26px; }
	.listing .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.foot-cols { grid-template-columns: 1fr 1fr; }
	.pdp { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; }
	.facts { 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: 26px; }
	.cart-cols, .cart-row { grid-template-columns: minmax(0, 1fr) 100px 120px 96px 38px; gap: 12px; }
}
@media (max-width: 900px) {
	:root { --hdr-h: 66px; }
	.hdr-nav, .hdr-actions .hide-md, .cart-pill .label { display: none; }
	.menu-btn, .search-toggle { display: inline-grid; }
	.hdr { gap: 4px; }
	.brand img { width: 34px; height: 34px; }
	.brand-name { font-size: 18px; }
	.cart-pill { height: 40px; padding-inline: 10px 6px; gap: 6px; }
	.hero { height: 620px; }
	.hero-over { top: 118px; }
	.slide-body { top: 236px; }
	.type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
	.wide { grid-template-columns: 1fr; }
	.wide-media { min-height: 200px; order: -1; aspect-ratio: 2 / 1; }
	.wide .torn-side { display: none; }
	.wide-media::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 0; }
	.wide-text { padding: 28px 24px 32px; }
	.rv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rv-item:nth-child(n+3) { display: none; }
	.author-card { flex-basis: calc((100% - 2 * var(--gap)) / 3); }
	.cat-tall { flex-basis: calc((100% - 2 * var(--gap)) / 3); }
	.pdp { grid-template-columns: 1fr; }
	.gallery { position: static; }
	.about-grid { grid-template-columns: 1fr; gap: 28px; }
	.chapters { grid-template-columns: 1fr; }
	.spec { 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; }
	.ah-photo { aspect-ratio: auto; height: 260px; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.track-arrow { display: none; }
}
@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; }
	.section { padding-block: 42px; }
	.hero { height: 600px; }
	.hero-over { top: 92px; }
	.slide-body { top: 196px; }
	.hero-search { padding: 6px; padding-inline-start: 12px; }
	.hs-field:not(:first-child) { display: none; }
	.hs-field { border-inline-end: 0; padding: 4px; }
	.hs-ico { display: none; }
	.hs-go { width: 48px; height: 48px; }
	.hero-dots { bottom: 54px; }
	.hero-top:not(:has(.hero)) { padding: 40px 0 70px; }
	.track { --gap: 14px; }
	.track .bcard { flex-basis: calc((100% - var(--gap)) / 2.15); }
	.book-grid { --gap: 14px; row-gap: 28px; }
	.bcard-title { font-size: 15px; }
	.price { font-size: 15px; }
	.price-lg { font-size: 26px; }
	.cat-tall { flex-basis: calc((100% - var(--gap)) / 2.3); min-width: 0; }
	.author-card { flex-basis: calc((100% - var(--gap)) / 2.3); min-width: 0; }
	.offer { flex-basis: 86%; }
	.offer-body { width: 78%; padding: 18px; }
	.type-grid { --gap: 14px; }
	.type-card .type-dot-xl { width: 48px; height: 48px; bottom: -24px; }
	.type-card .tc-img { margin-bottom: 32px; }
	.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; }
	.is-list .bcard { gap: 14px; }
	.toolbar .count-text { order: 3; width: 100%; }
	.select { min-width: 0; }
	.cat-band { padding-bottom: 56px; }
	.foot-cols { grid-template-columns: 1fr; gap: 26px; }
	.foot-call { font-size: 16px; }
	.g-main { padding: 34px 20px; }
	.g-main img { max-width: 220px; }
	.g-main .disc-dot { inset-inline-end: 16px; top: auto; bottom: 16px; }
	.pdp-title-row { gap: 12px; align-items: flex-start; }
	.pdp-title-row .type-dot-xl { width: 46px; height: 46px; }
	.pdp-title-row .type-dot-xl .icon { width: 22px; height: 22px; }
	.bb-actions .btn { flex: 1 1 auto; }
	.ship-strip { padding: 20px; padding-inline-end: 20px; flex-direction: column; align-items: flex-start; }
	.ship-strip::after, .ship-strip .torn-side { display: none; }
	.rv-summary { grid-template-columns: 1fr; }
	.cart-cols { display: none; }
	.cart-row { position: relative; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "b b" "q t"; gap: 12px; }
	.cart-book { grid-area: b; padding-inline-end: 40px; }
	.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: 16px; inset-inline-end: -6px; }
	.nf-hero { min-height: 560px; }
	.nf-body { padding-block: 100px 70px; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kit-cats .cat-tall { flex-basis: 150px; }
	.sec-head { align-items: center; }
	.to-top { bottom: 16px; inset-inline-end: 16px; }
}
@media (max-width: 480px) {
	.hdr-actions { gap: 0; }
	.hdr-actions .hide-sm { display: none; }
	.fact { flex-direction: column; align-items: flex-start; gap: 6px; }
	.wide-text h2 { font-size: 21px; }
}

/* ---------------------------------------------------------------- ميزات المنصّة */
/* المدوّنة: بطاقة المقال كبطاقة الكتاب البسيطة، صورةٌ مستديرة الزوايا بلا إطار */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.post-card { display: flex; flex-direction: column; gap: 6px; }
.post-card .pc-img { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--soft-2); margin-bottom: 8px; }
.post-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover img { transform: scale(1.04); }
.pc-date, .post-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.pc-title { font-size: 17px; font-weight: 700; line-height: 1.45; transition: color .2s; }
.post-card:hover .pc-title { color: var(--store-primary); }
.pc-excerpt { font-size: 14.5px; color: var(--muted); }
.blog-band, .post-band { padding-bottom: 64px; }
.blog-grid { row-gap: 38px; }
.blog-list .pagination { margin-top: 40px; }
.post-band .page-title { max-width: 900px; }
.post-band .post-meta { margin-top: 10px; font-size: 14.5px; }
.post { max-width: 980px; }
.post-hero { margin: 26px 0 0; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: var(--soft-2); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-body { max-width: 760px; margin: 34px auto 0; font-size: 17px; line-height: 2; color: #34364A; }
.post-body p + p { margin-top: 18px; }
.post-back { display: flex; width: max-content; margin: 34px auto 10px; }

/* تطبيق المتجر في التذييل */
.foot-apps { margin-top: 24px; }
.foot-apps h3 { margin-bottom: 12px; }
.app-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.app-badge { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); transition: background .2s; }
.app-badge:hover { background: rgba(255, 255, 255, .2); }
.app-badge .icon { width: 24px; height: 24px; }
.app-badge span { display: flex; flex-direction: column; line-height: 1.2; }
.app-badge small { font-size: 11.5px; }
.app-badge b { font-size: 15px; font-weight: 700; direction: ltr; text-align: start; }

/* الكمّيّة قبل الإضافة إلى السلّة */
.qty-lg { height: 52px; }
.qty-lg button { height: 50px; width: 42px; }

@media (max-width: 767px) {
	.post-grid { grid-template-columns: 1fr; row-gap: 28px; }
	.post-body { font-size: 16px; margin-top: 26px; }
	.blog-band, .post-band { padding-bottom: 54px; }
}

/* ---------------------------------------------------------------- تبويبات صفّ الكتب (القاعدة 16) */
.sec-head.has-tabs { flex-wrap: wrap; align-items: center; }
.sec-head.has-tabs > div:first-child { margin-inline-end: auto; }
.row-tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--soft-2); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.row-tabs::-webkit-scrollbar { display: none; }
.row-tab { flex: none; height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 14.5px; color: var(--store-text); white-space: nowrap; }
.row-tab:hover { background: var(--white); }
.row-tab[aria-selected="true"] { background: var(--store-primary); color: var(--on-primary); }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }
/* شبكة صفّين: لا صفّ نصف فارغ أيًّا كان عدد الكتب في الصفّ */
body[data-books-per-row="4"] .row-grid > :nth-child(n+9),
body[data-books-per-row="5"] .row-grid > :nth-child(n+11),
body[data-books-per-row="6"] .row-grid > :nth-child(n+13) { display: none; }

/* ---------------------------------------------------------------- عرض الأسبوع بعدّاد */
.deal { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--store-primary-dark); color: #FFFFFF; padding: 34px 44px 40px; }
.deal::before, .deal::after { content: ""; position: absolute; border-radius: 50%; border: 1.5px solid color-mix(in srgb, #FFFFFF 16%, transparent); pointer-events: none; }
.deal::before { width: 520px; height: 520px; inset-inline-end: -160px; bottom: -300px; }
.deal::after { width: 760px; height: 760px; inset-inline-end: -280px; bottom: -420px; }
.deal-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 26px; }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #FFFFFF; }
.deal-kicker .icon { width: 18px; height: 18px; color: var(--store-accent); fill: var(--store-accent); }
.deal .sec-title { color: #FFFFFF; }
.countdown { display: flex; align-items: center; gap: 10px; }
.countdown[hidden] { display: none; }
.cd-label { font-size: 14px; font-weight: 500; margin-inline-end: 4px; }
.cd-unit { width: 66px; height: 66px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, #FFFFFF 40%, var(--store-primary-dark)); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.cd-unit b { font-size: 21px; font-weight: 800; }
.cd-unit small { font-size: 12px; }
.deal-book { position: relative; z-index: 1; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 48px; align-items: center; }
.deal-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.deal-media::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--store-primary) 35%, #FFFFFF), color-mix(in srgb, var(--store-primary) 70%, #FFFFFF)); }
.deal-media::after { content: ""; position: absolute; inset: 44% -6%; border-radius: 50%; border: 3px solid var(--store-accent); transform: rotate(-12deg); }
.deal-cover { position: relative; z-index: 1; width: 52%; border-radius: 8px; overflow: hidden; box-shadow: 0 22px 40px rgba(5, 7, 60, .38); transform: rotate(-4deg); transition: transform .3s; }
.deal-cover:hover { transform: rotate(0); }
.deal-cover img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.deal-media .type-dot { position: absolute; z-index: 2; top: 10%; inset-inline-start: 12%; width: 40px; height: 40px; }
.deal-media .type-dot .icon { width: 20px; height: 20px; }
.deal-media .disc-dot { position: absolute; z-index: 2; bottom: 8%; inset-inline-end: 8%; background: var(--white); color: var(--store-primary-dark); }
.deal-body { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.deal-body .bcard-author { color: #FFFFFF; font-size: 15px; }
.deal-title { font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; }
.deal-title a:hover { text-decoration: underline; text-underline-offset: 6px; }
.deal .rating { color: #FFFFFF; }
.deal-desc { max-width: 640px; font-size: 15.5px; color: #FFFFFF; }
.deal-desc p + p { margin-top: 8px; }
.deal-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.deal-pills .pill { background: color-mix(in srgb, #FFFFFF 14%, var(--store-primary-dark)); color: #FFFFFF; }
.deal-buy { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.deal .price { color: #FFFFFF; }
.deal .price del { color: #FFFFFF; opacity: 1; }
.deal-heart { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, #FFFFFF 50%, var(--store-primary-dark)); background: transparent; color: #FFFFFF; display: grid; place-items: center; }
.deal-heart:hover { background: color-mix(in srgb, #FFFFFF 12%, var(--store-primary-dark)); }
.deal-heart[aria-pressed="true"] .icon { fill: currentColor; }

/* ---------------------------------------------------------------- اختيار الصيغة في صفحة الكتاب */
.formats-box { display: flex; flex-direction: column; gap: 8px; }
.formats-label { font-size: 14px; font-weight: 700; color: var(--muted); }
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format-opt { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 18px 6px 8px; padding-inline: 8px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); transition: border-color .2s, background .2s; }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt.is-current { border-color: var(--store-primary); background: var(--soft); }
.format-opt .type-dot { width: 34px; height: 34px; box-shadow: none; }
.format-opt span:not(.type-dot) { display: flex; flex-direction: column; line-height: 1.25; }
.format-opt b { font-size: 14.5px; }
.format-opt small { font-size: 13px; color: var(--muted); font-weight: 700; }

/* عن المؤلّف تحت النبذة */
.author-mini { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px; border-radius: var(--radius-lg); background: var(--soft); max-width: 640px; }
.author-mini img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.author-mini .am-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--white); color: #986AB0; display: grid; place-items: center; flex: none; }
.author-mini .am-ico .icon { width: 28px; height: 28px; }
.author-mini small { display: block; color: var(--muted); font-size: 13px; }
.author-mini b { font-size: 16px; }
.author-mini p { color: var(--muted); font-size: 14px; }
.author-mini .see-all { margin-inline-start: auto; }

/* التصفية الحاليّة في صفحة التصنيف */
.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: 0 12px 0 8px; padding-inline: 14px 8px; border-radius: 999px; background: var(--soft-2); font-size: 14px; font-weight: 500; }
.chip .icon { width: 15px; height: 15px; padding: 2px; border-radius: 50%; background: var(--white); box-sizing: content-box; }
.chip:hover { background: var(--lav); }
.clear-all { font-size: 14px; font-weight: 700; color: var(--store-primary-dark); text-decoration: underline; text-underline-offset: 4px; padding: 6px; }

@media (max-width: 1100px) {
	.row-grid > :nth-child(n+9) { display: none; }
	.why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.deal-book { grid-template-columns: 280px minmax(0, 1fr); gap: 32px; }
	.deal { padding: 30px 30px 34px; }
}
@media (max-width: 767px) {
	.row-grid > :nth-child(n+7) { display: none; }
	.rv-grid { grid-template-columns: 1fr; }
	.why-bar { padding-block: 14px 18px; }
	.why-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 10px; margin-inline: -20px; padding-inline: 20px; }
	.why-list::-webkit-scrollbar { display: none; }
	.why-item { flex: 0 0 72%; scroll-snap-align: start; padding: 10px 12px; gap: 10px; }
	.why-ico { width: 40px; height: 40px; }
	.why-ico .icon { width: 20px; height: 20px; }
	.why-item b { font-size: 14.5px; }
	.why-item small { font-size: 13px; }
	.sec-head.has-tabs .see-all { order: 2; }
	.row-tabs { order: 3; width: 100%; }
	.deal { padding: 22px 18px 26px; }
	.deal-head { margin-bottom: 18px; }
	.countdown { gap: 6px; width: 100%; }
	.cd-label { flex: 1; font-size: 13.5px; }
	.cd-unit { width: 56px; height: 56px; }
	.cd-unit b { font-size: 18px; }
	.cd-unit small { font-size: 11.5px; }
	.deal-book { grid-template-columns: 1fr; gap: 20px; }
	.deal-media { width: min(260px, 80%); margin-inline: auto; }
	.deal-desc p + p { display: none; }
	.deal-buy .btn { flex: 1 1 auto; }
	.bcard-foot { flex-wrap: nowrap; row-gap: 0; }
	.bcard-foot .price { flex-direction: column; gap: 0; min-width: 0; line-height: 1.3; }
	.add-link { font-size: 13.5px; gap: 3px; }
	.author-mini .see-all { display: none; }
	.active-filters { margin-top: -6px; }
}

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