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

:root {
	--store-primary: #C8743A;
	--store-primary-dark: #7A3F17;
	--store-accent: #101010;
	--store-bg: #FFFFFF;
	--store-text: #101010;

	/* محايدات */
	--beige: #F6F4F3;
	--cover-bg: #F2F2F2;
	--muted: #5F6368;
	--line: #E6E4E2;
	--gold: #E3A21A;
	--star-off: #D6D3D0;
	--white: #FFFFFF;

	/* نصّ الزرّ الأساسيّ داكنٌ دائمًا (الأبيض على البرتقاليّ لا يبلغ 4.5) */
	--on-primary: #101010;

	--type-print: #DB7056;
	--type-ebook: #5675A3;
	--type-audio: #986AB0;
	--type-educational: #3f8f6b;

	--r: 12px;
	--r-sm: 8px;
	--pill: 999px;
	--per-row: 4;
	--gap: 24px;
	--container: 1320px;
	--gutter: 24px;
	--font: "Tajawal", system-ui, sans-serif;
	--shadow: 0 10px 30px rgba(16, 16, 16, .08);
}

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

/* ---------------------------------------------------------------- أساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.7;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--store-primary-dark); 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: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.icon-xl { width: 44px; height: 44px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- أزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 26px; border-radius: var(--pill);
	font-weight: 500; font-size: 14px; white-space: nowrap;
	border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--store-primary-dark); color: var(--white); }
.btn-dark { background: var(--store-accent); color: var(--white); }
.btn-dark:hover { background: var(--store-primary-dark); }
.btn-white { background: var(--white); color: #101010; }
.btn-white:hover { background: var(--store-accent); color: var(--white); }
.btn-outline { border-color: var(--store-accent); color: var(--store-text); background: transparent; }
.btn-outline:hover { background: var(--store-accent); color: var(--white); }
.btn-sm { min-height: 38px; padding: 0 18px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%;
}
.icon-btn-lg { width: 52px; height: 52px; border: 1px solid var(--line); }
.icon-btn[aria-pressed="true"] .icon { fill: var(--store-primary); stroke: var(--store-primary); }
.count-badge {
	position: absolute; top: 2px; inset-inline-start: 22px;
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--store-primary); color: var(--on-primary);
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.car-arrow {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; background: var(--white); color: #101010;
	border-radius: var(--r-sm); box-shadow: 0 4px 14px rgba(16, 16, 16, .12);
	transition: background .2s, color .2s;
}
.car-arrow:hover { background: var(--store-accent); color: var(--white); }

/* ---------------------------------------------------------------- الشريط العلويّ */
.topbar { background: var(--store-accent); color: var(--white); font-size: 13px; }
.topbar-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 38px; gap: 16px; }
.social { display: flex; gap: 6px; }
.social a { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; }
.social .icon { width: 17px; height: 17px; }
.announce { display: flex; align-items: center; gap: 10px; justify-content: center; }
.announce-btn { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; color: var(--white); }
.announce-btn .icon { width: 16px; height: 16px; }
.announce-list { display: grid; text-align: center; }
.announce-list li { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .35s; }
.announce-list li.is-active, .announce-list li:only-child { opacity: 1; visibility: visible; }
.topbar-link { justify-self: end; text-decoration: underline; text-underline-offset: 3px; }
.announce-list:empty, .announce:has(.announce-list:empty) { display: none; }

/* ---------------------------------------------------------------- الرأس */
.masthead { display: contents; }
.site-header {
	position: sticky; top: 0; z-index: 60;
	background: var(--white); color: var(--store-text);
	border-bottom: 1px solid var(--line);
	transition: background .25s, color .25s, box-shadow .25s;
}
.header-in { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-name { font-size: 24px; font-weight: 700; letter-spacing: 0; }
.menu-toggle { display: none; }
.main-nav ul { display: flex; gap: 26px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a { display: inline-flex; align-items: center; gap: 4px; padding: 26px 0; font-weight: 500; font-size: 15px; }
.main-nav > ul > li > a:hover { text-decoration: underline; text-underline-offset: 6px; }
.drop {
	position: absolute; top: 100%; inset-inline-start: -18px; min-width: 220px;
	display: block !important; padding: 12px 0; background: var(--white); color: #101010;
	border-radius: var(--r-sm); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.drop a { display: block; padding: 8px 20px; font-size: 14px; }
.drop a:hover { background: var(--beige); color: var(--store-primary-dark); }
.has-drop:hover .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.header-search {
	display: flex; align-items: center; margin-inline-start: auto;
	width: 260px; border-bottom: 1px solid currentColor;
}
.header-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; outline: none; }
.header-search input::placeholder { color: inherit; opacity: .8; }
.header-search button { display: inline-flex; padding: 6px; }
.header-icons { display: flex; gap: 4px; }

/* حالة الرأس الشفّاف: ما دام السلايدر موجودًا في الصفحة يطفو الرأس فوقه، ويبقى مثبّتًا أعلى الشاشة */
body:has(.hero:not([hidden])) .site-header {
	margin-bottom: -79px;
	background: transparent; color: var(--white); border-bottom-color: rgba(255, 255, 255, .28);
}
body.header-stuck:has(.hero:not([hidden])) .site-header {
	background: var(--white); color: var(--store-text); border-bottom-color: var(--line);
}
body.header-stuck .site-header { box-shadow: 0 6px 24px rgba(16, 16, 16, .08); }

/* ---------------------------------------------------------------- الدرج الجانبيّ */
.drawer-backdrop {
	position: fixed; inset: 0; z-index: 90; background: rgba(16, 16, 16, .45);
	opacity: 0; visibility: hidden; transition: .25s;
}
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100;
	width: min(340px, 86vw); background: var(--white); color: var(--store-text);
	padding: 18px 20px 28px; overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
body.drawer-open .drawer { transform: none; visibility: visible; }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-search { display: flex; border-bottom: 1px solid var(--store-text); margin-bottom: 14px; }
.drawer-search input { flex: 1; min-width: 0; border: 0; padding: 10px 0; outline: none; background: transparent; }
.drawer-search button { display: inline-flex; padding: 8px; }
.drawer-nav a, .drawer-cats a { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-label { margin-top: 18px; font-size: 13px; color: var(--muted); }
.drawer-cats a { font-weight: 400; }
.drawer-foot { display: grid; gap: 4px; margin-top: 20px; }
.drawer-foot a { display: flex; align-items: center; gap: 10px; padding: 8px 0; }

/* ---------------------------------------------------------------- الشريط السفليّ (الهاتف) */
.tabbar { display: none; }

/* ---------------------------------------------------------------- أقسام */
.section { padding: 76px 0; }
.section-tight { padding: 40px 0; }
.section-tight-top { padding-top: 32px; }
.section-beige { background: var(--beige); }
.section-head { text-align: center; margin-bottom: 40px; position: relative; }
.section-title { font-size: 34px; font-weight: 300; line-height: 1.35; }
.section-sub { margin-top: 8px; color: var(--muted); font-size: 15px; }
.link-more {
	position: absolute; inset-inline-end: 0; bottom: 4px;
	display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500;
	border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-more:hover { color: var(--store-primary-dark); }

/* ---------------------------------------------------------------- السلايدر */
.hero { position: relative; }
.hero-slider { position: relative; color: var(--white); background: #3A2416; }
.slides { display: grid; }
.slide { grid-area: 1 / 1; position: relative; min-height: 610px; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s; }
.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: linear-gradient(180deg, rgba(16, 10, 6, .45) 0%, rgba(16, 10, 6, .32) 45%, rgba(16, 10, 6, .45) 100%); }
.slide-content { position: relative; z-index: 1; max-width: 860px; padding: 110px var(--gutter) 70px; text-align: center; }
.slide-eyebrow { display: block; font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.slide-title { font-size: 66px; font-weight: 300; line-height: 1.2; }
.slide-text { margin: 16px auto 30px; max-width: 560px; font-size: 17px; }
.hero-dashes { position: absolute; bottom: 30px; inset-inline: 0; display: flex; justify-content: center; gap: 10px; z-index: 2; }
.hero-dashes button { width: 34px; height: 24px; position: relative; }
.hero-dashes button::before { content: ""; position: absolute; inset-inline: 0; top: 11px; height: 2px; background: rgba(255, 255, 255, .5); }
.hero-dashes button[aria-current="true"]::before { background: var(--white); height: 3px; }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 36px var(--gap); }

.book-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.book-media { position: relative; border-radius: var(--r); overflow: hidden; background: var(--cover-bg); }
.book-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .6s ease; }
.book-card:hover .book-cover img { transform: scale(1.04); }
.book-badges { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 700; line-height: 20px; }
.badge-sale { background: var(--store-accent); color: var(--white); }
.badge-new { background: var(--white); color: #101010; }
.book-tools { position: absolute; top: 12px; inset-inline-end: 12px; display: flex; flex-direction: column; gap: 8px; }
.type-dot {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 50%; color: var(--white);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15); flex: none;
}
.type-dot .icon { width: 17px; height: 17px; }
.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); }
.wish-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 50%; background: var(--white); color: #101010;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	opacity: 0; transform: translateX(-6px); transition: .25s;
}
.wish-btn .icon { width: 17px; height: 17px; }
.wish-btn[aria-pressed="true"] .icon { fill: var(--store-primary); stroke: var(--store-primary); }
.book-card:hover .wish-btn, .book-card:focus-within .wish-btn { opacity: 1; transform: none; }
@media (hover: none) {
	.wish-btn { opacity: 1; transform: none; }
}
.stock-band {
	position: absolute; inset-inline: 0; bottom: 0; padding: 9px; text-align: center;
	background: rgba(16, 16, 16, .86); color: var(--white); font-size: 13px; font-weight: 500;
}
.book-card.is-out .book-cover img { filter: grayscale(.55); opacity: .8; }
.book-body { flex: 1; padding-top: 14px; display: flex; flex-direction: column; gap: 3px; }
/* صفّ السعر وزرّ السلّة: يُدفع وحده إلى أسفل البطاقة (البند 7)، والزرّ كبسولةٌ صغيرة بإطارٍ أسود ظاهرةٌ دائمًا */
.price-row { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.cart-pill {
	display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
	border: 1px solid var(--store-accent); border-radius: var(--pill); background: transparent; color: var(--store-text);
	font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s;
}
.cart-pill .icon { width: 16px; height: 16px; }
.cart-pill:hover { background: var(--store-accent); color: var(--white); }
.cart-pill:disabled { border-color: var(--line); color: var(--muted); cursor: not-allowed; background: transparent; }
.book-title { font-size: 16px; font-weight: 500; line-height: 1.5; }
.book-title a:hover { color: var(--store-primary-dark); }
.book-author { font-size: 13px; color: var(--muted); }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; }
.star { width: 14px; height: 14px; fill: var(--gold); stroke: var(--gold); stroke-width: 1; }
.star.off { fill: var(--star-off); stroke: var(--star-off); }
.price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--store-primary-dark); font-size: 16px; }
.price del { color: var(--muted); font-weight: 400; font-size: 13px; }
.price-lg { font-size: 26px; }
.price-lg del { font-size: 17px; }

/* شكل البطاقة */
body[data-card-style="framed"] .book-card { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 10px 16px; background: var(--white); }
body[data-card-style="framed"] .book-body { padding-inline: 4px; }
body[data-card-style="minimal"] .book-media { background: transparent; border-radius: 0; }
body[data-card-style="minimal"] .book-body { align-items: center; text-align: center; }
body[data-card-style="minimal"] .book-title { font-weight: 400; }
body[data-card-style="minimal"] .price-row { justify-content: center; }

/* ---------------------------------------------------------------- البطاقات الطويلة باللافتة البيضاء */
.carousel { position: relative; }
.tall-track {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * var(--gap)) / 5);
	gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; overscroll-behavior-x: contain;
}
.tall-track::-webkit-scrollbar { display: none; }
.tall-sm { grid-auto-columns: calc((100% - 5 * 18px) / 6); gap: 18px; }
.author-track { grid-auto-columns: calc((100% - 4 * var(--gap)) / 5); }
.tall-card { position: relative; display: block; scroll-snap-align: start; border-radius: var(--r); overflow: hidden; background: var(--cover-bg); margin: 0; }
.tall-card img { width: 100%; aspect-ratio: 3 / 5; object-fit: cover; transition: transform .6s ease; }
.tall-author img { aspect-ratio: 3 / 4; }
.tall-card:hover img { transform: scale(1.05); }
.tall-label {
	position: absolute; bottom: 16px; inset-inline: 16px;
	display: flex; flex-direction: column; align-items: center;
	padding: 10px 12px; background: var(--white); color: #101010;
	border-radius: var(--r-sm); text-align: center; line-height: 1.4;
}
.tall-label b { font-size: 16px; font-weight: 500; }
.tall-label small { font-size: 12px; color: var(--muted); }
.tall-card:hover .tall-label b { color: var(--store-primary-dark); }
.car-prev, .car-next { position: absolute; top: calc(50% - 20px); z-index: 2; }
.carousel .car-prev { inset-inline-start: 14px; }
.carousel .car-next { inset-inline-end: 14px; }

/* ---------------------------------------------------------------- أبرز الأسبوع */
.hl-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: stretch; }
.hl-layout:not(:has(.hl-banner)) { grid-template-columns: 1fr; }
.hl-layout:not(:has(.hl-banner)) .hl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hl-banner { position: relative; display: block; border-radius: var(--r); overflow: hidden; min-height: 560px; color: var(--white); }
.hl-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.hl-banner:hover img { transform: scale(1.03); }
.hl-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 10, 6, .55), rgba(16, 10, 6, 0) 55%); }
.hl-banner-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 56px 32px; }
.hl-eyebrow { font-size: 14px; font-weight: 500; }
.hl-title { font-size: 38px; font-weight: 300; line-height: 1.3; }
.hl-sub { font-size: 15px; margin-bottom: 10px; }
.hl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------------------------------------------------------------- النصفان من حافّة إلى حافّة */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split:has(.split-showcase):not(:has(.split-banner)) { grid-template-columns: 1fr; }
.split-half { position: relative; min-height: 640px; }
.split-showcase { background: var(--cover-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 48px; text-align: center; }
.split-eyebrow { font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 18px; }
.showcase { display: flex; align-items: center; gap: 24px; width: 100%; max-width: 560px; }
.show-track { flex: 1; display: grid; min-width: 0; }
.show-item { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; visibility: hidden; transition: opacity .45s, visibility .45s; }
.show-item.is-active { opacity: 1; visibility: visible; }
.show-cover { position: relative; display: block; width: 200px; margin-bottom: 18px; }
.show-cover img { border-radius: var(--r-sm); box-shadow: 0 18px 40px rgba(60, 30, 10, .22); aspect-ratio: 2 / 3; object-fit: cover; width: 100%; }
.show-cover .type-dot { position: absolute; top: 10px; inset-inline-end: 10px; }
.show-author { font-size: 13px; color: var(--muted); }
.show-title { font-size: 30px; font-weight: 300; line-height: 1.35; }
.show-desc { color: var(--muted); max-width: 440px; margin-top: 4px; }
.show-item .btn { margin-top: 10px; }
.split-banner { display: block; overflow: hidden; color: var(--white); }
.split-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.split-banner:hover img { transform: scale(1.03); }
.split-banner-box {
	position: absolute; bottom: 40px; inset-inline-start: 40px; z-index: 1;
	display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
	max-width: 340px; padding: 24px 26px; background: rgba(16, 16, 16, .78); border-radius: var(--r);
}
.split-banner-box b { font-size: 24px; font-weight: 300; line-height: 1.35; }

/* ---------------------------------------------------------------- آراء القرّاء */
.review-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.review-card { display: flex; flex-direction: column; min-width: 0; }
.review-cover { background: var(--beige); border-radius: var(--r); padding: 26px 0; display: flex; justify-content: center; margin-bottom: 18px; }
.review-cover img { width: 46%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 12px 26px rgba(60, 30, 10, .2); }
.review-body { display: flex; flex-direction: column; gap: 10px; }
.review-text { font-size: 15px; line-height: 1.8; }
.review-who { font-size: 13px; color: var(--muted); }
.review-who b { color: var(--store-text); font-weight: 700; }
body[data-show-reviews="false"] .reviews-home,
body[data-show-reviews="false"] .tab-list [aria-controls="p-rev"],
body[data-show-reviews="false"] #p-rev { display: none !important; }

/* ---------------------------------------------------------------- البانر العريض والشريط المفرَّغ */
.wide-banner { position: relative; overflow: hidden; color: var(--white); background: #2E221A; }
.wide-link { position: relative; display: block; min-height: 500px; }
.wide-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wide-link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(16, 10, 6, .62), rgba(16, 10, 6, .1) 70%); }
.wide-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 90px; padding-bottom: 150px; }
.wide-title { font-size: 52px; font-weight: 300; line-height: 1.2; max-width: 560px; }
.wide-sub { font-size: 16px; max-width: 460px; margin-bottom: 8px; }
.ticker { position: absolute; inset-inline: 0; bottom: 26px; z-index: 1; overflow: hidden; pointer-events: none; direction: ltr; }
.ticker-track { display: flex; width: max-content; gap: 64px; animation: ticker 32s linear infinite; }
.ticker-track li {
	font-size: 76px; font-weight: 700; line-height: 1.1; white-space: nowrap;
	color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .85);
	direction: rtl;
}
.ticker-track:empty { display: none; }
@keyframes ticker { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
	.ticker-track { animation: none; }
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- شريط الثقة */
.trust-bar { background: var(--beige); border-top: 1px solid var(--line); }
.trust-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 30px; padding-bottom: 30px; }
.trust-item { display: flex; align-items: center; gap: 14px; }
.trust-item > .icon { width: 34px; height: 34px; stroke-width: 1.2; color: var(--store-primary-dark); }
.trust-item b { display: block; font-weight: 500; font-size: 15px; }
.trust-item span { display: block; font-size: 13px; color: var(--muted); }
body[data-show-trust-bar="false"] .trust-bar { display: none; }

/* ---------------------------------------------------------------- التذييل */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 40px; }
.footer-about p { margin: 16px 0; color: var(--muted); max-width: 360px; }
.footer-contact { display: grid; gap: 8px; margin-bottom: 16px; font-size: 14px; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact .icon { width: 17px; height: 17px; color: var(--store-primary-dark); }
.footer-contact a:hover { color: var(--store-primary-dark); }
.site-footer .social a { border: 1px solid var(--line); width: 36px; height: 36px; }
.site-footer .social a:hover { background: var(--store-accent); color: var(--white); }
.site-footer h2 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-col li { margin-bottom: 9px; font-size: 14px; color: var(--muted); }
.footer-col a:hover { color: var(--store-primary-dark); }
.footer-news p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.news-field { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--pill); padding: 4px; padding-inline-start: 18px; }
.news-field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 8px 0; }
.news-field button { width: 40px; height: 40px; border-radius: 50%; background: var(--store-accent); color: var(--white); display: inline-flex; align-items: center; justify-content: center; }
.news-field button:hover { background: var(--store-primary-dark); }
.footer-news small { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); }
.footer-bottom { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 20px; padding-bottom: 24px; font-size: 13px; color: var(--muted); }
.footer-bottom::before { content: ""; position: absolute; top: 0; inset-inline: var(--gutter); border-top: 1px solid var(--line); }
.pay-list { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-list li { padding: 3px 12px; border: 1px solid var(--line); border-radius: var(--pill); font-size: 12px; }

/* ---------------------------------------------------------------- رأس الصفحات الداخليّة */
.page-head { background: var(--beige); text-align: center; padding: 52px 0 48px; }
.page-head h1 { font-size: 40px; font-weight: 300; line-height: 1.3; margin: 10px 0 6px; }
.page-head p { color: var(--muted); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.page-head .breadcrumb { justify-content: center; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--muted); }
.breadcrumb a:hover { color: var(--store-primary-dark); }
.breadcrumb [aria-current] { color: var(--store-text); }
.crumbs-bar { padding-top: 18px; padding-bottom: 18px; }

/* ---------------------------------------------------------------- category.html */
.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0; margin-bottom: 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filters-head, .filters-toggle { display: none; }
.fdrop { position: relative; }
.fdrop summary {
	display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer;
	min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--pill); font-size: 14px;
}
.fdrop summary::-webkit-details-marker { display: none; }
.fdrop[open] summary { border-color: var(--store-accent); }
.fdrop[open] summary .icon { transform: rotate(180deg); }
.fdrop-panel {
	position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 20; min-width: 240px;
	padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow);
	display: grid; gap: 8px;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--store-primary-dark); width: 16px; height: 16px; }
.check .count { margin-inline-start: auto; color: var(--muted); font-size: 12px; }
.price-range { display: flex; gap: 8px; }
.field { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); width: 100%; }
textarea.field { padding: 12px 14px; resize: vertical; }
.listing-count { margin-inline-start: auto; font-size: 14px; color: var(--muted); }
.listing-count b { color: var(--store-text); font-weight: 500; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sort .field { width: auto; min-height: 38px; border-radius: var(--pill); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 52px; flex-wrap: wrap; }
.pagination a, .pagination span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 42px; height: 42px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px;
}
.pagination span { border-color: transparent; }
.pagination a:hover { border-color: var(--store-accent); }
.pagination a[aria-current="page"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--white); }
.pagination .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- صفحة الكتاب */
.pdp { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.pdp-gallery {
	background: var(--cover-bg); min-height: 640px; padding: 56px 40px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
	position: sticky; top: 76px;
}
.gallery-main { position: relative; width: min(340px, 70%); }
.gallery-main img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-sm); box-shadow: 0 24px 50px rgba(60, 30, 10, .22); }
.gallery-main .type-dot { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; }
.thumbs { display: flex; gap: 12px; }
.thumbs button { width: 62px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; opacity: .7; }
.thumbs button[aria-pressed="true"] { border-color: var(--store-accent); opacity: 1; }
.thumbs img { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; }
.pdp-info { padding: 48px 56px 56px; max-width: 660px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.pdp-cat { font-size: 13px; color: var(--muted); border-bottom: 1px solid currentColor; }
.pdp-type { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.pdp-type .type-dot { width: 26px; height: 26px; }
.pdp-type .type-dot .icon { width: 14px; height: 14px; }
.pdp-title { font-size: 42px; font-weight: 300; line-height: 1.25; }
.pdp-author { color: var(--muted); }
.pdp-author a { color: var(--store-text); font-weight: 500; border-bottom: 1px solid currentColor; }
.rating-lg .star { width: 17px; height: 17px; }
.pdp-lead { color: var(--muted); font-size: 15px; line-height: 1.9; }
.pdp-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; width: 100%; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.meta-item { background: var(--white); padding: 10px 14px; }
.meta-item small { display: block; font-size: 12px; color: var(--muted); }
.meta-item b { font-weight: 500; font-size: 14px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: #1F6B2E; }
.pdp-buy { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; margin-top: 4px; }
.pdp-buy .btn-primary { flex: 1 1 200px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--pill); height: 52px; }
.qty button { width: 40px; height: 100%; font-size: 18px; }
.qty input { width: 44px; text-align: center; border: 0; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-perks { display: grid; gap: 8px; width: 100%; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pdp-perks li { display: flex; align-items: center; gap: 10px; }
.pdp-perks .icon { color: var(--store-primary-dark); }

.tabs { max-width: 1000px; }
.tab-list { display: flex; justify-content: center; gap: 34px; border-bottom: 1px solid var(--line); margin-bottom: 30px; flex-wrap: wrap; }
.tab-list button { padding: 12px 0; font-size: 17px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-list button[aria-selected="true"] { color: var(--store-text); border-bottom-color: var(--store-accent); }
.prose p + p { margin-top: 12px; }
.prose { line-height: 1.9; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec-table th { width: 34%; font-weight: 500; color: var(--muted); background: var(--beige); }
.reviews-layout { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.reviews-summary { background: var(--beige); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.reviews-summary strong { font-size: 46px; font-weight: 300; line-height: 1; }
.reviews-summary p { font-size: 14px; color: var(--muted); }
.review-form { display: grid; gap: 12px; width: 100%; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.review-form h3 { font-size: 16px; font-weight: 500; }
.rate-pick { display: flex; gap: 4px; }
.rate-pick label { cursor: pointer; }
.rate-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-pick .star { width: 24px; height: 24px; fill: var(--star-off); stroke: var(--star-off); }
.rate-pick:has(input:checked) label .star { fill: var(--gold); stroke: var(--gold); }
.rate-pick label:has(input:checked) ~ label .star { fill: var(--star-off); stroke: var(--star-off); }
.review-list { display: grid; gap: 22px; }
.review-list .review-card { padding-bottom: 22px; border-bottom: 1px solid var(--line); }

/* ---------------------------------------------------------------- صفحة المؤلّف */
.author-hero { background: var(--beige); padding: 56px 0; }
.author-layout { display: grid; grid-template-columns: 340px 1fr; gap: 56px; align-items: center; }
.tall-static { scroll-snap-align: none; }
.tall-static img { aspect-ratio: 3 / 4; }
.author-info h1 { font-size: 44px; font-weight: 300; line-height: 1.25; margin: 12px 0 14px; }
.author-info .prose { color: var(--muted); max-width: 640px; }
.author-stats { display: flex; gap: 40px; margin-top: 26px; flex-wrap: wrap; }
.author-stats b { display: block; font-size: 30px; font-weight: 300; line-height: 1.2; }
.author-stats span { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { font-size: 13px; font-weight: 500; color: var(--muted); text-align: start; padding: 0 10px 12px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 18px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-book { display: flex; align-items: center; gap: 16px; }
.cart-book img { width: 76px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; }
.cart-book h3 { font-size: 16px; font-weight: 500; }
.cart-book p { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.cart-book .pdp-type { font-size: 12px; font-weight: 400; }
.cart-book .type-dot { width: 24px; height: 24px; box-shadow: none; }
.cart-book .type-dot .icon { width: 13px; height: 13px; }
.cart-table .qty { height: 42px; }
.cart-table .qty button { width: 34px; }
.cart-under { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.empty-cart { text-align: center; padding: 50px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-cart p { color: var(--muted); }
.summary { background: var(--beige); border-radius: var(--r); padding: 28px; display: grid; gap: 12px; position: sticky; top: 96px; }
.summary h2 { font-size: 20px; font-weight: 500; }
.coupon { display: flex; gap: 8px; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 8px 12px; background: var(--white); border-radius: var(--r-sm); }
.coupon-applied button { text-decoration: underline; font-size: 13px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.summary-row b { font-weight: 500; }
.summary-total { padding-top: 12px; border-top: 1px solid var(--line); font-size: 18px; }
.summary-total b { font-weight: 700; color: var(--store-primary-dark); }
.summary-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- 404 */
.split-404 .split-half { min-height: 560px; }
.nf-text { background: var(--beige); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; padding: 64px 72px; }
.nf-code { font-size: 140px; font-weight: 300; line-height: 1; color: var(--store-primary-dark); }
.nf-text h1 { font-size: 34px; font-weight: 300; }
.nf-text p { color: var(--muted); max-width: 460px; }
.nf-search { display: flex; gap: 8px; width: 100%; max-width: 460px; }
.nf-search .field { border-radius: var(--pill); }
.nf-image { overflow: hidden; }
.nf-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------- components.html */
.kit { padding: 44px 0; border-bottom: 1px solid var(--line); }
.kit-intro { background: var(--beige); }
.kit-title { font-size: 26px; font-weight: 300; margin-bottom: 8px; }
.kit-intro .kit-title { font-size: 36px; }
.kit-note { color: var(--muted); margin-bottom: 22px; max-width: 760px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.kit-dark { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 22px; background: #3A2416; border-radius: var(--r); }
.kit-hero { position: relative; height: 260px; border-radius: var(--r); overflow: hidden; color: var(--white); }
.kit-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kit-hero::after { content: ""; position: absolute; inset: 0; background: rgba(16, 10, 6, .35); }
.kit-hero-head.site-header { position: absolute; top: 0; inset-inline: 0; z-index: 1; background: transparent; color: var(--white); border-bottom-color: rgba(255, 255, 255, .3); padding-inline: 24px; }
.kit-hero-nav { flex: 1; font-weight: 500; font-size: 15px; }
.kit-hero-icons { display: flex; gap: 14px; }
.kit-tall { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.kit-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
.kit-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }
.kit-ticker { height: 220px; border-radius: var(--r); }

/* ==========================================================================
   العروض
   ========================================================================== */
@media (max-width: 1200px) {
	.main-nav ul { gap: 18px; }
	.header-search { width: 200px; }
	.header-in { gap: 20px; }
	.tall-track { grid-auto-columns: calc((100% - 3 * var(--gap)) / 4); }
	.tall-sm { grid-auto-columns: calc((100% - 4 * 18px) / 5); }
}

@media (max-width: 1024px) {
	:root { --gap: 18px; }
	.menu-toggle { display: inline-flex; }
	.main-nav { display: none; }
	.header-search { margin-inline-start: auto; }
	.slide { min-height: 540px; }
	.slide-title { font-size: 50px; }
	.book-grid { grid-template-columns: repeat(min(var(--per-row), 3), minmax(0, 1fr)); }
	.tall-track, .author-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
	.tall-sm { grid-auto-columns: calc((100% - 3 * 18px) / 4); }
	.hl-layout { grid-template-columns: 1fr; }
	.hl-banner { min-height: 440px; }
	.hl-grid, .hl-layout:not(:has(.hl-banner)) .hl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.split, .pdp { grid-template-columns: 1fr; }
	.split-half { min-height: 480px; }
	.pdp-gallery { position: relative; top: 0; min-height: 0; }
	.pdp-info { max-width: none; padding: 36px var(--gutter); }
	.review-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.trust-in { grid-template-columns: repeat(2, 1fr); }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.reviews-layout { grid-template-columns: 1fr; }
	.author-layout { grid-template-columns: 260px 1fr; gap: 32px; }
	.nf-text { padding: 56px var(--gutter); }
}

@media (max-width: 768px) {
	:root { --gutter: 16px; --gap: 14px; }
	body { font-size: 14px; padding-bottom: 64px; }
	.topbar-in { grid-template-columns: 1fr; min-height: 34px; }
	.topbar-social, .topbar-link { display: none; }
	.announce-list { font-size: 12px; }
	.header-in { min-height: 62px; gap: 8px; }
	body:has(.hero:not([hidden])) .site-header { margin-bottom: -63px; }
	.brand-name { font-size: 21px; }
	.brand img { width: 34px; height: 34px; }
	.header-search, .hide-md { display: none; }
	.header-icons { margin-inline-start: auto; }
	.slide { min-height: 520px; }
	.slide-content { padding: 90px var(--gutter) 70px; }
	.slide-title { font-size: 36px; }
	.slide-text { font-size: 15px; margin: 12px auto 22px; }
	.section { padding: 52px 0; }
	.section-tight { padding: 28px 0; }
	.section-tight-top { padding-top: 24px; }
	.section-head { margin-bottom: 26px; }
	.section-title { font-size: 26px; }
	.section-sub { font-size: 14px; }
	.link-more { position: static; margin-top: 10px; }
	/* صفوف الكتب: بطاقتان في الصفّ، سلايدرًا بالسحب */
	.book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px var(--gap); }
	.book-grid.is-row {
		grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - var(--gap)) / 2.15);
		overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
	}
	.book-grid.is-row::-webkit-scrollbar { display: none; }
	.book-grid.is-row > * { scroll-snap-align: start; }
	.listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.book-title { font-size: 14px; }
	.price-row { flex-direction: column; align-items: stretch; gap: 8px; }
	.cart-pill { min-height: 40px; padding: 0 12px; justify-content: center; }
	.price { font-size: 15px; }
	.tall-track, .author-track { grid-auto-columns: calc((100% - var(--gap)) / 2); }
	.tall-sm { grid-auto-columns: calc((100% - 2 * 12px) / 2.6); gap: 12px; }
	.car-prev, .car-next { display: none; }
	.tall-label { bottom: 10px; inset-inline: 10px; padding: 8px; }
	.tall-label b { font-size: 14px; }
	.hl-banner { min-height: 420px; }
	.hl-grid, .hl-layout:not(:has(.hl-banner)) .hl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hl-title { font-size: 28px; }
	.hl-banner-text { padding: 40px 20px; }
	.split-half { min-height: 0; }
	.split-showcase { padding: 48px var(--gutter); }
	.split-banner { min-height: 420px; }
	.split-banner-box { inset-inline: 16px; bottom: 16px; max-width: none; }
	.show-cover { width: 160px; }
	.show-title { font-size: 24px; }
	.showcase { gap: 8px; }
	.showcase .car-arrow { width: 34px; height: 34px; flex: none; }
	.review-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.review-row > * { scroll-snap-align: start; }
	.wide-link { min-height: 440px; }
	.wide-text { padding-top: 56px; padding-bottom: 120px; }
	.wide-title { font-size: 32px; }
	.ticker-track li { font-size: 46px; }
	.trust-in { grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
	.trust-item { gap: 10px; align-items: flex-start; }
	.trust-item > .icon { width: 26px; height: 26px; }
	.trust-item b { font-size: 13px; }
	.trust-item span { font-size: 12px; }
	.site-footer { padding-top: 44px; }
	.footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
	.footer-about, .footer-news { grid-column: 1 / -1; }
	.footer-bottom { flex-direction: column; align-items: flex-start; margin-top: 32px; }
	.page-head { padding: 36px 0 32px; }
	.page-head h1 { font-size: 30px; }

	/* التصفية لوحةٌ جانبيّة */
	.filters-toggle { display: inline-flex; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100; width: min(340px, 88vw);
		flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; padding: 18px 20px; overflow-y: auto;
		background: var(--white); transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
	}
	body.filters-open .filters { transform: none; visibility: visible; }
	body.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
	.filters-head h2 { font-size: 18px; font-weight: 500; }
	.fdrop { border-bottom: 1px solid var(--line); }
	.fdrop summary { width: 100%; justify-content: space-between; border: 0; border-radius: 0; padding: 0; min-height: 50px; font-weight: 500; }
	.fdrop-panel { position: static; min-width: 0; box-shadow: none; border: 0; padding: 0 0 14px; }
	.filters > .btn { margin-top: 18px; }
	.listing-count { margin-inline-start: 0; order: 3; width: 100%; }
	.sort { margin-inline-start: auto; }
	.sort label { display: none; }

	.pdp-gallery { padding: 32px 16px; }
	.gallery-main { width: min(240px, 66%); }
	.pdp-title { font-size: 30px; }
	.pdp-info { padding: 26px var(--gutter) 10px; }
	.pdp-buy .btn-dark { flex: 1 1 auto; }
	.tab-list { gap: 20px; justify-content: flex-start; }
	.tab-list button { font-size: 15px; }
	.author-hero { padding: 36px 0; }
	.author-layout { grid-template-columns: 1fr; }
	.tall-static { max-width: 260px; }
	.author-info h1 { font-size: 32px; }
	.author-stats { gap: 24px; }

	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
	.cart-table tr { position: relative; padding: 16px 0; border-bottom: 1px solid var(--line); }
	.cart-table td { border: 0; padding: 4px 0; }
	.cart-table td[data-label] { display: flex; justify-content: space-between; align-items: center; }
	.cart-table td[data-label]::before { content: attr(data-label); font-size: 13px; color: var(--muted); }
	.cart-table .cell-remove { position: absolute; top: 12px; inset-inline-end: 0; width: auto; }
	.cart-book { padding-inline-end: 44px; }
	.summary { padding: 22px; }

	.split-404 .split-half { min-height: 0; }
	.nf-text { padding: 44px var(--gutter); }
	.nf-code { font-size: 96px; }
	.nf-text h1 { font-size: 26px; }
	.nf-image { min-height: 280px; }

	.kit-tall { grid-template-columns: 1fr; }
	.kit-reviews { grid-template-columns: 1fr; grid-auto-flow: row; overflow: visible; }
	.kit-hero-nav { display: none; }
	.kit-hero-head .brand { margin-inline: 0; }
	.kit-hero-icons { margin-inline-start: auto; }

	.tabbar {
		position: fixed; bottom: 0; inset-inline: 0; z-index: 80;
		display: grid; grid-template-columns: repeat(5, 1fr);
		height: 62px; background: var(--white); color: var(--store-text);
		border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(16, 16, 16, .06);
	}
	.tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; }
	.tabbar .count-badge { top: 6px; inset-inline-start: calc(50% + 4px); }
}

@media (max-width: 420px) {
	.slide-title { font-size: 32px; }
	.pdp-buy .btn { padding: 0 18px; }
	.coupon .btn { padding: 0 16px; }
}

/* ---------------------------------------------------------------- ميزات المنصّة المعتمدة */
/* النظرة السريعة (quick-view): تحت زرّ المفضّلة، بالشكل نفسه */
.qv-btn { transition-delay: .04s; }
.qv-btn:hover { background: var(--store-accent); color: var(--white); }


/* ---------------------------------------------------------------- صفوف الكتب: صفٌّ واحدٌ ممتلئ */
/* صفّ الرئيسيّة والصفحات الداخليّة (.is-row) يعرض صفًّا واحدًا: لا يزيد عدد أعمدته على عدد كتبه، ولا تظهر كتبٌ تزيد على الصفّ */
.book-grid.is-row:not(:has(> :nth-child(5))) { --row-max: 4; }
.book-grid.is-row:has(> :nth-child(5)):not(:has(> :nth-child(6))) { --row-max: 5; }
.book-grid.is-row { grid-template-columns: repeat(min(var(--per-row), var(--row-max, 6)), minmax(0, 1fr)); }
@media (min-width: 1025px) {
	body[data-books-per-row="3"] .book-grid.is-row > :nth-child(n+4),
	body[data-books-per-row="4"] .book-grid.is-row > :nth-child(n+5),
	body[data-books-per-row="5"] .book-grid.is-row > :nth-child(n+6),
	body[data-books-per-row="5"] .listing-grid > :nth-child(n+11) { display: none; }
}
@media (min-width: 769px) and (max-width: 1024px) {
	.book-grid.is-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.book-grid.is-row > :nth-child(n+4) { display: none; }
}

/* ---------------------------------------------------------------- تبويبات صفّ الكتب (القاعدة 16) */
.row-tabs { display: flex; justify-content: center; gap: 8px 30px; flex-wrap: wrap; margin-top: 22px; }
.row-tabs button { padding: 6px 0; font-size: 15px; color: var(--muted); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.row-tabs button:hover { color: var(--store-text); }
.row-tabs button[aria-selected="true"] { color: var(--store-text); font-weight: 500; border-bottom-color: var(--store-accent); }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* ---------------------------------------------------------------- عروض الموسم: عدّادٌ واحد ومسارٌ أفقيّ */
.deal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin-bottom: 36px; }
.deal-kicker { display: inline-block; font-size: 13px; font-weight: 500; color: var(--store-primary-dark); border-bottom: 1px solid currentColor; margin-bottom: 8px; }
.countdown { display: flex; align-items: center; gap: 16px; }
.cd-label { font-size: 14px; color: var(--muted); }
.cd-units { display: flex; gap: 8px; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 66px; padding: 10px 6px 8px; background: var(--white); border-radius: var(--r-sm); line-height: 1.1; }
.cd-unit b { font-size: 30px; font-weight: 300; font-variant-numeric: tabular-nums; }
.cd-unit small { margin-top: 4px; font-size: 12px; color: var(--muted); }
.book-track {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * var(--gap)) / 5);
	gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; overscroll-behavior-x: contain;
}
.book-track::-webkit-scrollbar { display: none; }
.book-track > * { scroll-snap-align: start; }
.carousel .book-track ~ .car-arrow, .carousel .car-arrow:has(~ .book-track) { top: calc(33% - 20px); }

/* ---------------------------------------------------------------- المدوّنة */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.post-card { display: flex; flex-direction: column; min-width: 0; }
.post-media { display: block; border-radius: var(--r); overflow: hidden; }
.post-media img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; transition: transform .6s ease; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 16px; }
.post-date { font-size: 13px; color: var(--muted); }
.post-title { font-size: 21px; font-weight: 300; line-height: 1.45; }
.post-title a:hover { color: var(--store-primary-dark); }
.post-excerpt { color: var(--muted); font-size: 14px; }
.post-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; font-weight: 500; border-bottom: 1px solid currentColor; }
.post-more:hover { color: var(--store-primary-dark); }
.blog-grid, .post-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blog-grid { gap: 44px var(--gap); }
.blog-grid .is-lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.blog-grid .is-lead .post-title { font-size: 34px; }
.blog-grid .is-lead .post-body { padding-top: 0; }
.article { max-width: 760px; margin-inline: auto; padding-top: 12px; padding-bottom: 72px; }
.article-head { text-align: center; margin-bottom: 30px; }
.article-title { font-size: 44px; font-weight: 300; line-height: 1.3; margin-top: 8px; }
.article-img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: var(--r); margin-bottom: 36px; }
.article-body { font-size: 17px; line-height: 2; }
.article-body p + p, .article-body h2 + p, .article-body p + h2, .article-body blockquote + p, .article-body p + blockquote { margin-top: 16px; }
.article-body h2 { font-size: 26px; font-weight: 300; line-height: 1.4; }
.article-body blockquote { margin: 0; padding: 18px 26px; background: var(--beige); border-inline-start: 3px solid var(--store-primary-dark); border-radius: var(--r-sm); font-size: 19px; font-weight: 300; }
.article-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-foot .link-more { position: static; }

@media (max-width: 1200px) {
	.book-track { grid-auto-columns: calc((100% - 3 * var(--gap)) / 4); }
}
@media (max-width: 1024px) {
	.book-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid:not(.blog-grid) > :nth-child(3) { display: none; }
	.blog-grid .is-lead { grid-template-columns: 1fr; gap: 0; }
	.blog-grid .is-lead .post-body { padding-top: 16px; }
}
@media (max-width: 768px) {
	.book-grid.is-row { grid-template-columns: none; }
	.row-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); gap: 22px; margin-top: 16px; }
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tabs button { flex: none; min-height: 40px; }
	.deal-head { flex-direction: column; align-items: center; text-align: center; margin-bottom: 24px; }
	.countdown { flex-direction: column; gap: 8px; }
	.cd-unit { min-width: 60px; }
	.cd-unit b { font-size: 24px; }
	.book-track { grid-auto-columns: calc((100% - var(--gap)) / 2.15); }
	.post-grid, .post-grid:not(.blog-grid) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.post-grid > * { scroll-snap-align: start; }
	.post-grid:not(.blog-grid) > :nth-child(3) { display: flex; }
	.blog-grid { grid-auto-flow: row; grid-template-columns: 1fr; overflow: visible; gap: 32px; }
	.blog-grid .is-lead .post-title { font-size: 26px; }
	.post-title { font-size: 19px; }
	.article-title { font-size: 30px; }
	.article-body { font-size: 16px; }
	.article { padding-bottom: 48px; }
	/* شريط الثقة: شريطٌ واحد يُمرَّر بالسحب */
	.trust-in { display: flex; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 22px; padding-top: 16px; padding-bottom: 16px; }
	.trust-in::-webkit-scrollbar { display: none; }
	.trust-item { flex: none; align-items: center; scroll-snap-align: start; }
	/* البانر الطويل والعريض: النصّ على الجزء الهادئ من الصورة */
	.hl-banner::after { background: linear-gradient(180deg, rgba(16, 10, 6, .62), rgba(16, 10, 6, .12) 75%); }
	.wide-banner img { object-position: 100% 50%; }
}


/* ---------------------------------------------------------------- التصنيف: التصفية المختارة وطريقة العرض */
.filter-bar { margin-bottom: 16px; }
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--pill); padding: 2px; }
.view-switch button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px; border-radius: var(--pill); color: var(--muted); }
.view-switch button[aria-pressed="true"] { background: var(--store-accent); color: var(--white); }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 30px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; background: var(--beige); border-radius: var(--pill); font-size: 13px; }
.chip:hover { background: var(--line); }
.chip-clear { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; margin-inline-start: 6px; }
.active-filters:not(:has(.chip)) { display: none; }
.listing-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px var(--gap); }
.listing-grid.is-list .book-card { flex-direction: row; gap: 20px; align-items: stretch; }
.listing-grid.is-list .book-media { flex: none; width: 128px; align-self: flex-start; }
.listing-grid.is-list .book-body { padding-top: 4px; }
.listing-grid.is-list .price-row { margin-top: 10px; justify-content: flex-start; gap: 16px; }
.listing-grid.is-list .book-tools { top: 8px; inset-inline-end: 8px; }
.listing-grid.is-list .book-badges { top: 8px; inset-inline-start: 8px; }
body[data-books-per-row] .listing-grid.is-list > * { display: flex; }
@media (max-width: 768px) {
	.view-switch { display: none; }
	.listing-grid.is-list { grid-template-columns: 1fr; }
	.active-filters { margin-bottom: 22px; }
}


/* ---------------------------------------------------------------- اختيار الصيغة (book.formats) */
.formats { display: flex; align-items: center; gap: 14px; width: 100%; flex-wrap: wrap; }
.formats-label { font-size: 13px; color: var(--muted); }
.formats-list { display: flex; gap: 8px; flex-wrap: wrap; }
.format-opt { display: inline-flex; flex-direction: column; align-items: flex-start; min-width: 110px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; line-height: 1.5; transition: border-color .2s; }
.format-opt b { font-size: 15px; font-weight: 700; color: var(--store-primary-dark); }
.format-opt:hover { border-color: var(--store-text); }
.format-opt[aria-current="true"] { border-color: var(--store-accent); box-shadow: inset 0 0 0 1px var(--store-accent); }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ *)) { display: none; }
.pdp-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 420px) { .pdp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* الجهاز اللوحيّ الصغير (600 إلى 768): ثلاثة كتبٍ في المسار بدل بطاقتين كبيرتين */
@media (min-width: 600px) and (max-width: 768px) {
	.book-grid.is-row, .book-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3.15); }
	.tall-track, .author-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
	.listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hl-grid, .hl-layout:not(:has(.hl-banner)) .hl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.post-grid:not(.blog-grid), .review-row { grid-auto-columns: 46%; }
}

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