/* ==========================================================================
   قالب «حرير» لمنصّة ناشر — كلّ التنسيق هنا، بلا مكتبات
   ألوان الهويّة الخمسة وحدها يختارها الناشر؛ وما سواها محايد
   ========================================================================== */

:root {
	--store-primary: #2B2D42;
	--store-primary-dark: #16172A;
	--store-accent: #C9877D;
	--store-bg: #FFFFFF;
	--store-text: #181D25;

	/* محايدات */
	--plate: #F5F7FA;
	--plate-2: #EEF1F6;
	--line: #E0E5EB;
	--muted: #4E5562;
	--muted-2: #646B78;
	--white: #FFFFFF;
	--gold: #E8A317;
	--danger: #B42318;

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

	--radius: 12px;
	--radius-sm: 8px;
	--radius-lg: 16px;
	--radius-pill: 999px;
	--cols: 4;
	--container: 1296px;
	--gutter: 24px;
	--font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--shadow-cover: 0 10px 22px rgba(24, 29, 37, .18), 0 2px 5px rgba(24, 29, 37, .12);
}

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

/* ------------------------------------------------------------------ أساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 150px; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }

/* ------------------------------------------------------------------ أزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 22px;
	border: 1px solid transparent; border-radius: var(--radius-sm);
	font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap;
	background: none; transition: background-color .2s, color .2s, border-color .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-primary); color: var(--white); }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-outline { border-color: var(--store-primary); color: var(--store-primary); background: var(--white); }
.btn-outline:hover { background: var(--store-primary); color: var(--white); }
.btn-light { border-color: var(--line); color: var(--store-text); background: var(--white); }
.btn-light:hover { border-color: var(--store-primary); }
.btn-accent { background: var(--store-accent); color: var(--store-text); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--plate-2); color: var(--muted); border-color: var(--plate-2); cursor: not-allowed; }
.icon-arrow { transform: none; }
.round-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
	border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--store-text);
	transition: border-color .2s, background-color .2s;
}
.round-btn:hover { border-color: var(--store-primary); }
.round-btn .icon { width: 18px; height: 18px; }
.icon-btn {
	position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
	border: 0; border-radius: 50%; background: none; color: var(--store-text);
}
.icon-btn:hover { background: var(--plate); }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--store-primary); border-bottom: 1px solid currentColor; }

/* التبويبات الكبسوليّة */
.pill-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill-tabs [role="tab"], .pill {
	min-height: 40px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--radius-pill);
	background: var(--white); font-size: 15px; font-weight: 500; color: var(--store-text);
	display: inline-flex; align-items: center; gap: 6px; transition: border-color .2s, box-shadow .2s;
}
.pill-tabs [role="tab"]:hover, .pill:hover { border-color: var(--muted-2); }
.pill-tabs [role="tab"][aria-selected="true"], .pill[aria-current="page"], .pill.is-active {
	border-color: var(--store-primary); box-shadow: inset 0 0 0 1px var(--store-primary);
	background: color-mix(in srgb, var(--store-accent) 16%, var(--white));
}

/* التقييم: نجومٌ ذهبيّة دائمًا (القاعدة 7) */
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars .icon { width: 15px; height: 15px; }
.stars .off { color: #D5DAE1; }
.rating-lg .stars .icon { width: 18px; height: 18px; }

/* السعر (القاعدة 8) */
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-weight: 700; color: var(--store-text); }
.price del { font-size: .85em; font-weight: 400; color: var(--muted-2); }
.price-lg { font-size: 28px; font-weight: 800; }

/* شارات */
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 6px; font-size: 13px; font-weight: 700; line-height: 1; }
.badge-sale { background: var(--store-accent); color: var(--store-text); }
.badge-new { background: var(--store-primary); color: var(--white); }

/* دائرة نوع الكتاب (القاعدة 6) */
.type-dot { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--white); box-shadow: 0 0 0 2px var(--white); flex: none; }
.type-dot .icon { width: 16px; height: 16px; stroke-width: 1.9; }
.type-dot[data-type="print"] { background: var(--type-print); }
.type-dot[data-type="ebook"] { background: var(--type-ebook); }
.type-dot[data-type="audio"] { background: var(--type-audio); }
.type-dot[data-type="educational"] { background: var(--type-educational); }
.type-dot.sm { width: 22px; height: 22px; }
.type-dot.sm .icon { width: 12px; height: 12px; }
.type-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }

/* حقول */
.field {
	width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
	background: var(--white); font-size: 15px;
}
.field:focus { outline: none; border-color: var(--store-primary); }
textarea.field { min-height: 110px; padding: 12px 14px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--store-primary); margin: 0; }
.check .count { margin-inline-start: auto; font-size: 13px; color: var(--muted-2); }

/* ------------------------------------------------------------------ شريط الإعلان */
.announce { background: var(--store-primary-dark); color: var(--white); font-size: 14px; }
.announce .container { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40px; padding-inline: 56px; }
.announce p { text-align: center; line-height: 1.4; padding: 8px 0; }
.announce-close { position: absolute; inset-inline-end: var(--gutter); top: 50%; transform: translateY(-50%); width: 32px; height: 32px; color: var(--white); }
.announce-close:hover { background: rgba(255, 255, 255, .12); }
.announce-close .icon { width: 16px; height: 16px; }
.announce:has([data-option="announcement"]:empty) { display: none; }

/* ------------------------------------------------------------------ الرأس */
.site-header { background: var(--white); position: sticky; top: 0; z-index: 30; }
.header-top .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 76px; }
.header-start { display: flex; align-items: center; gap: 8px; }
.header-help { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.header-help b { font-weight: 500; color: var(--store-text); }
.header-help .icon { width: 18px; height: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand-name { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1; white-space: nowrap; }
.header-end { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.count-badge {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--store-accent); color: var(--store-text);
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.menu-toggle { display: none; }

.header-nav { border-bottom: 1px solid var(--line); }
.header-nav .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 56px; }
.cat-toggle { display: inline-flex; align-items: center; gap: 10px; justify-self: start; padding: 0; border: 0; background: none; font-size: 15px; font-weight: 700; }
.nav-list { display: flex; gap: 32px; }
.nav-list a { position: relative; display: inline-block; padding: 16px 0; font-size: 15px; font-weight: 500; }
.nav-list a::after { content: ""; position: absolute; inset-inline: 0; bottom: 12px; height: 1.5px; background: var(--store-text); transform: scaleX(0); transition: transform .2s; }
.nav-list a:hover::after, .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.header-search { position: relative; justify-self: end; width: min(100%, 260px); }
.header-search input { width: 100%; height: 40px; padding: 0 40px 0 14px; padding-inline: 40px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); font-size: 14px; }
.header-search input:focus { outline: none; border-color: var(--store-primary); }
.header-search button { position: absolute; inset-inline-start: 4px; top: 4px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--muted); }
.header-search button .icon { width: 17px; height: 17px; }

/* الدرج الجانبيّ: التصنيفات في الحاسوب، والقائمة كلّها في الهاتف */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(22, 23, 42, .45); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(340px, 88vw);
	display: flex; flex-direction: column; gap: 18px; padding: 20px 22px; overflow-y: auto;
	background: var(--white); transform: translateX(105%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drawer-head .brand-name { font-size: 22px; }
.drawer-head .brand img { width: 34px; height: 34px; }
.drawer h2 { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.drawer-cats a, .drawer-links a { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--plate-2); font-size: 16px; font-weight: 500; }
.drawer-cats a .icon { width: 16px; height: 16px; color: var(--muted-2); }
.drawer .header-help { margin-top: auto; }
body.drawer-open { overflow: hidden; }

/* ------------------------------------------------------------------ أقسام عامّة */
.section { padding: 72px 0; }
.section-plate { background: var(--plate); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-title { font-size: 32px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.eyebrow { display: block; font-size: 16px; color: var(--muted); margin-bottom: 6px; }
.section-sub { margin-top: 8px; color: var(--muted); }
.head-arrows { display: flex; gap: 10px; }

/* ------------------------------------------------------------------ السلايدر */
.hero { background: var(--plate); }
.slider { position: relative; }
.slide { position: relative; display: none; min-height: clamp(420px, 36vw, 560px); overflow: hidden; }
.slide:first-child, .slider.is-ready .slide.is-active { display: block; }
.slider.is-ready .slide:not(.is-active) { display: none; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.slide-text { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: inherit; padding-block: 56px 88px; }
.slide-text > * { max-width: 46%; }
.slide-text .eyebrow { font-size: 20px; color: var(--muted); margin-bottom: 14px; }
.slide-text h1, .slide-text h2 { font-size: clamp(34px, 3.6vw, 54px); font-weight: 800; line-height: 1.2; letter-spacing: .01em; }
.slide-text p { margin-top: 14px; font-size: 17px; color: var(--muted); }
.slide-text .btn { margin-top: 32px; background: transparent; }
.slide-text .btn:hover { background: var(--store-primary); color: var(--white); }
.slider-dots { position: absolute; z-index: 2; bottom: 32px; inset-inline-start: max(var(--gutter), calc((100% - var(--container)) / 2)); display: flex; gap: 6px; }
.slider-dots button { width: 18px; height: 18px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.slider-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #B7BEC9; transition: background-color .2s, transform .2s; }
.slider-dots button[aria-current="true"]::before { background: var(--store-text); transform: scale(1.15); }

/* ------------------------------------------------------------------ شريط الثقة */
.trust { border-bottom: 1px solid var(--line); }
.trust-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trust-item { display: flex; align-items: center; gap: 14px; padding: 22px 20px; }
.trust-item + .trust-item { border-inline-start: 1px solid var(--line); }
.trust-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--plate); flex: none; }
.trust-item h3 { font-size: 16px; font-weight: 700; }
.trust-item p { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ التصنيفات */
.cat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.cat-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.cat-card .cat-img { width: 100%; max-width: 150px; aspect-ratio: 1; border-radius: 50%; background: var(--plate); overflow: hidden; display: grid; place-items: center; transition: background-color .2s; }
.cat-card img { width: 48%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: var(--shadow-cover); transition: transform .3s; }
.cat-card:hover img { transform: translateY(-4px); }
.cat-card h3 { font-size: 16px; font-weight: 500; }
.cat-card span { font-size: 13px; color: var(--muted-2); }

/* ------------------------------------------------------------------ بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 32px 24px; }
.book-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.book-media {
	position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.1;
	border-radius: var(--radius); background: var(--plate); overflow: hidden;
}
.book-media > a { display: block; width: 58%; }
.book-media > a img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: var(--shadow-cover); transition: transform .35s; }
.book-card:hover .book-media > a img { transform: translateY(-4px); }
.book-badges { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 6px; z-index: 2; }
.book-media .type-dot { position: absolute; bottom: 12px; inset-inline-start: 12px; z-index: 2; }
/* المفضّلة والنظرة السريعة تطفوان فوق الغلاف ولا تحجزان مكانًا؛ النظرة السريعة عند التحويم في الحاسوب، ودائمًا في اللمس */
.book-actions { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.book-actions .icon-btn { width: 36px; height: 36px; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 3px rgba(24, 29, 37, .1); }
.book-actions .icon-btn:hover { background: var(--white); color: var(--store-primary); }
.book-actions .icon { width: 18px; height: 18px; }
.book-actions [data-action="wishlist"][aria-pressed="true"] { color: var(--store-accent); }
.book-actions [data-action="wishlist"][aria-pressed="true"] .icon { fill: currentColor; }
@media (hover: hover) {
	.book-actions [data-action="quick-view"] { opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
	.book-card:hover [data-action="quick-view"], .book-card:focus-within [data-action="quick-view"], .feature-book:hover [data-action="quick-view"], .feature-book:focus-within [data-action="quick-view"] { opacity: 1; transform: none; }
}
.stock-band {
	position: absolute; z-index: 2; inset-inline: 0; top: 50%; transform: translateY(-50%);
	padding: 8px; background: rgba(22, 23, 42, .86); color: var(--white); text-align: center; font-size: 14px; font-weight: 700;
}
.book-card.is-out .book-media > a img { filter: grayscale(.5); opacity: .75; }
.book-body { display: flex; flex-direction: column; gap: 3px; flex: 1; padding-top: 14px; }
.book-title { font-size: 15px; font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.book-author { font-size: 13px; color: var(--muted-2); }
.book-body .rating, .hcard-body .rating { gap: 4px; font-size: 13px; }
.book-body .stars .icon, .hcard .stars .icon { width: 13px; height: 13px; }
.rating-count { color: var(--muted-2); }
/* صفّ السعر وحده يُدفع إلى الأسفل لتتساوى البطاقات (الملحق، البند 7) */
.book-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.book-foot .price { font-size: 16px; }
.cart-btn {
	display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
	background: var(--store-primary); color: var(--white); transition: background-color .2s, transform .2s;
}
.cart-btn .icon { width: 18px; height: 18px; }
.cart-btn:hover { background: var(--store-primary-dark); transform: translateY(-1px); }
.cart-btn[disabled] { background: var(--plate-2); color: var(--muted); cursor: not-allowed; transform: none; }
/* زرّ السلّة الأصليّ في «حرير»: مستطيلٌ داكن بزوايا صغيرة فيه الحقيبة والنصّ، وصار ظاهرًا دائمًا تحت السعر بدل ظهوره عند التحويم (الملحق، البند 7) */
.book-foot { flex-wrap: wrap; }
.card-cart {
	flex: 1 0 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius-sm);
	background: var(--store-primary); color: var(--white); font-size: 14px; font-weight: 500;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .2s;
}
.card-cart .icon { width: 17px; height: 17px; }
.card-cart:hover { background: var(--store-primary-dark); }
.card-cart[disabled] { background: var(--plate-2); color: var(--muted); cursor: not-allowed; }
.listing-grid.is-list .card-cart { flex: none; }

/* شكل البطاقة */
body[data-card-style="framed"] .book-card { padding: 10px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); background: var(--white); }
body[data-card-style="framed"] .book-media { background: var(--white); border: 1px solid var(--plate-2); }
body[data-card-style="framed"] .book-body { padding-inline: 4px; padding-bottom: 4px; }
body[data-card-style="minimal"] .book-media { aspect-ratio: 2 / 3; background: none; }
body[data-card-style="minimal"] .book-media > a { width: 100%; height: 100%; }
body[data-card-style="minimal"] .book-media > a img { height: 100%; border-radius: var(--radius); box-shadow: none; }
body[data-card-style="minimal"] .book-card:hover .book-media > a img { transform: none; }

/* البطاقة الأفقيّة الرماديّة */
.hcard { display: flex; align-items: center; gap: 18px; padding: 12px 18px; border-radius: var(--radius); background: var(--plate); min-width: 0; }
.hcard .cart-btn { margin-inline-start: auto; }
.hcard-media { position: relative; flex: none; width: 58px; }
.hcard-media img { width: 58px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: var(--shadow-cover); }
.hcard-media .type-dot { position: absolute; bottom: -6px; inset-inline-start: -8px; }
.hcard-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hcard-body .rating { font-size: 12px; gap: 4px; }
.hcard-body .price { font-size: 15px; }
.hcard .book-title { -webkit-line-clamp: 1; }

/* ------------------------------------------------------------------ الأكثر رواجًا: بانر كبير + قائمة */
.popular { display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.big-banner { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--plate); }
.big-banner img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.big-banner:hover img { transform: scale(1.03); }
.popular .big-banner { min-height: 100%; }
.popular .big-banner img { position: absolute; inset: 0; }
.banner-chip { position: absolute; bottom: 20px; inset-inline-start: 20px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 40px); padding: 10px 16px; border-radius: var(--radius-sm); background: var(--white); color: var(--store-text); font-size: 15px; font-weight: 700; }
.banner-chip .icon { width: 16px; height: 16px; }
.popular-list { display: flex; flex-direction: column; }
.popular-list .section-head { margin-bottom: 24px; }
.vlist { display: flex; flex-direction: column; gap: 12px; max-height: calc(5 * 116px + 4 * 12px); overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.vlist::-webkit-scrollbar { display: none; }
.vlist .hcard { scroll-snap-align: start; height: 116px; flex: none; }

/* ------------------------------------------------------------------ المختارات بالتبويبات */
.tab-panes { margin-top: 32px; }

/* ------------------------------------------------------------------ مجموعة مختارة: كتابٌ واحد كبير في كلّ مرّة بجانب صورة */
.collection { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: clamp(28px, 4vw, 48px); align-items: stretch; }
.collection-text { display: flex; flex-direction: column; min-width: 0; }
.collection-text .section-head { margin-bottom: 24px; }
.one-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1; }
.one-track::-webkit-scrollbar { display: none; }
.feature-book { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(18px, 2.4vw, 32px); border-radius: var(--radius-lg); background: var(--plate); }
.feature-media { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.08; border-radius: var(--radius); background: var(--white); }
.feature-media > a { width: 60%; }
.feature-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 16px 34px rgba(24, 29, 37, .22), 0 3px 8px rgba(24, 29, 37, .14); transition: transform .35s; }
.feature-book:hover .feature-media img { transform: translateY(-4px); }
.feature-media .type-dot { position: absolute; bottom: 12px; inset-inline-start: 12px; }
.feature-media .book-badges { top: 12px; inset-inline-start: 12px; }
.feature-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feature-body .book-title { font-size: clamp(22px, 2vw, 28px); font-weight: 700; line-height: 1.3; }
.feature-body .book-author { font-size: 15px; }
.feature-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }
.feature-foot .price { font-size: 22px; font-weight: 800; }
.feature-desc { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.8; color: var(--muted); }
.collection-text .cdots { margin-top: 16px; }
.collection .big-banner { min-height: 100%; }
.collection .big-banner img { position: absolute; inset: 0; }

/* ------------------------------------------------------------------ المؤلّفون بأسلوب صفّ الشعارات */
.author-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; align-items: center; }
.author-chip { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; padding: 10px 0; color: var(--muted-2); transition: color .2s; }
.author-chip:hover { color: var(--store-text); }
.author-chip img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; filter: grayscale(1); transition: filter .2s; flex: none; }
.author-chip:hover img { filter: none; }
.author-chip h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.author-chip small { display: block; font-size: 12px; font-weight: 400; }

/* ------------------------------------------------------------------ آراء القرّاء */
.carousel { position: relative; }
.ctrack { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.ctrack::-webkit-scrollbar { display: none; }
.ctrack > * { flex: 0 0 calc((100% - 32px) / 3); scroll-snap-align: start; }
.carousel > .round-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.carousel > [data-prev] { inset-inline-start: -20px; }
.carousel > [data-next] { inset-inline-end: -20px; }
.cdots { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.cdots button { width: 18px; height: 18px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.cdots button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #B7BEC9; }
.cdots button[aria-current="true"]::before { background: var(--store-text); }
.review-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius); background: var(--white); }
.review-head { display: flex; align-items: center; gap: 16px; }
.review-head img { width: 44px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: var(--shadow-cover); flex: none; }
.review-head b { display: block; font-size: 16px; font-weight: 700; }
.review-card p { font-size: 15px; color: var(--muted); line-height: 1.75; }
.review-card small { font-size: 13px; color: var(--muted-2); }

/* ------------------------------------------------------------------ بانران متجاوران */
.banner-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.banner-pair .big-banner { aspect-ratio: 16 / 10; }

/* ------------------------------------------------------------------ التذييل */
.site-footer { border-top: 1px solid var(--line); padding-top: 56px; background: var(--white); }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.7fr); gap: 32px; }
.footer-col h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.footer-col li a { display: inline-block; padding: 4px 0; font-size: 15px; color: var(--muted); }
.footer-col li a:hover { color: var(--store-text); }
.footer-news p { font-size: 15px; color: var(--muted); }
.news-field { position: relative; margin-top: 14px; }
.news-field input { width: 100%; height: 50px; padding-inline: 18px 54px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; background: var(--white); }
.news-field input:focus { outline: none; border-color: var(--store-primary); }
.news-field button { position: absolute; inset-inline-end: 5px; top: 5px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: var(--store-primary); color: var(--white); }
.footer-contact { display: grid; gap: 8px; margin-top: 20px; font-size: 15px; color: var(--muted); }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact .icon { width: 17px; height: 17px; }
.social { display: flex; gap: 6px; margin-top: 40px; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--store-text); }
.social a:hover { background: var(--plate); }
.social .icon { width: 18px; height: 18px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 16px; padding: 22px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.footer-legal ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-legal ul a:hover { color: var(--store-text); }
.pay-icons { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.pay-icons .icon { width: 30px; height: 22px; stroke-width: 1.4; }

/* ------------------------------------------------------------------ رأس الصفحات الداخليّة */
.page-head { padding: 28px 0 8px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: #9AA1AC; }
.breadcrumb a:hover { color: var(--store-text); }
.breadcrumb [aria-current] { color: var(--store-text); }
.page-title-row { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.page-title-row h1 { font-size: 34px; font-weight: 700; line-height: 1.25; }
.page-title-row .cat-thumb { width: 56px; height: 56px; border-radius: 50%; background: var(--plate); display: grid; place-items: center; overflow: hidden; flex: none; }
.page-title-row .cat-thumb img { width: 46%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.page-lead { margin-top: 6px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ------------------------------------------------------------------ التصنيف */
.listing { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px; align-items: start; }
.filters-head { display: none; }
.acc { border-bottom: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .icon { width: 18px; height: 18px; transition: transform .2s; }
.acc[open] summary .icon { transform: rotate(180deg); }
.acc-body { padding-bottom: 18px; }
.scroll-list { max-height: 214px; overflow-y: auto; padding-inline-end: 6px; }
.cat-links a { display: flex; justify-content: space-between; padding: 5px 0; font-size: 15px; }
.cat-links a span { font-size: 13px; color: var(--muted-2); }
.cat-links a[aria-current="page"] { font-weight: 700; }
.range { position: relative; height: 28px; margin: 6px 0 14px; }
.range-track { position: absolute; inset-inline: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--line); }
.range-fill { position: absolute; top: 0; bottom: 0; background: var(--store-primary); border-radius: 2px; }
.range input[type="range"] { position: absolute; inset: 0; width: 100%; height: 28px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--store-primary); background: var(--white); pointer-events: auto; cursor: pointer; }
.range input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--store-primary); background: var(--white); pointer-events: auto; cursor: pointer; }
.range input[type="range"]::-webkit-slider-runnable-track { background: none; }
.range-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.range-fields span { color: var(--muted); }
.search-mini { position: relative; margin-bottom: 10px; }
.search-mini input { padding-inline-start: 38px; min-height: 40px; font-size: 14px; }
.search-mini .icon { position: absolute; inset-inline-start: 12px; top: 11px; width: 17px; height: 17px; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.active-filters .pill { min-height: 34px; padding: 0 14px; font-size: 14px; }
.active-filters .pill .icon { width: 14px; height: 14px; }
.clear-all { font-size: 14px; color: var(--store-text); text-decoration: underline; text-underline-offset: 3px; }
.toolbar-end { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.toolbar-end b { color: var(--store-text); font-weight: 700; }
.toolbar-end select { width: auto; min-height: 40px; font-size: 14px; }
.filters-toggle { display: none; }
.grid-items { display: contents; }
.inline-banner { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 24px; border-radius: var(--radius); overflow: hidden; background: var(--store-primary-dark); color: var(--white); order: 1; min-height: 100%; }
.inline-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inline-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(22, 23, 42, .78), rgba(22, 23, 42, 0) 60%); }
.inline-banner > :not(img) { position: relative; z-index: 1; }
.inline-banner h3 { font-size: 22px; font-weight: 700; line-height: 1.35; }
.inline-banner p { font-size: 14px; }
.inline-banner .btn { align-self: flex-start; margin-top: 10px; }
.listing-grid .grid-items > :nth-child(n+6) { order: 2; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 48px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 50%; font-size: 15px; font-weight: 500; }
.pagination a:hover { background: var(--plate); }
.pagination [aria-current="page"] { background: var(--store-primary); color: var(--white); }
.pagination .gap { color: var(--muted); }
.pagination .round-btn { border-radius: 50%; }

/* ------------------------------------------------------------------ صفحة الكتاب */
.pdp { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; margin-top: 22px; }
.gallery-main { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.02; border-radius: var(--radius-lg); background: var(--plate); }
.gallery-main img { width: 54%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 18px 40px rgba(24, 29, 37, .22), 0 3px 8px rgba(24, 29, 37, .14); }
.gallery-main .type-dot { position: absolute; bottom: 18px; inset-inline-start: 18px; width: 38px; height: 38px; }
.gallery-main .type-dot .icon { width: 20px; height: 20px; }
.thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.thumbs button { display: grid; place-items: center; aspect-ratio: 1.6; padding: 0; border: 1px solid transparent; border-radius: var(--radius); background: var(--plate); }
.thumbs button[aria-pressed="true"] { border-color: var(--store-primary); }
.thumbs img { width: 30%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: var(--shadow-cover); }
.pdp-info { display: flex; flex-direction: column; gap: 14px; }
.pdp-info .rating a { text-decoration: underline; text-underline-offset: 3px; }
.pdp-info h1 { font-size: 34px; font-weight: 700; line-height: 1.3; }
.pdp-author { font-size: 16px; color: var(--muted); }
.pdp-author a { color: var(--store-text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.pdp-lead { color: var(--muted); }
.pdp-lead a { color: var(--store-text); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.opt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.opt-row > span:first-child { font-size: 15px; color: var(--muted); min-width: 64px; }
.opt-row .pill { min-height: 36px; padding: 0 16px; font-size: 14px; }
.pdp-buttons { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 12px; margin-top: 6px; }
.pdp-buttons:has(.qty) { grid-template-columns: auto minmax(0, 1fr) 52px; }
.pdp-buttons .qty { height: 52px; }
.pdp-buttons .btn-primary { min-height: 52px; }
.pdp-buttons .wish-square { width: 52px; height: 52px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); display: grid; place-items: center; padding: 0; }
.pdp-buttons .wish-square[aria-pressed="true"] { color: var(--store-accent); }
.pdp-buttons .wish-square[aria-pressed="true"] .icon { fill: currentColor; }
.pdp-buttons .btn-outline { grid-column: 1 / -1; min-height: 50px; }
.stock-line { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: #1F6B45; }
.stock-line::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.perks { display: grid; gap: 10px; padding: 16px 0 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks b { color: var(--store-text); font-weight: 500; }
.meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.meta-item { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--plate); }
.meta-item small { display: block; font-size: 13px; color: var(--muted); }
.meta-item b { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.sample-box { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px dashed #C3CAD4; border-radius: var(--radius); }
.sample-box > .icon { width: 28px; height: 28px; color: var(--store-primary); }
.sample-box div { flex: 1; min-width: 0; }
.sample-box b { display: block; font-size: 15px; }
.sample-box p { font-size: 14px; color: var(--muted); }
.wave { display: flex; align-items: center; gap: 3px; height: 36px; flex: none; }
.wave span { width: 3px; border-radius: 2px; background: var(--type-audio); }

.details { margin-top: 64px; }
.details .pill-tabs { justify-content: flex-start; }
.details-panel { margin-top: 28px; }
.prose p + p { margin-top: 12px; }
.prose { max-width: 780px; color: var(--muted); font-size: 16px; line-height: 1.85; }
.spec-table { width: 100%; max-width: 780px; border-collapse: collapse; font-size: 15px; }
.spec-table th, .spec-table td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: start; }
.spec-table th { width: 36%; font-weight: 500; color: var(--muted); }
.reviews-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
.reviews-summary { padding: 24px; border-radius: var(--radius); background: var(--plate); }
.reviews-summary strong { display: block; font-size: 44px; font-weight: 800; line-height: 1; }
.rating-bars { display: grid; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.rating-bars li { display: grid; grid-template-columns: 52px minmax(0, 1fr) 34px; align-items: center; gap: 8px; }
.rating-bars .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rating-bars .bar span { display: block; height: 100%; background: var(--gold); }
.review-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.review-list { display: grid; gap: 16px; }
.review-list .review-card { padding: 22px 0; border-radius: 0; border-bottom: 1px solid var(--line); }
.review-list .review-card:first-child { padding-top: 0; }
.review-form { display: grid; gap: 12px; margin-top: 8px; padding: 22px; border-radius: var(--radius); background: var(--plate); }
.review-form h3 { font-size: 17px; font-weight: 700; }
.review-form p { font-size: 14px; color: var(--muted); }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #C9CFD8; }
.star-input label .icon { width: 24px; height: 24px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary); outline-offset: 2px; border-radius: 4px; }
.review-form .btn { justify-self: start; }

/* ------------------------------------------------------------------ المؤلّف */
.author-hero { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: clamp(28px, 5vw, 64px); align-items: center; margin-top: 22px; }
.author-text { text-align: center; max-width: 520px; margin-inline: auto; }
.author-text h1 { font-size: 40px; font-weight: 700; line-height: 1.25; }
.author-text .prose { margin-top: 16px; color: var(--muted); }
.author-stats { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.author-stats div { min-width: 120px; padding: 14px 18px; border-radius: var(--radius); background: var(--plate); }
.author-stats b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.author-stats small { font-size: 13px; color: var(--muted); }
.author-photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1; background: var(--plate); max-width: 620px; width: 100%; justify-self: end; }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-text .social { justify-content: center; margin-top: 18px; }

/* ------------------------------------------------------------------ السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { padding: 0 0 14px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--muted); text-align: start; }
.cart-table td { padding: 20px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table td + td, .cart-table th + th { padding-inline-start: 16px; }
.cart-book { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cart-thumb { position: relative; display: grid; place-items: center; width: 88px; height: 100px; border-radius: var(--radius-sm); background: var(--plate); flex: none; }
.cart-thumb img { width: 52px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: var(--shadow-cover); }
.cart-thumb .type-dot { position: absolute; bottom: -4px; inset-inline-start: -4px; }
.cart-book h3 { font-size: 15px; font-weight: 500; line-height: 1.45; }
.cart-book p { font-size: 13px; color: var(--muted-2); }
.qty { display: inline-flex; align-items: center; height: 42px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qty button { width: 36px; height: 100%; padding: 0; border: 0; background: none; font-size: 18px; }
.qty input { width: 36px; height: 100%; border: 0; text-align: center; font-size: 15px; background: none; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cart-remove { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.cart-remove:hover { background: var(--plate); color: var(--danger); }
.cart-under { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 22px; }
.summary { padding: 28px; border-radius: var(--radius-lg); background: var(--plate); display: grid; gap: 14px; }
.summary h2 { font-size: 22px; font-weight: 700; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--muted); }
.summary-row b, .summary-row span:last-child { color: var(--store-text); }
.summary-row b { font-weight: 700; }
.summary-total { padding-top: 14px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 800; color: var(--store-text); }
.coupon { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--white); font-size: 14px; }
.coupon-applied button { padding: 0; border: 0; background: none; font-size: 14px; text-decoration: underline; color: var(--store-text); }
.summary .note { font-size: 13px; color: var(--muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 6px; }
.summary .note .icon { width: 15px; height: 15px; }
.empty-cart { display: grid; justify-items: center; gap: 12px; padding: 48px 24px; border-radius: var(--radius-lg); background: var(--plate); text-align: center; }
.empty-cart p { color: var(--muted); }

/* ------------------------------------------------------------------ 404 */
.nf {
	display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 32px;
	padding: clamp(32px, 5vw, 72px); border-radius: 24px; margin-top: 22px;
	background: linear-gradient(120deg, color-mix(in srgb, var(--store-accent) 20%, #FFFFFF), #F1F0F7 55%, color-mix(in srgb, var(--store-primary) 14%, #FFFFFF));
}
body[data-corners="sharp"] .nf { border-radius: 0; }
.nf .eyebrow { font-size: 15px; font-weight: 700; color: var(--store-text); }
.nf h1 { font-size: clamp(32px, 3.4vw, 48px); font-weight: 800; line-height: 1.2; }
.nf p { margin-top: 12px; color: var(--muted); max-width: 460px; }
.nf .news-field { max-width: 460px; margin-top: 24px; }
.nf svg.art { width: 100%; max-width: 360px; height: auto; justify-self: center; }
.nf-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.nf-link { display: flex; align-items: center; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s; }
.nf-link:hover { border-color: var(--store-primary); }
.nf-link div { flex: 1; min-width: 0; }
.nf-link h2 { font-size: 17px; font-weight: 700; }
.nf-link p { font-size: 14px; color: var(--muted); }

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

/* ------------------------------------------------------------------ components.html */
.kit-section { padding: 40px 0; border-bottom: 1px solid var(--line); }
.kit-section > .container > h2 { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 20px; letter-spacing: .02em; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.kit-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.kit-label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.kit-options { display: flex; flex-wrap: wrap; gap: 16px; }
.kit-options label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.kit-options select { min-width: 160px; }

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

/* ------------------------------------------------------------------ عروض الشاشة */
@media (max-width: 1199px) {
	.container { --gutter: 20px; }
	.nav-list { gap: 22px; }
	.cat-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
	.author-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.carousel > [data-prev] { inset-inline-start: -8px; }
	.carousel > [data-next] { inset-inline-end: -8px; }
}

@media (max-width: 991px) {
	.section { padding: 56px 0; }
	.section-title { font-size: 27px; }
	.menu-toggle { display: inline-grid; }
	.header-help, .header-end .hide-md { display: none; }
	.header-top .container { display: flex; gap: 8px; min-height: 64px; }
	.header-end { margin-inline-start: auto; }
	.brand-name { font-size: 24px; }
	.brand img { width: 34px; height: 34px; }
	.header-nav .container { display: block; min-height: 0; padding-block: 0 12px; }
	.header-nav .cat-toggle, .header-nav .nav-list { display: none; }
	.header-search { width: 100%; }
	.header-nav { border-bottom: 1px solid var(--line); }
	body { --cols-md: min(var(--cols), 3); }
	.book-grid { grid-template-columns: repeat(min(var(--cols), 3), minmax(0, 1fr)); gap: 28px 18px; }
	.listing-grid { grid-template-columns: repeat(min(var(--cols), 3), minmax(0, 1fr)); }
	.popular { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
	.collection { grid-template-columns: 1fr; }
	.collection .big-banner { min-height: 0; aspect-ratio: 16 / 7; }
	.collection .big-banner img { object-position: center 60%; }
	.ctrack > * { flex-basis: calc((100% - 16px) / 2); }
	.footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.footer-news { grid-column: 1 / -1; }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(340px, 90vw);
		padding: 18px 22px; overflow-y: auto; background: var(--white);
		transform: translateX(105%); visibility: hidden; transition: transform .3s, visibility .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head { display: flex; align-items: center; justify-content: space-between; }
	.filters-head h2 { font-size: 20px; font-weight: 700; }
	.filters-toggle { display: inline-flex; }
	.pdp { grid-template-columns: 1fr; }
	.reviews-layout { grid-template-columns: 1fr; }
	.author-hero { grid-template-columns: 1fr; }
	.author-photo { order: -1; max-width: 420px; justify-self: center; }
	.cart-layout { grid-template-columns: 1fr; }
	.nf { grid-template-columns: 1fr; }
	.nf svg.art { max-width: 240px; order: -1; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.container { --gutter: 16px; }
	.section { padding: 44px 0; }
	.section-head { margin-bottom: 22px; }
	.section-title { font-size: 23px; }
	.announce { font-size: 13px; }
	.announce .container { padding-inline: 44px; }
	.slide { min-height: 0; }
	.slide > img { position: static; height: auto; aspect-ratio: 16 / 9; object-position: left center; }
	.slide-text { min-height: 0; padding-block: 22px 54px; }
	.slide-text > * { max-width: 100%; }
	.slide-text .eyebrow { font-size: 16px; margin-bottom: 6px; }
	.slide-text .btn { margin-top: 20px; }
	.slider-dots { bottom: 18px; }
	/* شريط الثقة شريطٌ واحد رفيع يُمرَّر بالإصبع */
	.trust-bar { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
	.trust-bar::-webkit-scrollbar { display: none; }
	.trust-item { flex: 0 0 auto; gap: 10px; padding: 12px 0; padding-inline-end: 18px; scroll-snap-align: start; }
	.trust-item + .trust-item { padding-inline-start: 18px; }
	.trust-icon { width: 36px; height: 36px; }
	.trust-icon .icon { width: 18px; height: 18px; }
	.trust-item h3 { font-size: 14px; white-space: nowrap; }
	.trust-item p { font-size: 12.5px; white-space: nowrap; }
	.cat-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 14px; }
	.cat-row::-webkit-scrollbar { display: none; }
	.cat-card { flex: 0 0 104px; scroll-snap-align: start; }
	.book-grid, .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
	.book-media .type-dot { bottom: 8px; inset-inline-start: 8px; width: 26px; height: 26px; }
	.book-badges { top: 8px; inset-inline-start: 8px; }
	.popular { grid-template-columns: 1fr; }
	.popular .big-banner { min-height: 0; aspect-ratio: 16 / 7; }
	.popular .big-banner img { object-position: center 70%; }
	.vlist { max-height: calc(3 * 116px + 2 * 12px); }
	.hcard { padding: 12px 14px; gap: 14px; }
	.author-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
	.author-chip { justify-content: flex-start; }
	.author-chip h3 { font-size: 16px; }
	.author-chip img { width: 38px; height: 38px; }
	.ctrack > * { flex-basis: 86%; }
	.carousel > .round-btn { display: none; }
	.review-card { padding: 22px; }
	.banner-pair { gap: 10px; }
	.footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
	.footer-bottom { flex-direction: column; align-items: flex-start; }
	.page-title-row h1 { font-size: 26px; }
	.toolbar { align-items: stretch; }
	.toolbar-end { width: 100%; justify-content: space-between; flex-wrap: wrap; }
	.listing-grid .inline-banner { grid-column: 1 / -1; min-height: 220px; }
	.pdp-info h1 { font-size: 26px; }
	.meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sample-box { flex-wrap: wrap; }
	.sample-box .btn { width: 100%; }
	.details { margin-top: 44px; }
	.details .pill-tabs [role="tab"] { padding: 0 14px; }
	.author-text h1 { font-size: 30px; }
	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody { display: block; }
	.cart-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
	.cart-table td { display: block; padding: 0 !important; border: 0; }
	.cart-table td:first-child { grid-column: 1 / -1; }
	.cart-table td[data-label="السعر"] { display: none; }
	.cart-table td[data-label="الإجمالي"] { align-self: center; }
	.cart-table .cell-remove { grid-column: 2; grid-row: 1; align-self: start; }
	.cart-table td:first-child { grid-column: 1; grid-row: 1; }
	.summary { padding: 22px; }
	.nf-links { grid-template-columns: 1fr; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
}

@media (max-width: 767px) {
	.banner-chip { bottom: 10px; inset-inline-start: 10px; max-width: calc(100% - 20px); padding: 7px 10px; font-size: 13px; }
	.banner-chip .icon { width: 13px; height: 13px; }
}

@media (max-width: 991px) {
	.gallery { width: 100%; max-width: 520px; margin-inline: auto; }
}

/* السلايدر مكدَّس من عرض الجهاز اللوحيّ: الصورة فوق والنصّ تحتها */
@media (max-width: 991px) {
	.slide { min-height: 0; }
	.slide > img { position: static; height: auto; aspect-ratio: 16 / 8; object-position: left center; }
	.slide-text { min-height: 0; padding-block: 26px 60px; }
	.slide-text > * { max-width: 100%; }
	.slider-dots { bottom: 20px; }
}

@media (min-width: 768px) and (max-width: 991px) {
	.trust-item { flex-direction: column; text-align: center; gap: 8px; padding: 18px 10px; }
}

/* ==================================================================
   ميزات المنصّة المعتمدة: العرض محدود المدّة، واختيار النسخة
   ================================================================== */
.offer-bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px;
	padding: 14px 18px; background: var(--plate); border: 1px solid var(--line); border-radius: var(--radius);
}
.offer-bar[hidden] { display: none; }
.offer-head { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.offer-head .icon { width: 20px; height: 20px; color: var(--store-accent); }
.countdown { display: flex; gap: 8px; direction: rtl; }
.countdown span {
	display: flex; flex-direction: column; align-items: center; min-width: 56px; padding: 6px 4px;
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.countdown b { font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.countdown small { font-size: 12px; color: var(--muted); }
.fmt-row .fmt { display: inline-flex; flex-direction: column; justify-content: center; gap: 0; min-height: 52px; padding: 4px 18px; line-height: 1.35; }
.fmt-row .fmt span:first-child { font-size: 14.5px; font-weight: 700; }
.fmt-row .fmt-price { font-size: 13px; color: var(--muted); }
.fmt-row .fmt.is-active .fmt-price { color: inherit; opacity: .85; }
@media (max-width: 560px) {
	.countdown { width: 100%; }
	.countdown span { flex: 1; min-width: 0; }
	.fmt-row > span:first-child { flex-basis: 100%; }
	.fmt-row .fmt { padding: 4px 14px; }
}

/* ==================================================================
   الإصدار الثاني: صفوفٌ ممتلئة، ودوّارات، والعروض، والمدوّنة
   ================================================================== */

/* صفوفٌ ممتلئة: لا يبقى صفٌّ نصف فارغ مهما كان عدد الكتب في الصفّ */
.tabs-section .book-grid > :nth-child(n+9) { display: none; }
body[data-books-per-row="3"] .tabs-section .book-grid > :nth-child(n+7),
body[data-books-per-row="6"] .tabs-section .book-grid > :nth-child(n+7) { display: none; }
body[data-books-per-row="5"] .tabs-section .book-grid > :nth-child(n+6) { display: none; }
.book-grid.row4 { grid-template-columns: repeat(min(max(var(--cols), 3), 4), minmax(0, 1fr)); }
body[data-books-per-row="3"] .book-grid.row4 > :nth-child(n+4) { display: none; }
@media (min-width: 992px) { .listing-grid { grid-template-columns: repeat(min(var(--cols), 4), minmax(0, 1fr)); } }

/* الدوّار الأفقيّ: عروض الموسم وأعمال المؤلّف */
.rail-track {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--cols) - 1) * 24px) / var(--cols)); gap: 24px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }
.rail-tools { width: auto; flex-wrap: nowrap; }

/* عروض الموسم: شريطٌ بلون الحرير الورديّ وعدّادٌ واحد */
.deal-section { background: color-mix(in srgb, var(--store-accent) 16%, var(--white)); }
.deal-section .book-media, .tabs-section .book-media { background: var(--white); }
.deal-section .section-sub { color: var(--store-text); }
.deal-head { align-items: flex-end; }
.deal-side { display: flex; align-items: center; gap: 18px; }
.deal-side .countdown span { border-color: transparent; box-shadow: 0 1px 2px rgba(24, 29, 37, .06); }

/* المؤلّفون: شريطٌ رماديّ رفيع بأسلوب صفّ الشعارات */
.section.authors-band { padding: 26px 0; }

/* المدوّنة */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; min-width: 0; }
.post-media { display: block; border-radius: var(--radius); overflow: hidden; background: var(--plate); aspect-ratio: 16 / 9; }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-media img { transform: scale(1.03); }
.post-body { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; }
.post-date { font-size: 13px; color: var(--muted); }
.post-title { font-size: 18px; font-weight: 700; line-height: 1.45; }
.post-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-excerpt { font-size: 15px; line-height: 1.75; color: var(--muted); }
.post-grid.is-blog { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.post-grid.is-blog .post-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.post-grid.is-blog .post-card:first-child .post-title { font-size: 26px; }
.blog-head h1 { margin-top: 18px; font-size: 34px; font-weight: 700; line-height: 1.25; }
.blog-head p { margin-top: 6px; color: var(--muted); }
.article-wrap { max-width: 820px; }
.article-head { margin-top: 22px; }
.article-title { margin-top: 6px; font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.25; }
.article-img { width: 100%; margin-top: 24px; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; object-fit: cover; }
.article-body { max-width: none; margin-top: 28px; }
.article-body h2 { margin-top: 28px; font-size: 22px; font-weight: 700; color: var(--store-text); }
.article-body h2 + p { margin-top: 8px; }
.article-body blockquote { margin: 24px 0; padding: 18px 22px; border-inline-start: 3px solid var(--store-accent); border-radius: var(--radius-sm); background: var(--plate); font-size: 18px; color: var(--store-text); }
.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }

/* التصنيف: العرض شبكةً أو قائمة */
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.view-switch button { display: grid; place-items: center; width: 40px; height: 38px; padding: 0; border: 0; background: var(--white); color: var(--muted); }
.view-switch button + button { border-inline-start: 1px solid var(--line); }
.view-switch button[aria-pressed="true"] { background: var(--store-primary); color: var(--white); }
.listing-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.listing-grid.is-list .book-card { flex-direction: row; align-items: center; gap: 22px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.listing-grid.is-list .book-media { width: 150px; flex: none; }
.listing-grid.is-list .book-body { padding-top: 0; }
.listing-grid.is-list .book-foot { justify-content: flex-start; gap: 18px; margin-top: 6px; }
.listing-grid.is-list .inline-banner { min-height: 200px; }

@media (max-width: 991px) {
	body[data-books-per-row] .tabs-section .book-grid > :nth-child(-n+6) { display: flex; }
	.tabs-section .book-grid > :nth-child(n+7) { display: none; }
	.book-grid.row4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 14px; }
	body[data-books-per-row="3"] .book-grid.row4 > :nth-child(4) { display: flex; }
	.rail-track { grid-auto-columns: calc((100% - 2 * 18px) / 3); gap: 18px; }
	.feature-book { grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); }
	.post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
	.post-grid.is-blog .post-card:first-child { grid-template-columns: 1fr; gap: 0; }
	.deal-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 767px) {
	body[data-books-per-row] .tabs-section .book-grid > :nth-child(-n+8) { display: flex; }
	.book-grid.row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
	.rail-track { grid-auto-columns: 46%; gap: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
	.deal-side { width: 100%; }
	.deal-side .countdown { flex: 1; width: auto; }
	.deal-side .head-arrows, .rail-tools .head-arrows { display: none; }
	.feature-book { grid-template-columns: 1fr; padding: 16px; }
	.feature-media { aspect-ratio: 16 / 11; }
	.feature-media > a { width: 36%; }
	.feature-desc { margin-top: 10px; padding-top: 10px; font-size: 14px; }
	.collection-text .head-arrows { display: none; }
	.post-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 14px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
	.post-grid::-webkit-scrollbar { display: none; }
	.post-grid > .post-card { flex: 0 0 80%; scroll-snap-align: start; }
	.post-grid.is-blog { display: grid; grid-template-columns: 1fr; margin-inline: 0; padding-inline: 0; gap: 32px; }
	.post-grid.is-blog .post-card:first-child .post-title { font-size: 21px; }
	.blog-head h1 { font-size: 27px; }
	.listing-grid.is-list .book-media { width: 104px; }
	.listing-grid.is-list .book-card { gap: 12px; padding: 10px; }
	.view-switch { display: none; }
	.section.authors-band { padding: 20px 0; }
	.cart-btn { width: 34px; height: 34px; }
	.cart-btn .icon { width: 16px; height: 16px; }
	.book-foot { gap: 4px; }
	.book-foot .price { font-size: 14.5px; gap: 2px 5px; }
	.book-foot .price del { font-size: 11.5px; }
	.book-actions { top: 4px; inset-inline-end: 4px; gap: 4px; }
	.book-actions .icon-btn { width: 34px; height: 34px; }
}

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

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