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

:root {
	/* ألوان الهويّة: يختارها الناشر (قيمٌ تجريبيّة) */
	--store-primary: #FFC000;
	--store-primary-dark: #D9A300;
	--store-accent: #272727;
	--store-bg: #FFFFFF;
	--store-text: #333333;

	/* محايدات */
	--ink: #1f1f1f;
	--muted: #5f5f5f;
	--line: #e7e7e7;
	--grey: #f6f6f6;
	--tile: #f1f1f1;
	--on-dark: #ffffff;
	--on-dark-muted: #c4c4c4;
	--warm: color-mix(in srgb, var(--store-accent) 78%, #8a8273);
	--star: #F5B301;

	--container: 1170px;
	--gutter: 20px;
	--sec: 88px;
	--sk: 13px; /* مقدار ميل الأزرار */
	--bpr: 4;
	--bpr-side: 3;
	--gap: 26px;
	--strip: 42px; /* ارتفاع شريط السلّة على البطاقة */
	--font: 'Tajawal', system-ui, sans-serif;
}

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.75;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: clip;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.35; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
mark { background: linear-gradient(transparent 55%, var(--store-primary) 55%); color: inherit; padding: 0 2px; }
:focus-visible { outline: 2px solid var(--store-accent); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--store-accent); color: var(--on-dark); padding: 8px 14px; }
.skip-link:focus { top: 8px; }

.section { padding-block: var(--sec); }
.section-grey { background: var(--grey); }
.section-top-0 { padding-top: 0; }

/* ------------------------------------------------------------------
   الأزرار: المصمتة مائلة، وذات الإطار مستطيلة
   ------------------------------------------------------------------ */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 30px;
	border: 0; border-radius: 0;
	font-weight: 700; font-size: .92rem; line-height: 1.2; white-space: nowrap;
	transition: background-color .2s, color .2s, border-color .2s;
}
.btn .icon { width: 17px; height: 17px; }
.btn-sm { min-height: 36px; padding: 7px 18px; font-size: .84rem; }
.btn-lg { min-height: 50px; padding: 12px 40px; font-size: .98rem; }
.btn-block { width: 100%; }
.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(--on-dark); }
.btn-dark:hover { background: color-mix(in srgb, var(--store-accent) 85%, #fff); }
.btn-grey { background: #ececec; color: var(--ink); }
.btn-grey:hover { background: #dedede; }
.btn-light { background: #fff; color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--store-accent); }
.btn-outline:hover { background: var(--store-accent); color: var(--on-dark); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* الميل: متوازي أضلاع منعكس لليمين إلى اليسار */
[data-button-shape="skew"] :is(.btn-primary, .btn-dark, .btn-grey, .btn-light) {
	clip-path: polygon(0 0, calc(100% - var(--sk)) 0, 100% 100%, var(--sk) 100%);
	padding-inline: calc(30px + var(--sk));
}
[data-button-shape="skew"] :is(.btn-primary, .btn-dark, .btn-grey, .btn-light).btn-sm { padding-inline: calc(16px + var(--sk)); }
[data-button-shape="skew"] :is(.btn-primary, .btn-dark, .btn-grey, .btn-light):focus-visible { clip-path: none; }

.icon-btn {
	display: inline-grid; place-items: center; width: 42px; height: 42px;
	background: transparent; border: 0; color: var(--ink); position: relative;
}
.icon-btn:hover { color: #000; background: var(--grey); }
.icon-btn .icon { width: 20px; height: 20px; }
.sq-btn {
	display: inline-grid; place-items: center; width: 38px; height: 38px;
	background: #d6d6d6; color: var(--ink); border: 0;
}
.sq-btn:hover { background: var(--store-primary); color: var(--store-accent); }

/* الفاصل الأصفر المائل */
.skew-bar {
	display: block; width: 62px; height: 10px; margin: 14px auto 0;
	background: var(--store-primary);
	clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 8px 100%);
}
.skew-bar-lg { width: 150px; height: 16px; }

.field {
	width: 100%; min-height: 44px; padding: 8px 14px;
	border: 1px solid #d4d4d4; border-radius: 0; background: #fff; color: var(--ink);
}
.field:focus { outline: 2px solid var(--store-primary); outline-offset: -1px; border-color: var(--store-accent); }
select.field { padding-inline-end: 32px; }

/* ------------------------------------------------------------------
   عنوان القسم
   ------------------------------------------------------------------ */
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.sec-title { font-size: 1.85rem; font-weight: 800; color: var(--ink); }
.sec-sub { margin-top: 16px; color: var(--muted); font-size: .95rem; }
.sec-head-light .sec-title { color: var(--on-dark); }
.sec-head-light .sec-sub { color: var(--on-dark-muted); }

/* ------------------------------------------------------------------
   الشريط العلويّ والرأس
   ------------------------------------------------------------------ */
.topbar { border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--ink); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.top-links { display: flex; gap: 22px; }
.top-links a, .top-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.top-links a:hover, .top-phone:hover { text-decoration: underline; text-decoration-color: var(--store-primary); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.top-links .icon, .top-phone .icon { width: 15px; height: 15px; }
.top-side { display: flex; align-items: center; gap: 18px; }
.top-social { display: flex; border-inline-start: 1px solid var(--line); }
.top-social a { display: grid; place-items: center; width: 32px; height: 40px; }
.top-social a:hover { background: var(--store-primary); color: var(--store-accent); }
.top-social .icon { width: 14px; height: 14px; }

/* الرأس ثابتٌ أعلى الشاشة؛ الشريط العلويّ يمرّ */
.site-header { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-size: 1.3rem; font-weight: 800; color: var(--ink); line-height: 1; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.brand-light .brand-name { color: var(--on-dark); border-color: var(--on-dark); }

.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav > ul > li > a, .main-nav > ul > li > button {
	position: relative; display: inline-flex; align-items: center; gap: 4px;
	padding: 34px 14px; background: none; border: 0; font-weight: 700; font-size: .92rem; color: var(--ink);
}
.main-nav > ul > li > a::after, .main-nav > ul > li > button::after {
	content: ''; position: absolute; inset-inline: 14px; bottom: 26px; height: 3px;
	background: var(--store-primary); transform: scaleX(0); transition: transform .2s;
}
.main-nav > ul > li > a:hover::after, .main-nav > ul > li > button:hover::after, .main-nav .has-drop.open > button::after { transform: scaleX(1); }
.main-nav .icon { width: 15px; height: 15px; }
.has-drop { position: relative; }
.drop {
	position: absolute; top: 100%; inset-inline-start: 0; min-width: 220px;
	background: #fff; border-top: 3px solid var(--store-primary); box-shadow: 0 14px 30px rgb(0 0 0 / .1);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
}
.has-drop:hover .drop, .has-drop:focus-within .drop, .has-drop.open .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: block; padding: 11px 20px; font-size: .9rem; border-bottom: 1px solid var(--line); }
.drop li:last-child a { border-bottom: 0; }
.drop a:hover { background: var(--grey); padding-inline-start: 26px; }

.header-actions { display: flex; align-items: center; gap: 4px; }
.cart-count {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 4px;
	border-radius: 50%; background: var(--store-primary); color: var(--store-accent);
	font-size: .7rem; font-weight: 800; line-height: 19px; text-align: center;
}
.menu-toggle { display: none; }
.header-search { display: none; border-top: 1px solid var(--line); background: #fff; }
.search-open .header-search { display: block; }
.hs-in { display: flex; gap: 10px; padding-block: 16px; }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgb(0 0 0 / .45); opacity: 0; visibility: hidden; transition: .25s; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(320px, 86vw);
	background: #fff; overflow-y: auto; clip-path: inset(0 0 0 100%); visibility: hidden; transition: clip-path .3s, visibility .3s;
	display: flex; flex-direction: column;
}
.drawer-open .drawer { clip-path: inset(0); visibility: visible; }
.drawer-open .drawer-backdrop:not(.filters-backdrop) { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 3px solid var(--store-primary); }
.drawer-head .brand-name { font-size: 1.1rem; }
.drawer-search { display: flex; gap: 6px; padding: 14px 18px; }
.drawer-nav > li > a, .drawer-label { display: block; padding: 12px 18px; font-weight: 700; border-bottom: 1px solid var(--line); }
.drawer-label { color: var(--muted); font-size: .85rem; }
.drawer-cats a { display: block; padding: 9px 34px 9px 18px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.drawer-contact { margin-top: auto; padding: 18px; display: grid; gap: 10px; background: var(--grey); }
.drawer-contact a { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* ------------------------------------------------------------------
   السلايدر بعرض الصفحة
   ------------------------------------------------------------------ */
.hero { position: relative; background: var(--store-accent); overflow: hidden; }
.slides { display: grid; }
.slide { grid-area: 1 / 1; position: relative; min-height: 560px; display: grid; place-items: center; text-align: center; }
.slider-ready .slide { opacity: 0; visibility: hidden; transition: opacity .8s, visibility .8s; }
.slider-ready .slide.is-active { opacity: 1; visibility: visible; }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ''; position: absolute; inset: 0; background: rgb(18 18 18 / .62); }
.slide-body { position: relative; z-index: 1; max-width: 760px; padding: 80px var(--gutter) 110px; color: var(--on-dark); }
.slide-title { color: var(--on-dark); font-size: 3.4rem; line-height: 1.25; font-weight: 800; }
.slide-text { margin: 20px auto 36px; max-width: 600px; font-size: 1.05rem; color: #f1f1f1; }
.slider-dots { position: absolute; z-index: 2; bottom: 28px; inset-inline: 0; display: flex; justify-content: center; gap: 10px; }
.slider-dots button { width: 28px; height: 6px; padding: 0; border: 0; background: rgb(255 255 255 / .5); clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 100%, 4px 100%); }
.slider-dots button[aria-current="true"] { background: var(--store-primary); width: 44px; }

/* ------------------------------------------------------------------
   ثلاث بطاقات تحت السلايدر
   ------------------------------------------------------------------ */
.trio { padding-block: 44px var(--sec); }
.trio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.trio-pair { display: contents; }
.trio-grid > .trio-card:only-child { max-width: 560px; margin-inline: auto; width: 100%; }
.trio-card { display: flex; flex-direction: column; align-items: flex-start; }
.trio-media { display: block; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: var(--tile); }
.trio-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.trio-card:hover .trio-media img { transform: scale(1.04); }
.trio-title { margin-top: 22px; font-size: 1.08rem; }
.trio-rule { display: block; width: 100%; height: 1px; margin: 12px 0 16px; background: var(--line); position: relative; }
.trio-rule::before { content: ''; position: absolute; inset-inline-start: 0; top: -1px; width: 52px; height: 3px; background: var(--store-primary); }
.trio-text { color: var(--muted); font-size: .92rem; margin-bottom: 20px; }
.trio-card .btn { margin-top: auto; }
.trio-card:hover .btn-outline { background: var(--store-accent); color: var(--on-dark); }

/* ------------------------------------------------------------------
   شريط الثقة: شبكة 3×2 بخطوطٍ رفيعة
   ------------------------------------------------------------------ */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-item { display: flex; gap: 18px; align-items: flex-start; padding: 34px 28px; border-color: #e3e3e3; border-style: solid; border-width: 0; }
.trust-grid > .trust-item:nth-child(-n+3) { border-bottom-width: 1px; }
.trust-grid > .trust-item:not(:nth-child(3n)) { border-inline-end-width: 1px; }
.trust-icon {
	flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
	background: var(--store-primary); color: var(--store-accent);
}
.trust-icon .icon { width: 22px; height: 22px; }
.trust-item h3 { font-size: .98rem; margin-bottom: 6px; }
.trust-item p { color: var(--muted); font-size: .88rem; line-height: 1.7; }
[data-show-trust-bar="false"] .trust-section { display: none; }

/* ------------------------------------------------------------------
   فسيفساء التصنيفات بعرض الصفحة
   ------------------------------------------------------------------ */
.mosaic-section { padding-bottom: 0; }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; display: block; aspect-ratio: 8 / 5; overflow: hidden; background: var(--store-accent); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s, opacity .3s; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgb(15 15 15 / .78), rgb(15 15 15 / .05) 60%); transition: background .3s; }
.tile:hover img { transform: scale(1.05); }
.tile:hover::after { background: rgb(15 15 15 / .55); }
.tile-cap { position: absolute; z-index: 1; inset-inline: 26px; bottom: 22px; display: flex; flex-direction: column; color: var(--on-dark); }
.tile-name { font-size: 1.3rem; font-weight: 800; }
.tile-name::after { content: ''; display: block; width: 46px; height: 7px; margin-top: 8px; background: var(--store-primary); clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 100%, 6px 100%); transition: width .3s; }
.tile:hover .tile-name::after { width: 80px; }
.tile-count { margin-top: 6px; font-size: .88rem; color: #ececec; }

/* ------------------------------------------------------------------
   شريط الدعوة الداكن
   ------------------------------------------------------------------ */
.cta-strip { position: relative; background: var(--warm); overflow: hidden; }
.cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-strip::before { content: ''; position: absolute; inset: 0; z-index: 1; background: var(--warm); opacity: .9; }
.cta-in { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 110px; padding-block: 20px; }
.cta-text { color: var(--on-dark); font-size: 1.15rem; font-weight: 500; }

/* ------------------------------------------------------------------
   بطاقة الكتاب
   ------------------------------------------------------------------ */
.book-card { position: relative; display: flex; flex-direction: column; text-align: center; background: #fff; }
.bc-media { position: relative; overflow: hidden; background: var(--tile); aspect-ratio: 1 / 1.16; display: grid; place-items: center; padding-bottom: var(--strip); }
.bc-cover { display: block; width: 56%; }
.bc-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 10px 22px rgb(0 0 0 / .18); transition: transform .35s; }
.book-card:hover .bc-cover img { transform: translateY(-6px); }
.type-dot {
	position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
	display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff;
	box-shadow: 0 0 0 3px rgb(255 255 255 / .85);
}
.type-dot .icon { width: 16px; height: 16px; }
.type-dot[data-type="print"], .type-mini[data-type="print"] { background: #DB7056; }
.type-dot[data-type="ebook"], .type-mini[data-type="ebook"] { background: #5675A3; }
.type-dot[data-type="audio"], .type-mini[data-type="audio"] { background: #986AB0; }
.type-dot[data-type="educational"], .type-mini[data-type="educational"] { background: #3f8f6b; }
.badge {
	position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2;
	display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%;
	background: var(--store-primary); color: var(--store-accent); font-size: .74rem; font-weight: 800; line-height: 1; white-space: nowrap;
}
.kit-badges .badge { position: static; }
.stock-band {
	position: absolute; z-index: 2; inset-inline: -10px; top: 44%;
	padding: 8px 0; background: var(--store-accent); color: var(--on-dark); font-weight: 700; font-size: .88rem;
	clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 100%, 16px 100%);
}
.is-out .bc-cover img { filter: grayscale(.8); opacity: .75; }
/* زرّ السلّة: شريطٌ أصفر ظاهرٌ دائمًا في أسفل المربّع الرماديّ، والمفضّلة والنظرة السريعة تطفوان فوق الغلاف */
.bc-add {
	position: absolute; z-index: 3; inset-inline: 0; bottom: 0; height: var(--strip);
	display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px;
	border: 0; background: var(--store-primary); color: var(--store-accent); font-weight: 700; font-size: .86rem; white-space: nowrap;
	transition: background-color .2s;
}
.bc-add .icon { width: 17px; height: 17px; }
.bc-add:hover:not([disabled]) { background: var(--store-primary-dark); }
.bc-add[disabled] { background: #e4e4e4; color: #4f4f4f; cursor: not-allowed; }
.bc-tools {
	position: absolute; z-index: 3; inset-inline-end: 10px; bottom: calc(var(--strip) + 10px);
	display: flex; flex-direction: column; gap: 6px; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s;
}
.book-card:hover .bc-tools, .book-card:focus-within .bc-tools { opacity: 1; transform: none; }
@media (hover: none) { .bc-tools { opacity: 1; transform: none; } }
.bc-tool { display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: #fff; color: var(--ink); box-shadow: 0 3px 10px rgb(0 0 0 / .14); }
.bc-tool:hover { background: var(--store-primary); color: var(--store-accent); }
.bc-tool[aria-pressed="true"] { background: var(--store-accent); color: var(--store-primary); }
.bc-tool[aria-pressed="true"] .icon { fill: currentColor; }

.bc-body { display: flex; flex-direction: column; align-items: center; padding: 16px 8px 4px; }
.book-title { font-size: 1rem; font-weight: 700; line-height: 1.5; }
.book-title a:hover { text-decoration: underline; text-decoration-color: var(--store-primary); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.book-author { color: var(--muted); font-size: .86rem; }
.bc-rule { display: block; width: 100%; height: 1px; margin: 6px 0 7px; background: var(--line); }
.bc-meta { display: flex; align-items: center; gap: 6px; }
.rate-count { color: var(--muted); font-size: .8rem; }
.rating { display: inline-flex; }
.stars { display: inline-flex; gap: 1px; color: var(--star); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: #d8d8d8; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: center; gap: 8px; font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.price del { color: var(--muted); font-weight: 500; font-size: .85rem; }
.bc-body .price { margin-top: 4px; }

/* أشكال البطاقة */
[data-card-style="framed"] .book-card { border: 1px solid var(--line); }
[data-card-style="framed"] .bc-media { background: #fff; border-bottom: 1px solid var(--line); }
[data-card-style="framed"] .bc-body { padding: 16px 14px 18px; }
[data-card-style="plain"] .bc-media { background: transparent; aspect-ratio: auto; display: block; padding-bottom: 0; }
[data-card-style="plain"] .bc-add { position: relative; width: 100%; margin-top: 10px; }
[data-card-style="plain"] .bc-cover { width: 100%; }
[data-card-style="plain"] .bc-cover img { box-shadow: none; }
[data-card-style="plain"] .book-card:hover .bc-cover img { transform: none; }

/* شبكة الكتب والصفّ المتحرّك */
.book-grid { display: grid; grid-template-columns: repeat(var(--bpr), minmax(0, 1fr)); gap: 40px var(--gap); }
.book-row {
	display: grid; grid-auto-flow: column; gap: var(--gap);
	grid-auto-columns: calc((100% - (var(--bpr-side) - 1) * var(--gap)) / var(--bpr-side));
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.book-row::-webkit-scrollbar { display: none; }
.book-row > * { scroll-snap-align: start; }

/* ------------------------------------------------------------------
   من رفوف المكتبة: القائمة الجانبيّة وصفّ الكتب
   ------------------------------------------------------------------ */
.store-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 30px; align-items: start; }
.side-cats { border-bottom: 3px solid var(--store-primary); background: #fff; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--store-primary); color: var(--store-accent); font-size: .98rem; font-weight: 800; }
.side-head h2 { font-size: .98rem; color: var(--store-accent); }
.side-cats > ul a { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: .92rem; font-weight: 500; transition: padding .2s; }
.side-cats > ul li:last-child a { border-bottom: 0; }
.side-cats > ul a:hover { padding-inline-start: 26px; background: var(--grey); }
.side-cats > ul a.is-active { font-weight: 800; color: var(--ink); box-shadow: inset -4px 0 0 var(--store-primary); }
.li-arrow { width: 14px; height: 14px; color: var(--store-primary-dark); opacity: 0; }
.side-cats > ul a.is-active .li-arrow { opacity: 1; color: var(--ink); }
.store-main { position: relative; }
.row-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: -54px; margin-bottom: 16px; }

/* ------------------------------------------------------------------
   البانر العريض
   ------------------------------------------------------------------ */
.wide-banner { position: relative; overflow: hidden; background: var(--store-accent); text-align: center; }
.wb-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wide-banner::before { content: ''; position: absolute; inset: 0; z-index: 1; background: rgb(30 30 30 / .7); }
.wb-in { position: relative; z-index: 2; padding-block: 110px; max-width: 820px; }
.wb-title { color: var(--on-dark); font-size: 2.3rem; }
.wb-text { margin: 16px auto 34px; color: #eee; max-width: 620px; font-size: 1rem; }

/* ------------------------------------------------------------------
   من نحن
   ------------------------------------------------------------------ */
.about-media { display: block; overflow: hidden; aspect-ratio: 1600 / 380; background: var(--tile); }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-copy { max-width: 860px; margin: 46px auto 0; text-align: center; }
.about-title { font-size: 1.45rem; margin-bottom: 14px; }
.about-copy p { color: var(--muted); margin-bottom: 30px; }

/* ------------------------------------------------------------------
   مختارات الأسبوع: كتابٌ كبير وثلاثة بجانبه
   ------------------------------------------------------------------ */
.picks { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px 30px; }
.pick { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 22px; align-items: start; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.pick:last-child { border-bottom: 0; padding-bottom: 0; }
.pick-media { position: relative; display: block; background: var(--tile); padding: 14px; }
.pick-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 6px 14px rgb(0 0 0 / .16); }
.pick-media .type-dot { width: 26px; height: 26px; top: 6px; inset-inline-start: 6px; }
.pick-media .type-dot .icon { width: 13px; height: 13px; }
.pick-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin: 6px 0 10px; padding-block: 6px; border-block: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.pick-rate { display: inline-flex; align-items: center; gap: 4px; }
.pick-desc { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.more-link { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: .86rem; color: var(--ink); border-bottom: 2px solid var(--store-primary); }
.more-link .icon { width: 14px; height: 14px; }
.picks > .pick:first-child { grid-row: 1 / span 3; grid-template-columns: 1fr; border-bottom: 0; padding-bottom: 0; }
.picks > .pick:first-child .pick-media { display: grid; place-items: center; aspect-ratio: 16 / 10.5; padding: 26px; }
.picks > .pick:first-child .pick-media img { width: auto; height: 100%; max-height: 360px; }
.picks > .pick:first-child .type-dot { width: 34px; height: 34px; top: 14px; inset-inline-start: 14px; }
.picks > .pick:first-child .book-title { font-size: 1.25rem; }
.picks > .pick:first-child .pick-desc { -webkit-line-clamp: 4; font-size: .95rem; }

/* ------------------------------------------------------------------
   آراء القرّاء على شريطٍ داكن
   ------------------------------------------------------------------ */
.reviews-band { background: color-mix(in srgb, var(--store-accent) 88%, #fff); color: var(--on-dark); padding-block: 80px; }
.rv-slider { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 20px; max-width: 860px; margin-inline: auto; }
.rv-arrow { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--on-dark); }
.rv-arrow:hover { color: var(--store-primary); }
.rv-arrow .icon { width: 26px; height: 26px; }
.rv-track { display: grid; }
.review { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.rv-track:not(.rv-ready) > .review:not(:first-child) { display: none; }
.rv-ready > .review { opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.rv-ready > .review.is-active { opacity: 1; visibility: visible; }
.rv-avatar { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--store-primary); color: var(--store-accent); font-size: 1.8rem; font-weight: 800; box-shadow: 0 0 0 6px rgb(255 255 255 / .12); }
.rv-text { max-width: 640px; color: #f2f2f2; font-size: 1.02rem; line-height: 1.9; }
.rv-name { color: var(--store-primary); font-size: 1.05rem; font-weight: 800; }
.rv-what { color: var(--on-dark-muted); font-size: .82rem; margin-top: -6px; }
[data-show-reviews="false"] .reviews-section { display: none !important; }

/* ------------------------------------------------------------------
   المؤلّفون
   ------------------------------------------------------------------ */
.author-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 46px; }
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; width: 150px; }
.author-card img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; filter: grayscale(1); opacity: .85; transition: filter .3s, opacity .3s, box-shadow .3s; }
.author-card:hover img, .author-card:focus-visible img { filter: none; opacity: 1; box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--store-primary); }
.author-card b { margin-top: 16px; color: var(--ink); font-size: .98rem; }
.author-card small { color: var(--muted); font-size: .84rem; }

/* شاهدتَه مؤخّرًا */
.mini-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.mini-card { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--line); }
.mc-cover { position: relative; display: block; }
.mc-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.mc-cover .type-dot { width: 22px; height: 22px; top: -6px; inset-inline-start: -6px; box-shadow: 0 0 0 2px #fff; }
.mc-cover .type-dot .icon { width: 11px; height: 11px; }
.mc-body { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.mc-body .book-title { font-size: .92rem; }
.mc-body .price { font-size: .92rem; justify-content: flex-start; }

/* ------------------------------------------------------------------
   التذييل
   ------------------------------------------------------------------ */
.site-footer { background: var(--store-accent); color: var(--on-dark-muted); padding-top: 70px; font-size: .9rem; }
.footer-top { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 720px; margin-inline: auto; }
.footer-emblem { display: grid; place-items: center; margin-top: 18px; color: var(--store-primary); }
.footer-emblem .icon { width: 30px; height: 30px; }
.footer-about { margin-top: 14px; color: var(--on-dark-muted); line-height: 1.9; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; margin-top: 56px; padding-bottom: 50px; }
.footer-col h3 { color: var(--on-dark); font-size: 1.05rem; font-weight: 700; margin-bottom: 22px; }
.footer-col h3::after { content: ''; display: block; width: 30px; height: 3px; margin-top: 10px; background: var(--store-primary); }
.footer-col li + li { margin-top: 10px; }
.footer-col a:hover { color: var(--on-dark); text-decoration: underline; text-decoration-color: var(--store-primary); text-underline-offset: 4px; }
.footer-contact li { display: flex; gap: 8px; align-items: flex-start; }
.footer-contact .icon { width: 16px; height: 16px; margin-top: 4px; color: var(--store-primary); }
.footer-social { display: flex; gap: 8px; margin-top: 18px; }
.footer-social li + li { margin-top: 0; }
.footer-social a { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #555; color: var(--on-dark); }
.footer-social a:hover { background: var(--store-primary); color: var(--store-accent); border-color: var(--store-primary); }
.footer-social .icon { width: 15px; height: 15px; }
.newsletter { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.newsletter .field { background: #333; border-color: #4a4a4a; color: var(--on-dark); }
.newsletter .field::placeholder { color: #b5b5b5; }
.newsletter .btn { align-self: flex-start; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 20px; border-top: 1px solid #444; font-size: .82rem; }

/* ------------------------------------------------------------------
   رأس الصفحات الداخليّة
   ------------------------------------------------------------------ */
.page-head { background: var(--grey); padding-block: 54px 40px; text-align: center; border-bottom: 1px solid var(--line); }
.ph-title { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.3; }
.ph-lead { margin-top: 16px; color: var(--muted); }
.breadcrumb { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; font-size: .85rem; color: var(--muted); }
.breadcrumb li + li::before { content: '/'; margin-inline-end: 6px; color: #9a9a9a; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------------------
   صفحة التصنيف
   ------------------------------------------------------------------ */
.mosaic-strip { grid-template-columns: repeat(4, 1fr); }
.mosaic-strip .tile { aspect-ratio: 16 / 9; }
.mosaic-strip .tile-name { font-size: 1.1rem; }
.listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 34px; align-items: start; }
.listing .book-grid { --bpr: var(--bpr-side); }
.filters-head .icon-btn { display: none; color: var(--store-accent); }
.filter-box { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.filter-box h3 { font-size: .92rem; margin-bottom: 10px; }
.filter-box li + li { margin-top: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--store-accent); margin: 0; }
.type-mini { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range .field { min-height: 38px; padding: 6px 10px; }
.filter-apply { padding: 18px 20px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.toolbar b { color: var(--ink); }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.toolbar-actions .field { min-height: 38px; width: auto; min-width: 180px; padding-block: 4px; }
.filters-toggle { display: none; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 50px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid #d8d8d8; font-weight: 700; font-size: .9rem; }
.pagination a:hover { border-color: var(--store-accent); }
.pagination [aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: var(--store-accent); }
.pagination .gap { border: 0; }
.pagination .icon { width: 16px; height: 16px; }

/* ------------------------------------------------------------------
   صفحات الكتاب
   ------------------------------------------------------------------ */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 54px; align-items: start; }
.gallery-main { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; background: var(--tile); padding: 48px; }
.gallery-main img { height: 100%; width: auto; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 16px 34px rgb(0 0 0 / .22); }
.gallery-main .type-dot { top: 18px; inset-inline-start: 18px; width: 40px; height: 40px; }
.gallery-main .type-dot .icon { width: 20px; height: 20px; }
.thumbs { display: flex; gap: 12px; margin-top: 12px; }
.thumbs button { width: 86px; padding: 8px; border: 1px solid var(--line); background: var(--tile); }
.thumbs button[aria-pressed="true"] { border-color: var(--store-accent); box-shadow: inset 0 -3px 0 var(--store-primary); }
.thumbs img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.pdp-type { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 700; color: var(--muted); }
.pdp-type .type-dot { position: static; width: 26px; height: 26px; box-shadow: none; }
.pdp-type .type-dot .icon { width: 13px; height: 13px; }
.pdp-info h1 { margin-top: 10px; font-size: 2rem; }
.pdp-author { margin-top: 4px; color: var(--muted); }
.pdp-author a { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--store-primary); }
.pdp-rating { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: .88rem; }
.pdp-rating .stars .icon { width: 16px; height: 16px; }
.pdp-rule { display: block; width: 62px; height: 8px; margin: 20px 0; background: var(--store-primary); clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 100%, 7px 100%); }
.price-lg { font-size: 1.7rem; justify-content: flex-start; }
.price-lg del { font-size: 1.05rem; }
.pdp-lead { margin-top: 14px; color: var(--muted); }
.pdp-options { display: flex; flex-wrap: wrap; gap: 18px 30px; margin-top: 24px; }
.opt { display: flex; flex-direction: column; gap: 8px; }
.opt-label { font-size: .84rem; font-weight: 700; color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 16px; border: 1px solid #d4d4d4; font-weight: 500; font-size: .9rem; }
.chip .icon { width: 16px; height: 16px; }
.qty { display: inline-flex; border: 1px solid #d4d4d4; height: 44px; }
.qty button { width: 40px; border: 0; background: var(--grey); font-size: 1.1rem; font-weight: 700; }
.qty button:hover { background: var(--store-primary); color: var(--store-accent); }
.qty input { width: 54px; border: 0; border-inline: 1px solid #d4d4d4; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.pdp-wish { border: 1px solid #d4d4d4; width: 50px; height: 50px; }
.pdp-wish[aria-pressed="true"] .icon { fill: currentColor; }
.stock { display: flex; align-items: center; gap: 6px; margin-top: 18px; color: #2a6e46; font-weight: 700; font-size: .9rem; }
.pdp-meta { margin: 22px 0 0; border-top: 1px solid var(--line); }
.pdp-meta div { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.pdp-meta dt { width: 120px; color: var(--muted); }
.pdp-meta dd { margin: 0; color: var(--ink); font-weight: 500; }
.sample-box { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 14px 18px; background: var(--grey); border-inline-start: 4px solid var(--store-primary); }
.sample-play { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 50%; background: var(--store-accent); color: var(--store-primary); }
.sample-info { display: flex; flex-direction: column; font-size: .86rem; color: var(--muted); }
.sample-info b { color: var(--ink); font-size: .95rem; }
.wave { display: flex; align-items: center; gap: 3px; margin-inline-start: auto; height: 36px; }
.wave span { width: 3px; background: #9a9a9a; }
.edu-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; border: 1px solid var(--line); }
.edu-feats > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 10px; }
.edu-feats > div + div { border-inline-start: 1px solid var(--line); }
.edu-feats .trust-icon { width: 44px; height: 44px; margin-bottom: 4px; }
.edu-feats small { color: var(--muted); font-size: .8rem; }
.edu-feats b { color: var(--ink); font-size: .92rem; }

.tabs { margin-top: 70px; }
.tab-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.tab-list button { position: relative; padding: 14px 26px; border: 0; background: none; font-weight: 700; color: var(--muted); }
.tab-list button[aria-selected="true"] { color: var(--ink); }
.tab-list button[aria-selected="true"]::after { content: ''; position: absolute; inset-inline: 18px; bottom: -2px; height: 4px; background: var(--store-primary); }
.tab-panel { padding-top: 36px; }
.prose { max-width: 820px; margin-inline: auto; color: var(--store-text); }
.prose p + p { margin-top: 12px; }
.prose h3 { margin: 24px 0 12px; font-size: 1.1rem; }
.check-list li { display: flex; gap: 8px; align-items: center; }
.check-list li + li { margin-top: 8px; }
.check-list .icon { color: var(--ink); background: var(--store-primary); border-radius: 50%; padding: 3px; width: 20px; height: 20px; }
.spec-table { width: 100%; max-width: 760px; margin-inline: auto; border-collapse: collapse; font-size: .92rem; }
.spec-table th, .spec-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: start; }
.spec-table th { width: 34%; color: var(--muted); font-weight: 500; background: var(--grey); }
.reviews-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 46px; align-items: start; }
.reviews-summary { display: flex; align-items: center; gap: 14px; }
.reviews-summary strong { font-size: 3rem; line-height: 1; color: var(--ink); }
.reviews-summary span { display: flex; flex-direction: column; color: var(--muted); font-size: .85rem; }
.rating-bars { margin-top: 18px; display: grid; gap: 6px; font-size: .82rem; color: var(--muted); }
.rating-bars li { display: grid; grid-template-columns: 56px 1fr 36px; align-items: center; gap: 10px; }
.rating-bars .bar { height: 7px; background: #e8e8e8; }
.rating-bars .bar span { display: block; height: 100%; background: var(--star); }
.review-form { margin-top: 26px; padding: 22px; background: var(--grey); border-top: 3px solid var(--store-primary); }
.review-form h3 { font-size: 1rem; }
.review-form p { margin: 4px 0 12px; color: var(--muted); font-size: .85rem; }
.review-form textarea { margin: 10px 0 14px; min-height: 100px; resize: vertical; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; border: 0; padding: 0; margin: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #cfcfcf; }
.star-input label .icon { width: 24px; height: 24px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-accent); }
.review-list { display: grid; gap: 0; }
.review-flat { grid-area: auto; flex-direction: row; flex-wrap: wrap; align-items: center; text-align: start; gap: 6px 14px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.review-flat .rv-avatar { width: 46px; height: 46px; font-size: 1.1rem; box-shadow: none; }
.review-flat .rv-text { order: 5; flex-basis: 100%; color: var(--store-text); font-size: .95rem; max-width: none; }
.review-flat .rv-name { color: var(--ink); font-size: .95rem; }
.review-flat .rv-what { color: var(--muted); margin: 0; flex-basis: 100%; order: 4; }

/* ------------------------------------------------------------------
   صفحة المؤلّف
   ------------------------------------------------------------------ */
.author-hero { background: var(--store-accent); color: var(--on-dark-muted); padding-block: 70px; }
.author-hero-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; align-items: center; }
.ah-photo { position: relative; }
.ah-photo::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; background: var(--store-primary); }
.ah-photo img { position: relative; width: 100%; aspect-ratio: 1; object-fit: cover; }
.ah-info .breadcrumb { justify-content: flex-start; margin: 0 0 14px; color: var(--on-dark-muted); }
.ah-info .breadcrumb [aria-current] { color: var(--on-dark); }
.ah-info .breadcrumb li + li::before { color: #8f8f8f; }
.ah-info h1 { color: var(--on-dark); font-size: 2.3rem; }
.ah-info .skew-bar { margin: 14px 0 20px; }
.ah-bio p + p { margin-top: 10px; }
.ah-stats { display: flex; gap: 40px; margin-top: 26px; }
.ah-stats div { display: flex; flex-direction: column; padding-inline-start: 14px; border-inline-start: 3px solid var(--store-primary); }
.ah-stats b { color: var(--on-dark); font-size: 1.7rem; line-height: 1.2; }
.ah-stats span { font-size: .85rem; }

/* ------------------------------------------------------------------
   السلّة
   ------------------------------------------------------------------ */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 40px; align-items: start; }
.cart-head, .cart-row { display: grid; grid-template-columns: minmax(0, 2.4fr) 1fr 1.1fr 1fr 48px; align-items: center; gap: 14px; }
.cart-head { padding: 12px 0; border-bottom: 2px solid var(--store-accent); font-weight: 800; font-size: .9rem; color: var(--ink); }
.cart-row { padding: 20px 0; border-bottom: 1px solid var(--line); }
.ci-product { display: flex; align-items: center; gap: 16px; }
.ci-cover { position: relative; flex: none; width: 76px; padding: 8px; background: var(--tile); }
.ci-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.ci-cover .type-dot { width: 22px; height: 22px; top: -6px; inset-inline-start: -6px; box-shadow: 0 0 0 2px #fff; }
.ci-cover .type-dot .icon { width: 11px; height: 11px; }
.ci-info h3 { font-size: .98rem; }
.ci-info p { color: var(--muted); font-size: .85rem; }
.ci-type { display: inline-block; margin-top: 4px; font-size: .76rem; padding: 1px 8px; background: var(--grey); color: var(--ink); }
.ci-price small, .ci-total small { display: none; color: var(--muted); font-size: .78rem; }
.ci-price .price { justify-content: flex-start; font-size: .95rem; flex-direction: column; gap: 0; }
.ci-total b { color: var(--ink); }
.cart-under { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.empty-cart { text-align: center; padding: 50px 20px; border: 1px dashed #cfcfcf; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-cart[hidden] { display: none; }
.empty-cart p { color: var(--muted); margin-bottom: 8px; }
.summary { background: var(--grey); padding: 28px; border-top: 3px solid var(--store-primary); }
.summary h2 { font-size: 1.2rem; text-align: center; }
.summary .skew-bar { margin-bottom: 22px; }
.coupon { display: flex; gap: 8px; }
.coupon .field { min-height: 38px; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0 14px; padding: 8px 12px; background: #fff; border: 1px dashed #bdbdbd; font-size: .82rem; }
.coupon-applied button { border: 0; background: none; font-weight: 700; text-decoration: underline; font-size: .82rem; color: var(--ink); }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid #e2e2e2; font-size: .92rem; }
.summary-row b { color: var(--ink); }
.summary-total { border-bottom: 0; font-weight: 800; font-size: 1.1rem; color: var(--ink); margin-bottom: 14px; }
.note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: .8rem; color: var(--muted); text-align: center; }
.note .icon { width: 15px; height: 15px; }

/* ------------------------------------------------------------------
   404
   ------------------------------------------------------------------ */
.nf { padding-block: 90px; text-align: center; }
.nf-in { display: flex; flex-direction: column; align-items: center; }
.nf-code { font-size: 10rem; font-weight: 800; line-height: .9; color: var(--store-accent); letter-spacing: 4px; }
.nf .skew-bar-lg { margin: 6px auto 30px; }
.nf h1 { font-size: 1.8rem; }
.nf-text { color: var(--muted); max-width: 520px; margin: 12px auto 28px; }
.nf-search { display: flex; gap: 10px; width: 100%; max-width: 520px; margin-bottom: 18px; }

/* ------------------------------------------------------------------
   components.html
   ------------------------------------------------------------------ */
.kit-stack { display: grid; gap: 34px; }
.kit-block { padding: 30px; border: 1px solid var(--line); }
.kit-title { font-size: 1.1rem; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.kit-note { color: var(--muted); font-size: .88rem; margin: -6px 0 16px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.kit-row b { min-width: 110px; color: var(--ink); }
.kit-dark { display: flex; flex-wrap: wrap; gap: 14px; padding: 22px; background: var(--store-accent); }
.kit-block .sec-head { margin-bottom: 0; }
.kit-split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 30px; align-items: start; }
.trust-grid-kit { grid-template-columns: 1fr; border: 1px solid var(--line); margin-bottom: 18px; }
.trust-grid-kit > .trust-item { border: 0 !important; }
.kit-split .mini-row { grid-template-columns: minmax(0, 340px); }
.kit-reviews { padding: 40px 20px; }
.swatches { display: flex; flex-wrap: wrap; gap: 18px; }
.swatch { display: flex; flex-direction: column; gap: 6px; font-size: .78rem; }
.swatch span { width: 120px; height: 60px; border: 1px solid var(--line); }

/* ------------------------------------------------------------------
   الشاشات المتوسّطة
   ------------------------------------------------------------------ */
@media (max-width: 1100px) {
	.main-nav > ul > li > a, .main-nav > ul > li > button { padding-inline: 9px; font-size: .88rem; }
	.main-nav > ul > li > a::after, .main-nav > ul > li > button::after { inset-inline: 9px; }
}

@media (max-width: 991px) {
	:root { --sec: 66px; --bpr: 3 !important; --bpr-side: 3 !important; --gap: 20px; }
	[data-books-per-row] { --bpr: 3; --bpr-side: 3; }
	.main-nav, .top-links li:nth-child(2) { display: none; }
	.menu-toggle { display: inline-grid; }
	.header-in { min-height: 74px; }
	.slide { min-height: 460px; }
	.slide-title { font-size: 2.6rem; }
	.trust-grid { grid-template-columns: repeat(2, 1fr); }
	.trust-grid > .trust-item { border-width: 0 !important; border-bottom-width: 1px !important; }
	.trust-grid > .trust-item:nth-child(odd) { border-inline-end-width: 1px !important; }
	.trust-grid > .trust-item:nth-last-child(-n+2) { border-bottom-width: 0 !important; }
	.mosaic { grid-template-columns: repeat(2, 1fr); }
	.mosaic-strip { grid-template-columns: repeat(4, 1fr); }
	.mosaic-strip .tile { aspect-ratio: 4 / 3; }
	.mosaic-strip .tile-cap { inset-inline: 14px; bottom: 12px; }
	.store-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.store-layout > * { min-width: 0; }
	.store-layout .side-cats { border-bottom: 0; }
	.store-layout .side-head { display: none; }
	.store-layout .side-cats > ul { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; }
	.store-layout .side-cats > ul a { white-space: nowrap; border: 1px solid var(--line); padding: 8px 16px; }
	.store-layout .side-cats > ul li:last-child a { border-bottom: 1px solid var(--line); }
	.store-layout .side-cats > ul a.is-active { background: var(--store-primary); border-color: var(--store-primary); box-shadow: none; color: var(--store-accent); }
	.store-layout .li-arrow { display: none; }
	.row-nav { margin-top: 0; }
	.picks { grid-template-columns: 1fr; }
	.picks > .pick:first-child { grid-row: auto; }
	.mini-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(320px, 88vw);
		overflow-y: auto; clip-path: inset(0 0 0 100%); visibility: hidden; transition: clip-path .3s, visibility .3s; border-bottom: 0;
	}
	.filters-open .filters { clip-path: inset(0); visibility: visible; }
	.filters-open .filters-backdrop { opacity: 1; visibility: visible; }
	.filters-head .icon-btn, .filters-toggle { display: inline-flex; }
	.pdp { grid-template-columns: 1fr; gap: 34px; }
	.gallery { max-width: 520px; width: 100%; margin-inline: auto; }
	.reviews-layout { grid-template-columns: 1fr; }
	.author-hero-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
	.cart-layout { grid-template-columns: 1fr; }
	.kit-split { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   الهاتف
   ------------------------------------------------------------------ */
@media (max-width: 640px) {
	:root { --sec: 54px; --gutter: 16px; --gap: 14px; }
	body { font-size: 14.5px; }
	.topbar-in { justify-content: center; }
	.top-side { display: none; }
	.top-links { gap: 16px; }
	.header-in { gap: 10px; min-height: 66px; }
	.brand img { width: 38px; height: 38px; }
	.brand-name { font-size: 1.1rem; }
	.header-actions .icon-btn { width: 38px; }
	.hs-in .btn { padding-inline: 18px; }
	.sec-head { margin-bottom: 32px; }
	.sec-title { font-size: 1.45rem; }
	.slide { min-height: 420px; }
	.slide-body { padding: 56px var(--gutter) 84px; }
	.slide-title { font-size: 1.95rem; }
	.slide-text { font-size: .95rem; margin: 14px auto 26px; }
	.trio { padding-top: 30px; }
	.trust-grid { grid-template-columns: 1fr; }
	.trust-grid > .trust-item { border-inline-end-width: 0 !important; border-bottom-width: 1px !important; padding: 22px 6px; }
	.trust-grid > .trust-item:last-child { border-bottom-width: 0 !important; }
	.mosaic { grid-template-columns: 1fr 1fr; }
	.tile { aspect-ratio: 1 / 1; }
	.tile-cap { inset-inline: 12px; bottom: 12px; }
	.tile-name { font-size: 1rem; }
	.tile-count { font-size: .78rem; }
	.mosaic-strip { grid-template-columns: repeat(2, 1fr); }
	.cta-in { flex-direction: column; text-align: center; padding-block: 28px; }
	.cta-text { font-size: 1rem; }
	.book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px var(--gap); }
	.listing .book-grid { --bpr: 2; }
	.book-row { grid-auto-columns: 46%; }
	.bc-add { font-size: .8rem; gap: 6px; }
	.badge { width: 40px; height: 40px; font-size: .7rem; top: 8px; inset-inline-end: 8px; }
	.type-dot { top: 8px; inset-inline-start: 8px; width: 28px; height: 28px; }
	.type-dot .icon { width: 14px; height: 14px; }
	.book-title { font-size: .92rem; }
	.price { font-size: .95rem; gap: 6px; }
	.wb-in { padding-block: 70px; }
	.wb-title { font-size: 1.6rem; }
	.about-media { aspect-ratio: 16 / 7; }
	.about-title { font-size: 1.2rem; }
	.pick { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; }
	.pick-media { padding: 8px; }
	.picks > .pick:first-child .pick-media { padding: 18px; }
	.rv-slider { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 8px; }
	.rv-arrow { width: 32px; }
	.rv-text { font-size: .95rem; }
	.reviews-band { padding-block: 56px; }
	.author-row { gap: 26px 18px; }
	.author-card { width: 100px; }
	.author-card img { width: 92px; height: 92px; }
	.mini-row { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; gap: 34px; margin-top: 40px; }
	.footer-bottom { justify-content: center; text-align: center; }
	.page-head { padding-block: 38px 28px; }
	.ph-title { font-size: 1.55rem; }
	.toolbar-actions { width: 100%; }
	.toolbar-actions .field { flex: 1; min-width: 0; }
	.gallery-main { padding: 30px; }
	.pdp-info h1 { font-size: 1.55rem; }
	.price-lg { font-size: 1.4rem; }
	.pdp-buttons .btn { flex: 1 1 auto; }
	.edu-feats { grid-template-columns: 1fr; }
	.edu-feats > div + div { border-inline-start: 0; border-top: 1px solid var(--line); }
	.tab-list button { padding: 12px 14px; }
	.wave { display: none; }
	.author-hero { padding-block: 48px; }
	.author-hero-grid { grid-template-columns: 1fr; gap: 40px; }
	.ah-photo { width: 200px; }
	.ah-info h1 { font-size: 1.8rem; }
	.cart-head { display: none; }
	.cart-row { grid-template-columns: 1fr 1fr; gap: 12px; position: relative; }
	.ci-product { grid-column: 1 / -1; padding-inline-end: 44px; }
	.ci-price small, .ci-total small { display: block; }
	.ci-qty { grid-column: 1 / -1; order: 3; }
	.ci-remove { position: absolute; top: 16px; inset-inline-end: 0; }
	.summary { padding: 22px 18px; }
	.nf { padding-block: 60px; }
	.nf-code { font-size: 6.5rem; }
	.nf h1 { font-size: 1.4rem; }
	.kit-block { padding: 18px; }
	.kit-row b { min-width: 100%; }
}

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

/* ------------------------------------------------------------------ ميزات المنصّة */
/* المدوّنة: شكل قسم الأخبار في المرجع، مقالٌ كبير وثلاثة أفقيّة بجانبه */
.posts-picks .pick { grid-template-columns: 170px minmax(0, 1fr); }
.posts-picks .pick-media { padding: 0; overflow: hidden; }
.posts-picks .pick-media img { aspect-ratio: 4 / 3; box-shadow: none; transition: transform .4s; }
.posts-picks .pick:hover .pick-media img { transform: scale(1.04); }
.picks.posts-picks > .pick:first-child .pick-media { aspect-ratio: 16 / 9; padding: 0; }
.picks.posts-picks > .pick:first-child .pick-media img { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: cover; }
.post-date { display: inline-flex; align-items: center; gap: 6px; }
.post-date .icon { width: 15px; height: 15px; }
.posts-more { text-align: center; margin-top: 34px; }
.blog-picks, .posts-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.blog-picks > .pick, .posts-row > .pick, .picks.blog-picks > .pick:first-child, .picks.posts-row > .pick:first-child { grid-row: auto; grid-template-columns: 1fr; border-bottom: 0; padding-bottom: 0; }
.blog-picks .pick-media img, .posts-row .pick-media img { aspect-ratio: 16 / 9; }
.picks.blog-picks > .pick:first-child .book-title, .picks.posts-row > .pick:first-child .book-title { font-size: inherit; }
.picks.posts-row > .pick:first-child .pick-desc, .picks.blog-picks > .pick:first-child .pick-desc { -webkit-line-clamp: 2; font-size: .9rem; }
.post { max-width: 940px; }
.post-hero { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--tile); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-body { max-width: 740px; margin: 34px auto 0; font-size: 1.06rem; line-height: 2; }
.post-body p + p { margin-top: 18px; }

@media (max-width: 991px) {
	.blog-picks, .posts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.posts-row > .pick:nth-child(3) { grid-column: 1 / -1; grid-template-columns: 170px minmax(0, 1fr); }
}
@media (max-width: 640px) {
	.posts-picks .pick, .posts-row > .pick:nth-child(3) { grid-template-columns: 110px minmax(0, 1fr); }
	.blog-picks, .posts-row { grid-template-columns: 1fr; gap: 22px; }
	.blog-picks > .pick, .posts-row > .pick { grid-template-columns: 110px minmax(0, 1fr); }
	.blog-picks .pick-media img, .posts-row .pick-media img { aspect-ratio: 4 / 3; }
	.post-body { font-size: 1rem; margin-top: 24px; }
}

/* ------------------------------------------------------------------ تطوير 2026: أقسامٌ جديدة في الرئيسيّة */
/* صفوفٌ مكتملة: شبكة صفّين (الأكثر مبيعًا) وشبكة صفٍّ واحد (العروض والاقتراحات) لا تنتهيان بصفٍّ ناقص */
[data-books-per-row="3"] .two-rows > :nth-child(n+7),
[data-books-per-row="4"] .two-rows > :nth-child(n+9),
[data-books-per-row="3"] .one-row > :nth-child(n+4),
[data-books-per-row="4"] .one-row > :nth-child(n+5) { display: none; }
.sec-more { margin-top: 44px; text-align: center; }
.sec-more .btn .icon { width: 15px; height: 15px; }

/* تبويبات مصادر الصفّ: أزرارٌ مائلة كأزرار القالب، والمختار أصفر */
.row-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: -16px auto 36px; }
.row-tab { min-height: 42px; padding: 8px 24px; border: 0; background: var(--grey); color: var(--ink); font-weight: 700; font-size: .9rem; transition: background-color .2s; }
.row-tab:hover { background: #e9e9e9; }
.row-tab[aria-selected="true"] { background: var(--store-primary); color: var(--store-accent); }
[data-button-shape="skew"] .row-tab { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%); padding-inline: 30px; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* عروض الموسم: شريطٌ داكن وعدّادٌ بخاناتٍ صفراء */
.deal-band { background: var(--store-accent); color: var(--on-dark); }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--store-primary); font-weight: 800; font-size: .88rem; }
.deal-kicker .icon { width: 16px; height: 16px; }
.countdown { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin: -18px auto 42px; }
.countdown[hidden] { display: none; }
.cd-label { margin-inline-end: 8px; color: var(--on-dark-muted); font-weight: 700; font-size: .9rem; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 8px 16px 6px; background: var(--store-primary); color: var(--store-accent); line-height: 1.15; }
[data-button-shape="skew"] .cd-unit { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%); }
.cd-unit b { font-size: 1.55rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: .74rem; font-weight: 700; }
.deal-band .book-card { padding-bottom: 14px; }

/* كتاب الأسبوع: غلافٌ كبير خلفه مربّعٌ أصفر مُزاح، كصورة صفحة المؤلّف */
.feature-book { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); max-width: 1020px; margin-inline: auto; background: #fff; border-top: 3px solid var(--store-primary); }
.fb-media { position: relative; display: grid; place-items: center; padding: 54px 50px 64px; background: var(--tile); }
.fb-cover { position: relative; display: block; width: min(250px, 100%); }
.fb-cover::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; background: var(--store-primary); }
.fb-cover img { position: relative; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 14px 30px rgb(0 0 0 / .22); }
.fb-media .type-dot { top: 18px; inset-inline-start: 18px; width: 38px; height: 38px; }
.fb-media .type-dot .icon { width: 19px; height: 19px; }
.fb-body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 44px 50px; }
.fb-kind { font-size: .84rem; font-weight: 700; color: var(--muted); }
.fb-title { font-size: 1.9rem; line-height: 1.3; }
.fb-title a:hover { text-decoration: underline; text-decoration-color: var(--store-primary); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.fb-author { color: var(--muted); }
.fb-author span { color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--store-primary); }
.fb-body .price-lg { margin-top: -4px; }
.fb-desc { color: var(--muted); font-size: .95rem; }
.fb-desc p + p { margin-top: 8px; }
.fb-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 12px; }
.fb-actions .pdp-wish { width: 50px; height: 50px; }

@media (max-width: 1100px) {
	.fb-body { padding: 36px 34px; }
}
@media (max-width: 991px) {
	.two-rows > :nth-child(n+7), .one-row > :nth-child(n+4) { display: none; }
	/* البطاقات الثلاث تحت السلايدر: صفٌّ واحد مهما بقي منها */
	.trio-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 20px; }
	.trio-title { font-size: 1rem; }
	.feature-book { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
	.author-row { flex-wrap: nowrap; gap: 24px; }
	.author-card { width: 120px; }
	.author-card img { width: 110px; height: 110px; }
	.fb-media { padding: 40px 34px 50px; }
	.fb-title { font-size: 1.55rem; }
}
@media (max-width: 640px) {
	:root { --strip: 40px; }
	/* في الهاتف: السلايدر ثمّ شريط الثقة ثمّ الأكثر مبيعًا، فيظهر أوّل صفّ كتبٍ مبكّرًا */
	#main:has(> .trust-section) { display: flex; flex-direction: column; }
	#main > .hero { order: -3; }
	#main > .trust-section { order: -2; }
	#main > .best-section { order: -1; }
	/* صورة السلايدر فوق النصّ لا خلفه */
	.slide { display: block; min-height: 0; }
	.slide-img { position: relative; inset: auto; height: auto; aspect-ratio: 16 / 9; }
	.slide::after { display: none; }
	.slide-body { max-width: none; padding: 22px var(--gutter) 50px; }
	.slide-title { font-size: 1.6rem; }
	.slide-text { margin: 10px auto 20px; }
	.slider-dots { bottom: 20px; }
	/* شريط الثقة: صفٌّ واحد يُمرَّر */
	.trust-section { padding-block: 30px; }
	.trust-section .sec-head { margin-bottom: 16px; }
	.trust-section .sec-title { font-size: 1.2rem; }
	.trust-section .sec-sub, .trust-section .skew-bar { display: none; }
	.trust-grid { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
	.trust-grid::-webkit-scrollbar { display: none; }
	.trust-grid > .trust-item { flex: 0 0 auto; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; background: #fff; border: 1px solid #e3e3e3 !important; scroll-snap-align: start; }
	.trust-item p { display: none; }
	.trust-item h3 { margin: 0; font-size: .9rem; white-space: nowrap; }
	.trust-icon { width: 38px; height: 38px; }
	.trust-icon .icon { width: 18px; height: 18px; }
	/* البطاقات الثلاث: صفٌّ يُمرَّر */
	.trio { padding-block: 34px; }
	.trio-grid { grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 14px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
	.trio-grid::-webkit-scrollbar { display: none; }
	.trio-card { scroll-snap-align: start; }
	.trio-grid > .trio-card:only-child { max-width: none; }
	.trio-text { margin-bottom: 14px; }
	/* الشبكتان */
	.two-rows > :nth-child(n+5) { display: none; }
	body .book-grid.one-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
	body .book-grid.one-row::-webkit-scrollbar { display: none; }
	body .book-grid.one-row > .book-card { display: flex; scroll-snap-align: start; }
	.row-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: -12px calc(var(--gutter) * -1) 24px; padding-inline: var(--gutter); }
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tab { flex: none; padding-inline: 18px; }
	.sec-more { margin-top: 30px; }
	.countdown { gap: 6px; margin: -14px 0 30px; }
	.cd-label { flex-basis: 100%; text-align: center; margin: 0 0 2px; }
	.cd-unit { min-width: 62px; padding-inline: 12px; }
	.cd-unit b { font-size: 1.3rem; }
	.feature-book { grid-template-columns: 1fr; }
	.fb-media { padding: 34px 40px 46px; }
	.fb-cover { width: 170px; }
	.fb-body { padding: 24px 18px 28px; }
	.fb-title { font-size: 1.4rem; }
	/* المؤلّفون: صفٌّ يُمرَّر */
	.author-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter); scroll-padding-inline: var(--gutter); gap: 14px; }
	.author-row::-webkit-scrollbar { display: none; }
	.author-card { flex: none; scroll-snap-align: start; }
}

/* صفحة التصنيف: طريقة العرض والتصفية المختارة */
.view-switch { display: flex; }
.view-switch button { display: grid; place-items: center; width: 40px; height: 38px; border: 1px solid #d4d4d4; background: #fff; color: var(--muted); }
.view-switch button + button { border-inline-start: 0; }
.view-switch button[aria-pressed="true"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--store-primary); }
.view-switch .icon { width: 17px; height: 17px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -12px 0 26px; }
.f-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px 4px 12px; background: var(--grey); border-inline-start: 3px solid var(--store-primary); font-size: .84rem; font-weight: 700; color: var(--ink); }
.f-chip .icon { width: 14px; height: 14px; color: var(--muted); }
.f-chip:hover .icon { color: var(--ink); }
.f-clear { font-size: .84rem; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--store-primary); text-decoration-thickness: 2px; text-underline-offset: 4px; padding: 6px 4px; }
.listing-grid.is-list { grid-template-columns: minmax(0, 1fr) !important; gap: 18px; }
.listing-grid.is-list .book-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; text-align: start; border: 1px solid var(--line); }
.listing-grid.is-list .bc-body { align-items: flex-start; padding: 18px 26px; }
.listing-grid.is-list .price { justify-content: flex-start; }
.listing-grid.is-list .bc-rule { max-width: 260px; }
@media (max-width: 640px) {
	.toolbar-actions .view-switch { flex: none; }
	.listing-grid.is-list .book-card { grid-template-columns: 128px minmax(0, 1fr); }
	.listing-grid.is-list .bc-body { padding: 12px 14px; }
	.listing-grid.is-list .bc-add { font-size: 0; gap: 0; }
	.active-filters { margin: -8px 0 20px; }
}

/* صفحات الكتاب: النسخ المتاحة، والتوصيل والدفع */
.formats-box { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format-opt { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; min-width: 128px; padding: 9px 16px; border: 1px solid #d4d4d4; background: #fff; }
.format-opt .type-mini { grid-row: span 2; width: 12px; height: 12px; }
.format-name { font-weight: 700; font-size: .9rem; color: var(--ink); line-height: 1.3; }
.format-price { font-size: .82rem; color: var(--muted); line-height: 1.3; }
.format-opt:hover { border-color: var(--store-accent); }
.format-opt.is-current { border-color: var(--store-accent); box-shadow: inset 0 -3px 0 var(--store-primary); }
/* تختفي القائمة إن لم يكن للعنوان غير صيغةٍ واحدة */
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ .format-opt)) { display: none; }
.pdp-service { display: grid; gap: 0; margin-top: 18px; border: 1px solid var(--line); border-inline-start: 4px solid var(--store-primary); }
.pdp-service li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; font-size: .88rem; color: var(--muted); }
.pdp-service li + li { border-top: 1px solid var(--line); }
.pdp-service .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--ink); }
.pdp-service b { color: var(--ink); margin-inline-end: 6px; }

/* صفحة المؤلّف: أعماله في أربعة أعمدةٍ ثابتة، وعمودين في الهاتف، فلا يبقى صفٌّ ناقص */
.works-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (max-width: 640px) { .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.kit-dark .countdown { margin: 0; }

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