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

:root {
	/* ألوان الهويّة (قيم تجريبيّة) */
	--store-primary: #FC9231;
	--store-primary-dark: #D9731A;
	--store-accent: #222934;
	--store-bg: #FFFFFF;
	--store-text: #181D25;

	/* محايدات */
	--panel: #F5F7FA;
	--panel-2: #EEF1F6;
	--line: #E0E5EB;
	--muted: #4E5562;
	--white: #FFFFFF;
	--star: #F2A516;
	--ok: #2B7A4B;

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

	/* لوح الآراء المتدرّج: يتبع لون الناشر */
	--warm-a: color-mix(in srgb, var(--store-primary) 16%, #FBF0D2);
	--warm-b: color-mix(in srgb, var(--store-primary) 10%, #FCCAC5);

	--r-card: 16px;
	--r-panel: 28px;
	--r-hero: 48px;
	--shadow-float: 0 10px 34px rgba(24, 29, 37, .10), 0 1px 0 rgba(24, 29, 37, .04);
	--shadow-cover: 0 14px 30px rgba(24, 29, 37, .22);
	--per-row: 4;
	--header-h: 74px;
	--font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body[data-books-per-row="3"] { --per-row: 3; }
body[data-books-per-row="4"] { --per-row: 4; }
body[data-books-per-row="5"] { --per-row: 5; }

/* ---------------------------------------------------------------- الأساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--store-bg);
	color: var(--store-text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.7;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--store-accent); outline-offset: 2px; }
.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-arrow { width: 18px; height: 18px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; top: -60px; inset-inline-start: 16px; z-index: 100; background: var(--store-accent); color: var(--white); padding: 10px 18px; border-radius: 999px; }
.skip-link:focus { top: 12px; }
[data-option]:empty { display: none; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1288px; margin-inline: auto; padding-inline: 24px; }
.section { padding: 60px 0; }
.section-tight { padding: 36px 0; }
.section-flush { padding-top: 0; }

/* ---------------------------------------------------------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 24px; border-radius: 999px;
	border: 1px solid transparent; font-weight: 700; font-size: 15px; line-height: 1;
	cursor: pointer; white-space: nowrap; transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--store-primary); color: var(--store-accent); }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-dark { background: var(--store-accent); color: var(--white); }
.btn-dark:hover { background: color-mix(in srgb, var(--store-accent) 82%, #000); }
.btn-outline { background: var(--white); color: var(--store-accent); border-color: var(--store-accent); }
.btn-outline:hover { background: var(--store-accent); color: var(--white); }
.btn-soft { background: var(--panel-2); color: var(--store-text); }
.btn-soft:hover { background: var(--line); }
.btn-light { background: var(--white); color: var(--store-text); }
.btn-ghost { background: var(--white); color: var(--store-text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--store-accent); }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 16px; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { background: var(--panel-2); color: var(--muted); cursor: not-allowed; }
.icon-btn {
	display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
	border: 0; background: transparent; color: var(--store-text); cursor: pointer; transition: background-color .2s;
}
.icon-btn:hover { background: var(--panel-2); }
.icon-btn-lg { width: 54px; height: 54px; border: 1px solid var(--line); }
.icon-btn[aria-pressed="true"] .icon, .wish-btn[aria-pressed="true"] .icon { fill: currentColor; color: #C2410C; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; border-bottom: 2px solid var(--store-primary); padding-bottom: 2px; }

/* الشارة الزجاجيّة */
.glass {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 10px 20px; border-radius: 999px;
	background: rgba(24, 29, 37, .72); color: var(--white);
	border: 1px solid rgba(255, 255, 255, .3);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	font-size: 15px; font-weight: 500; line-height: 1.4;
}
.glass b { font-weight: 800; }
.glass-btn { cursor: pointer; font-weight: 700; }
.glass-btn:hover { background: rgba(24, 29, 37, .86); }

/* ---------------------------------------------------------------- الرأس الكبسوليّ */
.site-header { position: sticky; top: 0; z-index: 50; padding: 12px 24px 0; pointer-events: none; }
.header-capsule {
	position: relative; pointer-events: auto;
	max-width: 1240px; margin-inline: auto; height: 62px;
	display: flex; align-items: center; gap: 12px; padding-inline: 10px;
	background: var(--white); border-radius: 999px; box-shadow: var(--shadow-float);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; white-space: nowrap; padding-inline-start: 6px; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav > ul { display: flex; list-style: none; gap: 2px; }
.main-nav > ul > li > a, .main-nav > ul > li > button {
	display: inline-flex; align-items: center; gap: 4px; padding: 9px 14px; border-radius: 999px;
	border: 0; background: none; font-weight: 500; font-size: 15px; cursor: pointer;
}
.main-nav > ul > li > a:hover, .main-nav > ul > li > button:hover { background: var(--panel); }
.main-nav .icon { width: 16px; height: 16px; }
.has-menu { position: relative; }
.nav-menu {
	position: absolute; top: calc(100% + 12px); inset-inline-start: 0; min-width: 220px;
	list-style: none; padding: 8px; background: var(--white); border-radius: 20px; box-shadow: var(--shadow-float);
	display: none;
}
.nav-menu::before { content: ""; position: absolute; inset-inline: 0; top: -14px; height: 14px; }
.has-menu:hover .nav-menu, .has-menu:focus-within .nav-menu, .has-menu.open .nav-menu { display: block; }
.nav-menu a { display: block; padding: 9px 14px; border-radius: 12px; }
.nav-menu a:hover { background: var(--panel); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.main-nav + .header-actions { margin-inline-start: 0; }
.cart-capsule {
	display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 18px;
	border-radius: 999px; background: var(--store-primary); color: var(--store-accent); font-weight: 700; white-space: nowrap;
}
.cart-capsule:hover { background: var(--store-primary-dark); }
.menu-toggle { display: none; }
.search-panel {
	position: absolute; top: calc(100% + 10px); inset-inline: 0;
	display: none; gap: 8px; padding: 10px; background: var(--white); border-radius: 28px; box-shadow: var(--shadow-float);
}
.search-open .search-panel { display: flex; }
.search-panel input { flex: 1; min-width: 0; min-height: 46px; border: 0; border-radius: 999px; background: var(--panel); padding: 0 20px; }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(24, 29, 37, .45); opacity: 0; visibility: hidden; transition: opacity .25s; }
.drawer-open .drawer-backdrop, .filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 80; width: min(330px, 86vw);
	background: var(--white); padding: 18px; overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-nav { list-style: none; }
.drawer-nav > li > a, .drawer-sub > span { display: block; padding: 12px 14px; border-radius: 14px; font-weight: 700; }
.drawer-nav > li > a:hover { background: var(--panel); }
.drawer-sub ul { list-style: none; padding-inline-start: 14px; }
.drawer-sub li a { display: block; padding: 8px 14px; color: var(--muted); }
.drawer-phone { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 16px; border-radius: 999px; background: var(--panel); font-weight: 700; }

/* ---------------------------------------------------------------- الواجهة */
.hero-under { margin-top: calc(-1 * var(--header-h)); }
.hero { position: relative; }
.slider { position: relative; border-radius: 0 0 var(--r-hero) var(--r-hero); overflow: hidden; background: var(--store-accent); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; min-height: 640px; display: flex; align-items: flex-end; scroll-snap-align: start; }
.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(12, 16, 22, .62), rgba(12, 16, 22, .15) 55%, transparent), linear-gradient(to top, rgba(12, 16, 22, .45), transparent 45%); }
.slide-inner { position: relative; z-index: 1; width: 100%; max-width: 1288px; margin-inline: auto; padding: calc(var(--header-h) + 60px) 24px 84px; }
.slide-title { color: var(--white); font-size: clamp(42px, 7.4vw, 112px); font-weight: 800; line-height: 1.08; max-width: 9.5em; text-shadow: 0 4px 30px rgba(0, 0, 0, .25); }
.slide-inner .glass { margin: 22px 0 26px; }
.slider-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.slider-dots button { width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; transition: width .25s; }
.slider-dots button[aria-current="true"] { width: 30px; background: var(--white); }

/* شريط الثقة: شاراتٌ زجاجيّة. فوق حافّة الواجهة إن وُجدت، وإلّا صفٌّ تحت الرأس */
.trust { padding-top: 28px; }
.trust-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.trust .glass .icon { width: 18px; height: 18px; }
@media (min-width: 1025px) {
	.hero + .trust { position: relative; z-index: 3; margin-top: -196px; height: 196px; padding-top: 0; pointer-events: none; }
	.hero + .trust .trust-list { flex-direction: column; align-items: flex-end; padding-inline-end: 48px; }
	.hero + .trust .glass { pointer-events: auto; }
}

/* ---------------------------------------------------------------- عناوين الأقسام */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head.center { justify-content: center; text-align: center; }
.section-title { font-size: clamp(30px, 3.9vw, 54px); font-weight: 800; line-height: 1.15; }
.section-head.center .section-title { max-width: 18em; margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--store-primary); }
.section-head .eyebrow { display: flex; }

/* ---------------------------------------------------------------- النوع والتقييم والسعر والشارات */
.type-dot { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--white); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.type-dot .icon { width: 16px; height: 16px; }
.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-edu); }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars .icon { width: 15px; height: 15px; }
.stars .off { color: #D5DAE1; }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rating-lg .stars .icon { width: 20px; height: 20px; }
.rating-lg { font-size: 15px; }
.price { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 700; white-space: nowrap; color: var(--store-text); }
.price del { color: var(--muted); font-weight: 400; font-size: .86em; }
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.badge-sale { background: var(--store-primary); color: var(--store-accent); }
.badge-new { background: var(--store-accent); color: var(--white); }
.badge-out { background: var(--line); color: var(--muted); }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 36px 24px; }
.book-grid-wide { --per-row: 3; gap: 44px 32px; }
.book-card { position: relative; min-width: 0; }
.book-media { position: relative; background: var(--panel); border-radius: var(--r-card); padding: 13% 19% 15%; transition: background-color .25s; }
.book-card:hover .book-media { background: var(--panel-2); }
.book-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow-cover); transition: transform .3s; }
.book-card:hover .book-cover img { transform: translateY(-4px); }
.book-media > .type-dot { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; }
.book-badges { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.card-tools { position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 2; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.wish-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--white); color: var(--store-text); cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); transition: background-color .2s; }
.wish-btn:hover { background: var(--panel-2); }
.wish-btn .icon { width: 18px; height: 18px; }
.book-card:hover .card-tools, .book-card:focus-within .card-tools { opacity: 1; transform: none; }
@media (hover: none) { .card-tools { opacity: 1; transform: none; } }
.book-card.is-out .book-cover img { opacity: .45; filter: grayscale(.7); }
.book-card { display: flex; flex-direction: column; }
.book-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding-top: 14px; }
.book-title { font-size: 17px; font-weight: 700; line-height: 1.35; }
.book-title a:hover { text-decoration: underline; text-decoration-color: var(--store-primary); text-underline-offset: 4px; }
.book-author { color: var(--muted); font-size: 14px; margin: 2px 0 4px; }
/* صفّ السعر وحده يُدفع إلى أسفل البطاقة لتتساوى الصفوف (الملحق، البند 7) */
.book-foot { align-self: stretch; margin-top: auto; padding-top: 4px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.book-foot .price { font-size: 17px; flex-wrap: wrap; align-content: center; min-height: 40px; white-space: normal; min-width: 0; }
/* زرّ القالب الأصليّ: كبسولة «أضف» بأيقونة الحقيبة، ظاهرةٌ دائمًا بجانب السعر */
.cart-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--store-primary); color: var(--store-accent); font: inherit; font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer; transition: background-color .2s, transform .2s; }
.cart-btn:hover { background: var(--store-primary-dark); }
.cart-btn:active { transform: scale(.94); }
.cart-btn .icon { width: 17px; height: 17px; }
.cart-btn[disabled] { background: var(--panel-2); color: var(--muted); cursor: not-allowed; }
body[data-card-style="plain"] .book-media { background: none; padding: 0; }
body[data-card-style="plain"] .book-cover img { border-radius: var(--r-card); }

/* ---------------------------------------------------------------- كتاب الموسم والمعلومات الأربع */
.spot { display: grid; grid-template-columns: 1fr minmax(280px, 440px) 1fr; grid-template-areas: "a media b" "buy buy buy"; align-items: center; gap: 28px 56px; }
.spot > .spot-facts:first-child { grid-area: a; }
.spot > .spot-facts:nth-of-type(2) { grid-area: b; }
.spotlight { overflow-x: clip; }
.spot-media { grid-area: media; position: relative; padding: 24px 0 36px; }
.spot-front { position: relative; display: block; width: 66%; margin-inline-start: 6%; transform: rotate(-4deg); z-index: 1; }
.spot-front img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 26px 50px rgba(24, 29, 37, .25); }
.spot-front .type-dot { position: absolute; top: 14px; inset-inline-start: 14px; }
.spot-back { position: absolute; top: 12%; inset-inline-end: 2%; width: 56%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; transform: rotate(8deg); box-shadow: var(--shadow-cover); }
.spot-facts { list-style: none; display: grid; gap: 52px; text-align: center; }
.spot-facts li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.spot-facts li > .icon { width: 26px; height: 26px; margin-bottom: 6px; color: var(--store-accent); }
.spot-facts small { color: var(--muted); font-size: 14px; }
.spot-facts b { font-size: 18px; font-weight: 700; }
.fact-sub { color: var(--muted); font-size: 14px; }
.spot-buy { grid-area: buy; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.spot-title { font-size: 26px; font-weight: 800; }
.spot-author { color: var(--muted); line-height: 1.4; }
.spot-buy .btn { min-height: 48px; }

/* ---------------------------------------------------------------- شبكة بنتو */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.bento > :nth-child(1) { grid-column: span 7; }
.bento > :nth-child(2) { grid-column: span 5; }
.bento > :nth-child(3) { grid-column: span 5; }
.bento > :nth-child(4) { grid-column: span 7; }
.bento-note { background: var(--panel); border-radius: var(--r-panel); padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 14px; min-height: 320px; }
.bento-note h3 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; }
.bento-note h2 { font-size: 26px; font-weight: 800; }
.bento-note p { color: var(--muted); font-size: 17px; line-height: 1.8; max-width: 36em; }
.bento-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--white); color: var(--store-accent); }
.bento-icon .icon { width: 26px; height: 26px; }
.bento-banner { position: relative; display: block; min-height: 320px; border-radius: var(--r-panel); overflow: hidden; }
.bento-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bento-banner:hover img { transform: scale(1.04); }
.bento-tag { position: absolute; bottom: 20px; inset-inline-start: 20px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: var(--white); color: var(--store-text); font-size: 15px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.bento-pdp > :nth-child(3), .bento-pdp > :nth-child(4) { grid-column: span 6; }
.bento-pdp .bento-note { justify-content: flex-start; min-height: 0; padding: 40px; }
.bento-back { position: relative; margin: 0; display: grid; place-items: center; padding: 40px 32px 84px; border-radius: var(--r-panel); background: var(--panel-2); }
.bento-back img { width: 54%; max-width: 230px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow-cover); transform: rotate(4deg); }
.prose p { color: var(--muted); font-size: 17px; line-height: 1.9; }
.prose p + p { margin-top: 12px; }
.spec-list { margin: 0; }
.spec-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.spec-list div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; font-weight: 700; text-align: end; }
.perks { list-style: none; display: grid; gap: 14px; }
.perks li { display: flex; align-items: center; gap: 12px; }
.perks .icon { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--white); color: var(--store-accent); }
.perks-sm { margin-top: 18px; gap: 8px; font-size: 14px; color: var(--muted); }
.perks-sm .icon { width: 32px; height: 32px; padding: 7px; }

/* ---------------------------------------------------------------- من السلسلة */
.series { position: relative; min-height: 580px; }
.series-side { width: 46%; }
.series-note { color: var(--muted); font-size: 17px; margin-top: 16px; max-width: 30em; }
.series-list { list-style: none; margin-top: 28px; }
.series-item + .series-item { margin-top: 4px; }
.series-pick {
	width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px 18px;
	border: 0; border-radius: 999px; background: transparent; text-align: start; cursor: pointer; transition: background-color .2s;
}
.series-pick:hover { background: var(--panel); }
.series-item.is-active .series-pick { background: var(--panel-2); }
.series-pick img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.series-name { flex: 1; font-size: 19px; font-weight: 500; }
.series-pick .price { font-size: 18px; }
.series-stage { display: none; position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 50%; align-items: center; justify-content: center; overflow: hidden; }
.series-item.is-active .series-stage { display: flex; }
.series-ghost {
	position: absolute; top: 10%; inset-inline: 0; text-align: center; white-space: nowrap;
	font-size: clamp(40px, 4.6vw, 70px); font-weight: 800; line-height: 1.2;
	background: linear-gradient(to left, color-mix(in srgb, var(--store-primary) 70%, #fff), color-mix(in srgb, var(--store-primary) 35%, #fff));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.series-cover { position: relative; z-index: 1; width: min(290px, 58%); transform: rotate(12deg); margin-top: 60px; }
.series-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 30px 60px rgba(24, 29, 37, .28); }
.series-cover .type-dot { position: absolute; top: 12px; inset-inline-start: 12px; }
.series-buy { display: none; align-items: center; flex-wrap: wrap; gap: 14px 22px; padding: 16px 18px 8px; }
.series-item.is-active .series-buy { display: flex; }

/* ---------------------------------------------------------------- التصنيفات والمؤلّفون */
.cat-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cat-pill { display: inline-flex; align-items: center; gap: 14px; padding: 8px; padding-inline-end: 28px; border-radius: 999px; background: var(--panel); transition: background-color .2s; }
.cat-pill:hover { background: var(--panel-2); }
.cat-pill img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.cat-pill b { display: block; font-size: 18px; }
.cat-pill small { display: block; color: var(--muted); font-size: 14px; }
.author-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.author-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.author-card img { width: min(180px, 100%); aspect-ratio: 1; border-radius: 50%; object-fit: cover; margin-bottom: 8px; transition: transform .3s; }
.author-card:hover img { transform: scale(1.04); }
.author-card h3 { font-size: 19px; font-weight: 700; }
.author-card span { color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- آراء القرّاء */
.reviews-panel { background: linear-gradient(to left, var(--warm-a), var(--warm-b)); border-radius: var(--r-hero) var(--r-hero) 0 0; padding: 88px 0 96px; }
.reviews-note { display: inline-flex; align-items: center; gap: 8px; color: var(--store-text); font-weight: 500; }
.masonry { columns: 3; column-gap: 20px; }
.masonry-2 { columns: 2; }
.review-card { display: block; break-inside: avoid; background: var(--white); border-radius: var(--r-card); padding: 24px; margin-bottom: 20px; }
.review-card > p { margin: 12px 0 18px; font-size: 16px; line-height: 1.85; color: var(--store-text); }
.review-who { display: flex; align-items: center; gap: 12px; }
.review-who b { display: block; font-size: 15px; }
.review-who small { display: block; color: var(--muted); font-size: 13px; }
.review-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--panel-2); font-weight: 800; }
.reviews-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.reviews-aside { display: grid; gap: 20px; }
.reviews-summary { background: var(--white); border-radius: var(--r-card); padding: 24px; text-align: center; display: grid; justify-items: center; gap: 4px; }
.reviews-summary strong { font-size: 56px; font-weight: 800; line-height: 1; }
.reviews-summary .stars .icon { width: 22px; height: 22px; }
.reviews-summary small { color: var(--muted); }
.review-form { background: var(--white); border-radius: var(--r-card); padding: 24px; display: grid; gap: 12px; }
.review-form h3 { font-size: 20px; font-weight: 800; }
.review-form p { color: var(--muted); font-size: 14px; }
.star-pick { border: 0; padding: 0; margin: 0; }
.star-pick legend { padding: 0; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.star-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick label { cursor: pointer; color: #D5DAE1; }
.star-pick label .icon { width: 28px; height: 28px; }
.star-pick input:checked ~ label, .star-pick label:hover, .star-pick label:hover ~ label { color: var(--star); }
.star-pick input:focus-visible + label { outline: 3px solid var(--store-accent); border-radius: 6px; }

/* ---------------------------------------------------------------- البانر الختاميّ */
.cta-section { padding: 48px 0 64px; }
.cta { position: relative; min-height: 520px; display: flex; align-items: center; justify-content: center; text-align: center; }
.cta-tile { position: absolute; width: 150px; height: 150px; object-fit: cover; border-radius: 22px; box-shadow: 0 16px 34px rgba(24, 29, 37, .18); }
.cta-tile.t1 { top: 2%; inset-inline-start: 6%; object-position: 7% 50%; transform: rotate(-4deg); }
.cta-tile.t2 { top: 54%; inset-inline-start: 22%; object-position: 36% 50%; transform: rotate(5deg); }
.cta-tile.t3 { top: 12%; inset-inline-end: 6%; object-position: 64% 50%; transform: rotate(4deg); }
.cta-tile.t4 { bottom: 0; inset-inline-end: 30%; object-position: 93% 50%; transform: rotate(-5deg); }
.cta-body { position: relative; z-index: 1; max-width: 600px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cta-title { font-size: clamp(34px, 4.4vw, 60px); font-weight: 800; line-height: 1.2; }
.cta-title mark { white-space: nowrap; background: var(--store-primary); color: var(--store-accent); padding: 0 .22em; border-radius: 14px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cta-body p { color: var(--muted); font-size: 18px; margin-bottom: 8px; }

/* ---------------------------------------------------------------- شاهدتَه مؤخّرًا */
.recent-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.recent-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.recent-cover { position: relative; display: block; background: var(--panel); border-radius: 14px; padding: 12% 16%; margin-bottom: 6px; }
.recent-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 8px 18px rgba(24, 29, 37, .18); }
.recent-cover .type-dot { position: absolute; top: 8px; inset-inline-start: 8px; width: 26px; height: 26px; }
.recent-cover .type-dot .icon { width: 13px; height: 13px; }
.recent-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-card .price { font-size: 14px; }

/* ---------------------------------------------------------------- رأس الصفحات الداخليّة */
.page-head { padding: 40px 0 32px; }
.page-title { font-size: clamp(36px, 5.2vw, 72px); font-weight: 800; line-height: 1.12; margin: 10px 0 12px; }
.page-lead { color: var(--muted); font-size: 18px; max-width: 42em; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; color: var(--muted); font-size: 14px; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: #9AA3AF; }
.breadcrumb a:hover { color: var(--store-text); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--store-text); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip { display: inline-flex; align-items: center; min-height: 42px; padding: 0 20px; border-radius: 999px; background: var(--panel); font-weight: 500; }
.chip:hover { background: var(--panel-2); }
.chip[aria-current] { background: var(--store-accent); color: var(--white); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--white); font-weight: 700; font-size: 15px; }
.pill .icon { width: 18px; height: 18px; }

/* شريط الأدوات والتصفية */
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 8px; padding-inline-start: 24px; margin-bottom: 36px; border-radius: 999px; background: var(--panel); }
.toolbar p { color: var(--muted); }
.toolbar b { color: var(--store-text); }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.field { min-height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
textarea.field { padding: 12px 16px; resize: vertical; }
.field-pill { border-radius: 999px; padding: 0 20px; }
.filters {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 80; width: min(360px, 88vw);
	background: var(--white); padding: 22px; overflow-y: auto; display: grid; align-content: start; gap: 18px;
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.filters-open .filters { transform: none; visibility: visible; }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h2 { font-size: 24px; font-weight: 800; }
.filter-box { background: var(--panel); border-radius: 20px; padding: 18px; display: grid; gap: 10px; }
.filter-box h3 { font-size: 16px; font-weight: 800; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--store-accent); }
.check .count { margin-inline-start: auto; color: var(--muted); font-size: 14px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-range .field { width: 100%; }

/* ترقيم الصفحات */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 52px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 12px; border-radius: 999px; font-weight: 700; }
.pagination a { background: var(--panel); }
.pagination a:hover { background: var(--panel-2); }
.pagination [aria-current] { background: var(--store-accent); color: var(--white); }
.pagination .gap { color: var(--muted); }

/* ---------------------------------------------------------------- صفحة الكتاب */
.pdp-hero { padding-top: 32px; }
.pdp-hero .breadcrumb { justify-content: center; }
.pdp-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 18px; }
.pdp-type { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; padding-inline-start: 4px; padding-inline-end: 14px; border-radius: 999px; background: var(--panel); font-weight: 700; font-size: 14px; }
.pdp-type .type-dot { width: 28px; height: 28px; box-shadow: none; }
.pdp-type .type-dot .icon { width: 14px; height: 14px; }
.pdp-head .page-title { max-width: 14em; }
.pdp-author { color: var(--muted); font-size: 17px; margin-bottom: 8px; }
.pdp-author a { color: var(--store-text); font-weight: 700; border-bottom: 2px solid var(--store-primary); }
.pdp-stage { display: grid; grid-template-columns: 1fr minmax(260px, 380px) 1fr; grid-template-areas: "a media b"; align-items: center; gap: 28px 56px; margin-top: 36px; }
.pdp-stage > .spot-facts:first-child { grid-area: a; }
.pdp-stage > .spot-facts:last-child { grid-area: b; }
.pdp-media { grid-area: media; position: relative; background: var(--panel); border-radius: var(--r-panel); padding: 48px 64px 56px; }
.pdp-media > img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 26px 50px rgba(24, 29, 37, .25); }
.pdp-media > .type-dot { position: absolute; top: 18px; inset-inline-start: 18px; width: 42px; height: 42px; }
.pdp-media > .type-dot .icon { width: 20px; height: 20px; }
.pdp-media > .glass-btn { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.pdp-buy { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 36px; }
.pdp-buy > .price { font-size: 32px; font-weight: 800; }
.stock { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; }
.stock .icon { width: 18px; height: 18px; }
.pdp-buttons { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }

/* ---------------------------------------------------------------- صفحة المؤلّف */
.author-hero { background: linear-gradient(to left, var(--warm-a), var(--warm-b)); border-radius: 0 0 var(--r-hero) var(--r-hero); padding: calc(var(--header-h) + 56px) 0 64px; }
.author-hero-inner { display: flex; align-items: center; gap: 44px; }
.author-photo { width: 230px; height: 230px; border-radius: 50%; object-fit: cover; border: 6px solid var(--white); box-shadow: var(--shadow-float); flex: none; }
.author-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.bio-panel { background: var(--panel); border-radius: var(--r-panel); padding: 44px; }
.bio-panel h2 { font-size: 28px; font-weight: 800; margin-bottom: 14px; }
.bio-panel .prose { max-width: 52em; }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start; }
.cart-list { border-top: 1px solid var(--line); }
.cart-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto 110px auto; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-cover { display: block; background: var(--panel); border-radius: 14px; padding: 12px 16px; }
.cart-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.cart-info h3 { font-size: 18px; font-weight: 700; }
.cart-info p { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.cart-info .pdp-type { font-size: 13px; padding-block: 3px; }
.cart-info .pdp-type .type-dot { width: 24px; height: 24px; }
.cart-info .pdp-type .type-dot .icon { width: 12px; height: 12px; }
.cart-total { text-align: end; font-size: 17px; }
.qty { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.qty button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--panel); font-size: 18px; font-weight: 700; cursor: pointer; }
.qty button:hover { background: var(--panel-2); }
.qty input { width: 40px; border: 0; background: none; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-under { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.cart-empty { text-align: center; display: grid; justify-items: center; gap: 12px; padding: 56px 24px; background: var(--panel); border-radius: var(--r-panel); }
.cart-empty h2 { font-size: 28px; font-weight: 800; }
.cart-empty p { color: var(--muted); }
.summary { position: sticky; top: calc(var(--header-h) + 16px); background: var(--panel); border-radius: var(--r-panel); padding: 28px; }
.summary h2 { font-size: 24px; font-weight: 800; margin-bottom: 18px; }
.coupon { display: flex; gap: 8px; }
.coupon .field { flex: 1; min-width: 0; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0 14px; padding: 8px 8px 8px 16px; padding-inline-start: 18px; padding-inline-end: 8px; border-radius: 999px; background: var(--white); font-size: 14px; }
.coupon-applied button { border: 0; background: var(--panel-2); border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary-row > span:first-child { color: var(--muted); }
.summary-total { border-bottom: 0; font-size: 20px; font-weight: 800; padding-bottom: 20px; }
.summary-total > span:first-child { color: var(--store-text); }

/* ---------------------------------------------------------------- 404 */
.nf-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.nf-stage { position: relative; display: grid; place-items: center; }
.nf-digits {
	font-size: clamp(150px, 26vw, 320px); font-weight: 800; line-height: 1;
	background: linear-gradient(to left, color-mix(in srgb, var(--store-primary) 75%, #fff), color-mix(in srgb, var(--store-primary) 25%, #fff));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf-cover { position: absolute; width: clamp(90px, 11vw, 150px); aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; transform: rotate(-12deg); box-shadow: 0 24px 48px rgba(24, 29, 37, .28); }
.nf .page-title { margin-top: 0; }
.nf-search { display: flex; gap: 8px; width: 100%; max-width: 520px; margin: 6px 0 4px; }
.nf-search .field { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- التذييل الكبسوليّ */
.site-footer { padding: 32px 0 28px; }
.footer-capsule { background: var(--white); border-radius: 40px; box-shadow: var(--shadow-float); border: 1px solid var(--panel-2); padding: 16px 28px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15px; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; text-decoration-color: var(--store-primary); text-underline-offset: 4px; }
.social { display: flex; gap: 6px; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--panel); }
.social a:hover { background: var(--panel-2); }
.social .icon { width: 18px; height: 18px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-contact { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-contact li { display: inline-flex; align-items: center; gap: 6px; }
.footer-contact .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- components.html */
.kit-block { padding: 40px 0; border-bottom: 1px solid var(--line); }
.kit-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.kit-note { color: var(--muted); margin-bottom: 18px; }
.kit-note code { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; font-size: 14px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0; }
.kit-label { font-weight: 700; min-width: 7em; }
.kit-photo { position: relative; overflow: hidden; border-radius: var(--r-panel); padding: 48px 32px; min-height: 220px; }
.kit-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kit-photo > :not(img) { position: relative; }
.kit-split { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 28px; align-items: center; }
.kit-series { margin-top: 0; }
.reviews-section .kit-title { margin-bottom: 24px; }

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

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

/* ---------------------------------------------------------------- الجهاز اللوحيّ */
@media (max-width: 1100px) {
	.book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.recent-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.recent-row > :nth-child(n+5) { display: none; }
}
@media (max-width: 1024px) {
	.main-nav, .hide-sm { display: none; }
	.main-nav + .header-actions { margin-inline-start: auto; }
	.menu-toggle { display: inline-grid; }
	.header-actions { margin-inline-start: auto; }
	.spot { grid-template-columns: 1fr 1fr; grid-template-areas: "media media" "a b" "buy buy"; }
	.spot-media { max-width: 420px; width: 100%; margin-inline: auto; }
	.spot-facts { gap: 28px; }
	.pdp-stage { grid-template-columns: 1fr 1fr; grid-template-areas: "media media" "a b"; }
	.pdp-media { max-width: 420px; width: 100%; margin-inline: auto; }
	.series { min-height: 0; }
	.series-side { width: 100%; }
	.series-stage { position: relative; width: 100%; height: 400px; inset: auto; margin: 6px 0; }
	.series-cover { width: min(220px, 52%); margin-top: 40px; }
	.reviews-layout { grid-template-columns: 1fr; }
	.reviews-aside { grid-template-columns: 1fr 1.6fr; align-items: start; }
	.masonry { columns: 2; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.cta-tile { width: 120px; height: 120px; }
	.cta-tile.t2 { inset-inline-start: 6%; top: 70%; }
	.cta-tile.t4 { inset-inline-end: 6%; bottom: 4%; }
	.kit-split { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- الهاتف */
@media (max-width: 760px) {
	:root { --header-h: 70px; --r-hero: 28px; --r-panel: 22px; }
	.container { padding-inline: 16px; }
	.site-header { padding: 10px 16px 0; }
	.header-capsule { height: 60px; gap: 4px; padding-inline: 6px; }
	.brand { font-size: 17px; gap: 8px; padding-inline-start: 0; }
	.brand img { width: 36px; height: 36px; }
	.cart-capsule { padding: 0 14px; }
	.section { padding: 48px 0; }
	.section-tight { padding: 24px 0; }
	.section-flush { padding-top: 0; }
	.section-head { margin-bottom: 24px; }
	.slide { min-height: 540px; }
	.slide-inner { padding: calc(var(--header-h) + 40px) 16px 64px; }
	.slide::after { background: linear-gradient(to top, rgba(12, 16, 22, .7), rgba(12, 16, 22, .2) 70%); }
	.trust { padding-top: 20px; }
	.trust .glass { font-size: 14px; padding: 9px 16px; }
	.book-grid, .book-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
	.book-media { padding: 12% 15% 16%; }
	.book-title { font-size: 15px; }
	.card-tools { bottom: 8px; inset-inline-end: 8px; gap: 6px; }
	.wish-btn { width: 36px; height: 36px; }
	.book-foot .price { font-size: 15px; }
	.cart-btn { padding: 0 12px; font-size: 13px; gap: 5px; }
	.book-media > .type-dot { width: 28px; height: 28px; top: 8px; inset-inline-start: 8px; }
	.book-badges { top: 8px; inset-inline-end: 8px; }
	.badge { font-size: 12px; padding: 3px 9px; }
	.spot { gap: 24px 16px; }
	.spot-back { inset-inline-end: 8%; width: 52%; }
	.spot-media { max-width: 320px; }
	.spot-facts b { font-size: 16px; }
	.bento > * { grid-column: 1 / -1 !important; }
	.bento-note { padding: 28px; min-height: 0; }
	.bento-banner { min-height: 260px; }
	.series-ghost { font-size: 44px; }
	.series-stage { height: 340px; }
	.series-name { font-size: 17px; }
	.series-pick { padding: 10px 12px; }
	.cat-pill { padding-inline-end: 20px; }
	.cat-pill img { width: 48px; height: 48px; }
	.cat-pill b { font-size: 16px; }
	.author-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
	.reviews-panel { padding: 56px 0 64px; }
	.masonry, .masonry-2 { columns: 1; }
	.reviews-aside { grid-template-columns: 1fr; }
	.cta-section { padding: 48px 0; }
	.cta { min-height: 0; padding-top: 130px; }
	.cta-tile { width: 96px; height: 96px; border-radius: 18px; }
	.cta-tile.t1 { top: 0; inset-inline-start: 8%; }
	.cta-tile.t3 { top: 14px; inset-inline-end: 8%; }
	.cta-tile.t2 { top: 6px; inset-inline-start: 40%; }
	.cta-tile.t4 { display: none; }
	.recent-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 38%; overflow-x: auto; padding-bottom: 6px; }
	.recent-row > :nth-child(n+5) { display: flex; }
	.toolbar { border-radius: 24px; padding: 12px; padding-inline-start: 16px; }
	.toolbar-actions { width: 100%; }
	.toolbar-actions .field { flex: 1; min-width: 0; }
	.pdp-media { padding: 36px 44px 48px; }
	.pdp-buy > .price { font-size: 26px; }
	.pdp-buttons .btn-lg { flex: 1 1 100%; }
	.bento-pdp .bento-note { padding: 28px; }
	.author-hero-inner { flex-direction: column; text-align: center; gap: 20px; }
	.author-hero .breadcrumb, .author-meta { justify-content: center; }
	.author-photo { width: 170px; height: 170px; }
	.bio-panel { padding: 28px; }
	.cart-row { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "cover info remove" "cover price price" "cover qty total"; gap: 8px 14px; }
	.cart-cover { grid-area: cover; align-self: start; padding: 8px 10px; }
	.cart-info { grid-area: info; }
	.cart-price { grid-area: price; }
	.qty { grid-area: qty; justify-self: start; }
	.cart-total { grid-area: total; }
	.cart-remove { grid-area: remove; align-self: start; }
	.summary { padding: 22px; }
	.footer-capsule { border-radius: 28px; padding: 20px; }
	.footer-top, .footer-bottom { flex-direction: column; text-align: center; }
	.footer-links { justify-content: center; }
	.footer-contact { justify-content: center; }
}
@media (max-width: 480px) {
	/* البطاقة ضيّقة: السعر سطرٌ وكبسولة «أضف» تحته، فلا ينكسر السعر بين البطاقات */
	.book-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
	.book-foot .price { min-height: 0; }
	.cart-word { display: none; }
	.brand-name { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; }
	.slide-title { font-size: 40px; }
	.spot-facts li > .icon { width: 22px; height: 22px; }
}

/* ---------------------------------------------------------------- ميزات المنصّة المعتمدة */
/* اختيار الصيغة (book.formats): في الرئيسيّة قائمة صيغ كتابٍ واحد، وفي صفحة الكتاب مبدّلٌ فوق السعر */
.series-kicker { color: var(--muted); font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.series-side .section-title a:hover { color: var(--store-primary-dark); }
.series-author { color: var(--muted); font-size: 16px; margin-top: 4px; }
[data-region="home_formats"] .series-note { margin: 0 0 18px; }
[data-region="home_formats"] .series-list { margin-top: 2px; }
.series-pick .type-dot { width: 30px; height: 30px; flex: none; }
.series-pick .type-dot .icon { width: 15px; height: 15px; }
.formats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.format {
	display: inline-flex; align-items: center; gap: 10px; padding-block: 6px; padding-inline: 8px 16px;
	border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); transition: border-color .2s, background-color .2s;
}
.format:hover { border-color: var(--store-text); }
.format.is-current { border-color: var(--store-text); background: var(--panel-2); }
.format .type-dot { width: 28px; height: 28px; box-shadow: none; }
.format .type-dot .icon { width: 14px; height: 14px; }
.format-name { font-weight: 700; font-size: 15px; }
.format-price { color: var(--muted); font-size: 14px; }
.format.is-current .format-price { color: var(--store-text); font-weight: 700; }
[data-region="home_formats"] .series-ghost { top: 14px; font-size: clamp(60px, 8vw, 120px); line-height: 1.4; }
[data-region="home_formats"] .series-cover { margin-top: 150px; }
@media (max-width: 1023px) { [data-region="home_formats"] .series-cover { margin-top: 110px; } }
@media (max-width: 760px) { [data-region="home_formats"] .series-stage { height: 440px; } }

/* ---------------------------------------------------------------- الإصدار الثاني: إيقاع الرئيسيّة */
/* شريطٌ رماديّ بزوايا الواجهة المستديرة يفصل الأقسام المتتالية، وألواح البطاقات فيه بيضاء */
.band { background: var(--panel); border-radius: var(--r-hero); margin-inline: 12px; }
.band + .band { margin-top: 12px; }
.trust + .band { margin-top: 28px; }
.band + .reviews-section { margin-top: 12px; }
body[data-card-style="panel"] .band .book-media { background: var(--white); }
body[data-card-style="panel"] .band .book-card:hover .book-media { background: var(--white); }
.band .cat-pill, .band .chip { background: var(--white); }
.section-sub { color: var(--muted); font-size: 17px; margin-top: 8px; }
.section-sub:empty { display: none; }

/* الدوّار الأفقيّ: سهمان في الحاسوب، والتمرير باللمس في الهاتف */
.carousel-nav { display: flex; gap: 8px; }
.carousel-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--store-text); cursor: pointer; transition: background-color .2s, border-color .2s, opacity .2s; }
.carousel-btn:hover:not([disabled]) { border-color: var(--store-accent); }
.carousel-btn[disabled] { opacity: .4; cursor: default; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px * (var(--per-row) - 1)) / var(--per-row)); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }

/* تبويبات صفّ الكتب (القاعدة 16): كبسولةٌ واحدة كرأس القالب */
.row-tabs { display: flex; justify-content: center; gap: 4px; width: fit-content; max-width: 100%; margin: -12px auto 32px; padding: 5px; border-radius: 999px; background: var(--white); box-shadow: 0 2px 12px rgba(24, 29, 37, .06); overflow-x: auto; scrollbar-width: none; }
.row-tabs::-webkit-scrollbar { display: none; }
.row-tab { flex: none; min-height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: none; font-weight: 700; font-size: 15px; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s; }
.row-tab:hover { color: var(--store-text); background: var(--panel); }
.row-tab[aria-selected="true"] { background: var(--store-accent); color: var(--white); }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* عدّاد العرض في البانر الختاميّ (offer.ends_at): يُخفى إن غاب التاريخ أو انقضى */
.countdown { display: flex; gap: 10px; justify-content: center; margin: 4px 0 10px; }
.cd-unit { display: grid; justify-items: center; min-width: 72px; padding: 10px 8px 8px; border-radius: 18px; background: var(--white); box-shadow: var(--shadow-float); }
.cd-unit b { font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-unit small { color: var(--muted); font-size: 13px; }

/* المدوّنة: أحدث المقالات، وصفحتا blog وpost */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.post-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.post-media { position: relative; display: block; border-radius: var(--r-panel); overflow: hidden; background: var(--panel); }
.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-date { position: absolute; bottom: 14px; inset-inline-start: 14px; padding: 6px 14px; font-size: 13px; }
.post-title { font-size: 20px; font-weight: 800; line-height: 1.4; }
.post-title a:hover { text-decoration: underline; text-decoration-color: var(--store-primary); text-underline-offset: 5px; }
.post-excerpt { color: var(--muted); font-size: 15px; line-height: 1.8; margin-top: 6px; }
.post-grid.is-blog .post-card.is-lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 36px; }
.post-grid.is-blog .is-lead .post-title { font-size: clamp(24px, 2.6vw, 34px); }
.post-grid.is-blog .is-lead .post-excerpt { font-size: 17px; }
.article { max-width: 780px; margin-inline: auto; }
.article-head { text-align: center; display: grid; justify-items: center; gap: 12px; }
.article-head .breadcrumb { justify-content: center; }
.article-date { color: var(--muted); font-weight: 700; }
.article-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-panel); margin: 28px 0 32px; }
.article-body p { font-size: 18px; line-height: 2; color: var(--store-text); }
.article-body p + p { margin-top: 16px; }
.article-body h2 { font-size: 26px; font-weight: 800; margin: 32px 0 12px; }
.article-body blockquote { margin: 24px 0; padding: 20px 26px; border-radius: var(--r-card); background: var(--panel); font-size: 19px; font-weight: 700; line-height: 1.8; }
.article-books { margin-top: 40px; padding: 28px; border-radius: var(--r-panel); background: var(--panel); }
.article-books h2 { font-size: 22px; font-weight: 800; margin-bottom: 18px; }

/* النشرة البريديّة: لوحٌ داكن بلون الهويّة */
.newsletter-section { padding: 12px 0 0; }
.newsletter { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 440px); align-items: center; gap: 18px 28px; padding: 36px 44px; border-radius: var(--r-panel); background: var(--store-accent); color: var(--white); }
.newsletter-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--store-primary); color: var(--store-accent); }
.newsletter-icon .icon { width: 26px; height: 26px; }
.newsletter-text h2 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; }
.newsletter-text p { color: #E3E6EB; margin-top: 4px; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter-form .field { flex: 1 1 200px; min-width: 0; border: 0; }
.newsletter-offer { flex-basis: 100%; color: #F6D7B6; font-size: 14px; font-weight: 700; }
.newsletter-offer:empty { display: none; }
body[data-show-newsletter="false"] .newsletter-section { display: none; }

/* صفحة التصنيف: المرشّحات المختارة، وتبديل الشبكة والقائمة */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -20px 0 28px; }
.active-filters > span { color: var(--muted); font-size: 14px; font-weight: 700; margin-inline-end: 4px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 8px 0 14px; padding-inline: 14px 8px; border-radius: 999px; background: var(--panel-2); font-size: 14px; font-weight: 700; }
.filter-chip .icon { width: 14px; height: 14px; }
.filter-chip:hover { background: var(--line); }
.clear-filters { font-size: 14px; font-weight: 700; color: var(--store-text); text-decoration: underline; text-underline-offset: 4px; }
.view-switch { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--white); }
.view-switch button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.view-switch button[aria-pressed="true"] { background: var(--store-accent); color: var(--white); }
.view-switch .icon { width: 18px; height: 18px; }
.book-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.book-grid.is-list .book-card { flex-direction: row; align-items: stretch; gap: 20px; padding: 12px; border-radius: var(--r-panel); background: var(--panel); }
.book-grid.is-list .book-media { flex: none; width: 150px; padding: 18px 22px; background: var(--white); }
.book-grid.is-list .book-body { padding: 10px 0 4px; }

/* صفّ «من رفوفنا» ثمانية كتب: يُكتفى بصفوفٍ كاملة حين يتغيّر عدد الأعمدة */
body[data-books-per-row="3"] [data-region="home_more"] .book-grid > :nth-child(n+7),
body[data-books-per-row="5"] [data-region="home_more"] .book-grid > :nth-child(n+6) { display: none; }
@media (min-width: 1101px) {
	body[data-books-per-row="3"] .book-grid > :nth-child(4):last-child { display: none; }
	body[data-books-per-row="5"] .book-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) and (min-width: 761px) {
	[data-region="home_more"] .book-grid > :nth-child(n+7) { display: none; }
	body[data-books-per-row="5"] [data-region="home_more"] .book-grid > :nth-child(6) { display: flex; }
	.book-grid > :nth-child(4):last-child { display: none; }
}
@media (max-width: 1024px) {
	.carousel-track { grid-auto-columns: calc((100% - 48px) / 3); }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid > :nth-child(3):last-child { display: none; }
	.post-grid.is-blog > :nth-child(3):last-child { display: flex; }
	.post-grid.is-blog .post-card.is-lead { grid-template-columns: 1fr; gap: 14px; }
	.newsletter { grid-template-columns: auto minmax(0, 1fr); }
	.newsletter-form { grid-column: 1 / -1; }
	.book-grid.is-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.band { margin-inline: 8px; }
	.band .container { padding-inline: 12px; }
	.section-sub { font-size: 15px; }
	.carousel-nav { display: none; }
	.carousel-track { grid-auto-columns: 44%; gap: 14px; margin-inline: -12px; padding-inline: 12px; scroll-padding-inline: 12px; }
	.row-tabs { margin: -8px 0 22px; width: auto; justify-content: flex-start; }
	.row-tab { padding: 0 16px; font-size: 14px; }
	.cd-unit { min-width: 62px; padding: 8px 6px 6px; border-radius: 14px; }
	.cd-unit b { font-size: 22px; }
	.post-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; scrollbar-width: none; }
	.post-grid > * { scroll-snap-align: start; }
	.post-grid > :nth-child(3):last-child { display: flex; }
	.post-grid.is-blog { grid-auto-flow: row; grid-template-columns: 1fr; grid-auto-columns: auto; overflow: visible; gap: 28px; }
	.newsletter { grid-template-columns: 1fr; justify-items: start; padding: 26px 22px; }
	.newsletter-form .btn { flex: 1 1 auto; }
	.active-filters { margin: -16px 0 22px; }
	.book-grid.is-list .book-card { gap: 14px; padding: 10px; }
	.toolbar-actions .view-switch { padding: 2px; }
	.toolbar-actions .view-switch button { width: 36px; height: 36px; }
	.toolbar-actions .btn-soft { padding: 0 16px; }
	.toolbar-actions .field { padding: 0 14px; }
	.page-head .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
	.page-head .chips::-webkit-scrollbar { display: none; }
	.page-head .chip { flex: none; }
	.book-grid.is-list .book-media { width: 112px; padding: 12px 14px; }
	/* الهاتف: صورة الشريحة فوق النصّ لا خلفه */
	.slide { flex-direction: column; align-items: stretch; min-height: 0; background: var(--store-accent); }
	.slide > img { position: relative; inset: auto; height: 280px; object-position: 22% 50%; }
	.slide::after { display: none; }
	.slide-inner { padding: 22px 16px 58px; }
	.slide-title { text-shadow: none; }
	.slide-inner .glass { margin: 14px 0 18px; font-size: 14px; }
	/* شريط الثقة شريطٌ واحد يُمرَّر */
	.trust { padding-top: 16px; }
	.trust-list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
	.trust-list::-webkit-scrollbar { display: none; }
	.trust .glass { flex: none; background: var(--store-accent); }
	/* التصنيفات شريطٌ يُمرَّر، والآراء كذلك */
	.cat-pills { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
	.cat-pills::-webkit-scrollbar { display: none; }
	.cat-pill { flex: none; }
	.reviews-section .masonry { columns: auto; display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
	.reviews-section .masonry > * { margin: 0; scroll-snap-align: start; }
}

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