/* =====================================================================
   قالب «موجة» — منصّة ناشر
   ألوان الهويّة متغيّراتٌ يختارها الناشر، وكلّ ما عداها محايد.
   ===================================================================== */

:root {
	--store-primary: #024178;
	--store-primary-dark: #012B50;
	--store-accent: #8A6200;
	--store-bg: #FFFFFF;
	--store-text: #1A1A1A;

	/* محايدة */
	--ink: #1A1A1A;
	--black: #000000;
	--muted: #5E5E5E;
	--line: #E5E5E5;
	--soft: #F7F7F7;
	--soft-2: #F0F0F0;
	--cream: #F6F2E6;
	--sale: #B42318;
	--new: #2F6B3A;
	--hot: #B10000;
	--gold: #F2A900;
	--star-off: #D4D4D4;

	--r: 8px;
	--r-lg: 12px;
	--pill: 999px;
	--gutter: 35px;
	--gap: 16px;
	--n: 4;
	--header-h: 72px;
	--font: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

/* ---------------------------------------------------------------- أساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 14px); }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	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; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
del { color: var(--muted); font-weight: 400; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-fill { fill: currentColor; stroke: none; }
.icon-sm { width: 18px; height: 18px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- أزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 28px;
	border: 1px solid transparent; border-radius: var(--pill);
	font-size: 15px; font-weight: 500; line-height: 1.2; white-space: nowrap;
	background: none; transition: background .2s, color .2s, border-color .2s;
}
.btn-dark { background: var(--black); color: #FFFFFF; }
.btn-dark:hover { background: var(--store-primary); }
.btn-primary { background: var(--store-primary); color: #FFFFFF; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-light { background: #FFFFFF; color: var(--black); }
.btn-light:hover { background: var(--black); color: #FFFFFF; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #FFFFFF; }
.btn-lg { min-height: 54px; padding: 0 34px; font-size: 16px; }
.btn-sm { min-height: 38px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: #E6E6E6; color: #5C5C5C; border-color: #E6E6E6; cursor: not-allowed; }
.icon-btn {
	display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0;
	border: 1px solid var(--line); border-radius: 50%; background: #FFFFFF; color: var(--ink);
	transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.icon-btn[aria-pressed="true"] { color: var(--hot); }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.link-under { text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }

/* ---------------------------------------------------------------- شريط الإعلان */
.topbar { background: #1A1A1A; color: #FFFFFF; font-size: 14px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 40px; }
.topbar-announce { display: flex; align-items: center; gap: 12px; }
.topbar-announce p:empty { display: none; }
.topbar-links { display: flex; gap: 22px; }
.topbar-links a { color: #FFFFFF; }
.topbar-links a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- الرأس */
.site-header { position: sticky; top: 0; z-index: 40; background: #FFFFFF; border-bottom: 1px solid var(--line); }
.header-main { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.brand-name { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: 0; }
.menu-toggle { display: none; border: 0; }
.main-nav { justify-self: center; }
.nav-list { display: flex; align-items: center; gap: 6px; }
.nav-list > li { position: relative; }
.nav-list > li > a, .nav-list > li > button {
	display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px;
	border: 0; background: none; font-size: 16px; font-weight: 500; color: var(--ink);
}
.nav-list > li > a:hover, .nav-list > li > button:hover { color: var(--store-primary); }
.nav-list .icon { width: 14px; height: 14px; }
.dropdown {
	position: absolute; top: 100%; inset-inline-start: 0; z-index: 50;
	display: grid; grid-template-columns: repeat(2, minmax(170px, 1fr)); gap: 24px;
	min-width: 420px; padding: 24px; background: #FFFFFF; border: 1px solid var(--line);
	border-radius: var(--r-lg); box-shadow: 0 18px 40px rgba(0, 0, 0, .08);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
}
.has-drop:hover .dropdown, .has-drop:focus-within .dropdown, .has-drop.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown h3 { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.dropdown li a { display: block; padding: 5px 0; font-size: 15px; }
.dropdown li a:hover { color: var(--store-primary); }
.header-tools { display: flex; align-items: center; gap: 14px; }
.search-pill {
	display: flex; align-items: center; gap: 6px; width: 240px; height: 42px; padding: 0 6px 0 16px;
	border: 1px solid var(--line); border-radius: var(--pill); background: #FFFFFF;
}
.search-pill button { order: -1; display: grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; padding: 0; }
.search-pill input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; }
.search-pill input::placeholder { color: #6B6B6B; }
.tool { position: relative; display: grid; place-items: center; width: 38px; height: 38px; color: var(--ink); }
.tool:hover { color: var(--store-primary); }
.count-badge {
	position: absolute; top: 0; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 4px;
	border-radius: 9px; background: var(--hot); color: #FFFFFF; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transition: .25s; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 70; width: min(340px, 88vw);
	display: flex; flex-direction: column; gap: 18px; padding: 20px; overflow-y: auto;
	background: #FFFFFF; transform: translateX(100%); transition: transform .3s; visibility: hidden;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop, .filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer .search-pill { width: 100%; }
.drawer-nav > li > a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-nav .sub { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.drawer-nav .sub a { padding: 4px 14px; border: 1px solid var(--line); border-radius: var(--pill); font-size: 14px; }
.drawer-contact { display: flex; align-items: center; gap: 10px; font-size: 15px; }

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

/* ---------------------------------------------------------------- عناوين الأقسام */
.section { padding-block: 90px; }
.section-soft { background: var(--soft); }
.sec-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 44px; }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--store-accent); }
.sec-title-row { display: flex; align-items: center; gap: 22px; }
.sec-title { font-size: 34px; font-weight: 800; line-height: 1.2; color: var(--ink); }
.row-arrow { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: none; color: var(--ink); }
.row-arrow:hover { color: var(--store-primary); }
.row-arrow .icon { width: 26px; height: 26px; stroke-width: 1.4; }

/* ---------------------------------------------------------------- نوع الكتاب، التقييم، السعر */
.type-dot {
	display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
	color: #FFFFFF; box-shadow: 0 0 0 2px #FFFFFF; flex-shrink: 0;
}
.type-dot .icon { width: 17px; height: 17px; stroke-width: 1.8; }
.type-dot[data-type="print"] { background: #DB7056; }
.type-dot[data-type="ebook"] { background: #5675A3; }
.type-dot[data-type="audio"] { background: #986AB0; }
.type-dot[data-type="educational"] { background: #3f8f6b; }
.rating { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .icon { width: 15px; height: 15px; }
.stars .off { color: var(--star-off); }
.rating-lg .stars .icon { width: 19px; height: 19px; }
.rating-lg { font-size: 15px; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 17px; font-weight: 500; color: var(--ink); }
.price del { font-size: 14px; }
.price-lg { font-size: 28px; font-weight: 700; }
.price-lg > span:first-child { color: var(--store-primary); }
.price-lg del { font-size: 17px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; line-height: 1.6; color: #FFFFFF; }
.badge-new { background: var(--new); }
.badge-sale { background: var(--sale); }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.book-media { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--r); background: var(--soft-2); }
.book-media > a { display: block; height: 100%; }
.book-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.book-card:hover .book-media img { transform: scale(1.04); }
.book-media .type-dot { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; }
.book-badges { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.book-wish { position: absolute; top: 54px; inset-inline-end: 9px; z-index: 2; width: 38px; height: 38px; border: 0; opacity: 0; transform: translateX(-6px); transition: .25s; }
.book-card:hover .book-wish, .book-card:focus-within .book-wish { opacity: 1; transform: none; }
@media (hover: none) {
	.book-wish { opacity: 1; transform: none; }
}
.book-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-top: 14px; }
/* زرّ السلّة: كبسولةٌ محيطيّة ظاهرةٌ دائمًا أسفل البطاقة، تمتلئ بالأسود عند التحويم */
.card-cart {
	display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
	min-height: 40px; margin-top: auto; padding: 0 12px;
	border: 1px solid var(--ink); border-radius: var(--pill); background: #FFFFFF; color: var(--ink);
	font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; transition: background .2s, color .2s;
}
.book-body > :nth-last-child(2) { margin-bottom: 10px; }
.card-cart:hover { background: var(--black); border-color: var(--black); color: #FFFFFF; }
.card-cart:disabled { border-color: var(--line); background: var(--soft); color: var(--muted); cursor: not-allowed; }
.book-title { font-size: 16px; font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-title a:hover { color: var(--store-primary); }
.book-author { font-size: 14px; color: var(--muted); }
.book-body .price { margin-top: 2px; }
.stock-band {
	position: absolute; inset-inline: 0; top: 50%; z-index: 2; transform: translateY(-50%);
	padding: 8px; background: #1A1A1A; color: #FFFFFF; font-size: 14px; font-weight: 700; text-align: center;
}
.book-card.is-out .book-media img { filter: grayscale(.7); opacity: .75; }

/* أشكال البطاقة */
body[data-card-style="framed"] .book-card { padding: 10px 10px 16px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-lg); }
body[data-card-style="framed"] .book-body { padding-inline: 4px; }
body[data-card-style="minimal"] .book-media { background: transparent; }
body[data-card-style="minimal"] .book-author { display: none; }
body[data-card-style="minimal"] .book-body { align-items: center; text-align: center; }

/* صفّ الكتب المتحرّك */
.book-row {
	display: grid; grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--n) - 1) * var(--gap)) / var(--n));
	gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.book-row::-webkit-scrollbar { display: none; }
.book-row > * { scroll-snap-align: start; }
.book-grid { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 36px var(--gap); }
.recent-row { --n: 6; }
.recent-row .book-title { font-size: 15px; }

/* ---------------------------------------------------------------- السلايدر */
.hero { position: relative; overflow: hidden; background: var(--soft-2); }
.slides { display: flex; transition: transform .7s cubic-bezier(.6, .05, .2, 1); }
.slide { position: relative; flex: 0 0 100%; min-height: 620px; display: flex; align-items: center; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide .container { position: relative; display: flex; justify-content: flex-end; }
.hero-card {
	width: min(450px, 100%); padding: 48px 44px; background: #FFFFFF; border-radius: var(--r);
	box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
}
.hero-card .tag { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.hero-card h2 { font-size: 46px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero-card p { color: var(--muted); font-size: 16px; margin-bottom: 30px; }
.slider-dots { position: absolute; bottom: 22px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.slider-dots button { width: 30px; height: 18px; padding: 0; border: 0; background: none; position: relative; }
.slider-dots button::before { content: ""; position: absolute; inset-inline: 0; top: 7px; height: 3px; background: #FFFFFF; border-radius: 2px; }
.slider-dots button[aria-current="true"]::before { background: var(--black); }

/* شريط العبارات */
.marquee { background: var(--store-primary); color: #FFFFFF; overflow: hidden; padding-block: 20px; }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee ul { display: flex; align-items: center; flex-shrink: 0; }
.marquee li { display: flex; align-items: center; font-size: 34px; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.marquee li::after { content: ""; width: 9px; height: 9px; margin-inline: 48px; border-radius: 50%; background: #FFFFFF; }
.marquee li:nth-child(even) { color: transparent; -webkit-text-stroke: 1.3px #FFFFFF; }
.marquee ul:empty { display: none; }
.marquee:has(ul[data-option]:empty) { display: none; }
@keyframes marquee { to { transform: translateX(50%); } }

/* التصنيفات الدائريّة */
.cat-circles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.cat-circle { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.cat-circle img { width: 100%; max-width: 180px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: var(--soft-2); transition: transform .3s; }
.cat-circle:hover img { transform: scale(1.04); }
.cat-circle h3 { font-size: 16px; font-weight: 500; }
.cat-circle sup { font-size: 11px; font-weight: 500; color: var(--muted); margin-inline-start: 3px; }

/* البانر العريض */
.wide-banner { position: relative; display: flex; align-items: flex-end; min-height: 620px; overflow: hidden; color: #FFFFFF; }
.wide-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wide-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(0, 0, 0, .55), rgba(0, 0, 0, .1) 65%); }
.wide-banner .container { position: relative; z-index: 1; padding-block: 70px; }
.banner-copy { max-width: 560px; }
.banner-copy h2 { color: #FFFFFF; font-size: 54px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.banner-copy p { color: #FFFFFF; font-size: 17px; margin-bottom: 28px; }

/* شريط الثقة */
.trust { padding-block: 70px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.trust-item .icon { width: 44px; height: 44px; stroke-width: 1.3; margin: 0 auto 16px; color: var(--ink); }
.trust-item h3 { font-size: 19px; font-weight: 500; margin-bottom: 6px; }
.trust-item p { font-size: 14px; color: var(--muted); }
body[data-show-trust-bar="false"] .trust { display: none; }

/* بطاقات التصنيف الطويلة */
.tall-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.tall-card { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--r-lg); background: var(--soft-2); }
.tall-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tall-card:hover img { transform: scale(1.05); }
.tall-card::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent); }
.tall-info { position: absolute; inset-inline: 24px; bottom: 24px; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; color: #FFFFFF; }
.tall-info h3 { color: #FFFFFF; font-size: 26px; font-weight: 700; }
.tall-info span { font-size: 15px; }
.round-go { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #FFFFFF; color: var(--black); flex-shrink: 0; transition: .2s; }
.tall-card:hover .round-go { background: var(--black); color: #FFFFFF; }

/* البانر الكبير وبطاقة الكتاب العائمة */
.feature { display: grid; }
.feature > * { grid-area: 1 / 1; }
.feature-banner { position: relative; display: flex; align-items: flex-end; min-height: 700px; overflow: hidden; color: #FFFFFF; }
.feature-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(0, 0, 0, .5), transparent 60%); }
.feature-banner .container { position: relative; z-index: 1; padding-block: 80px; }
.feature-books { position: relative; z-index: 2; justify-self: end; align-self: center; display: flex; align-items: center; gap: 18px; margin-inline-end: max(var(--gutter), calc((100vw - 1440px) / 2 + var(--gutter))); }
.feature:not(:has(.feature-banner)) .feature-books { justify-self: center; padding-block: 60px; }
.float-card { width: 270px; padding: 14px 14px 18px; background: #FFFFFF; border-radius: var(--r-lg); box-shadow: 0 24px 50px rgba(0, 0, 0, .2); }
.float-card .book-row { --n: 1; --gap: 14px; }
.float-arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #FFFFFF; color: var(--black); }
.float-arrow:hover { background: var(--black); color: #FFFFFF; }

/* كتاب الأسبوع وصفحة الكتاب */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.gallery { display: flex; flex-direction: column; gap: 14px; }
.gallery-main { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 7%; background: var(--soft); border-radius: var(--r-lg); overflow: hidden; }
.gallery-main img { height: 100%; width: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 24px 40px rgba(0, 0, 0, .18); }
.gallery-main .type-dot { position: absolute; top: 18px; inset-inline-end: 18px; width: 40px; height: 40px; }
.gallery-main .type-dot .icon { width: 20px; height: 20px; }
.thumbs { display: flex; gap: 12px; }
.thumbs button { width: 88px; aspect-ratio: 1; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { height: 100%; width: auto; margin: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.pdp-info { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 6px; }
.hot-tag { font-size: 15px; font-weight: 700; color: var(--hot); }
.pdp-info h1, .pdp-info .pdp-title { font-size: 40px; font-weight: 700; line-height: 1.2; }
.pdp-author { font-size: 16px; color: var(--muted); }
.pdp-author a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.pdp-type { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.pdp-type .type-dot { box-shadow: none; }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.price-row .badge { font-size: 13px; }
.ship-note { font-size: 15px; color: var(--ink); }
.ship-note a { text-decoration: underline; text-underline-offset: 3px; }
.pdp-lead { color: var(--muted); font-size: 16px; }
.pdp-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
.meta-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); }
.meta-item small { display: block; font-size: 13px; color: var(--muted); }
.meta-item b { font-size: 15px; font-weight: 700; }
.stock { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--new); }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.buy-row { display: flex; align-items: center; gap: 12px; width: 100%; }
.buy-row .btn-outline { flex: 1; }
.qty { display: inline-flex; align-items: center; height: 48px; border: 1px solid var(--line); border-radius: var(--pill); }
.qty button { width: 42px; height: 100%; border: 0; background: none; font-size: 20px; line-height: 1; }
.qty input { width: 40px; border: 0; background: none; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-info > .btn-dark { width: 100%; }
.pdp-perks { display: grid; gap: 10px; width: 100%; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; }
.pdp-perks li { display: flex; align-items: center; gap: 10px; }
.pdp-perks .icon { color: var(--store-primary); }
.sample-player { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: var(--r-lg); background: var(--soft); }
.sample-player .play { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--store-primary); color: #FFFFFF; padding: 0; flex-shrink: 0; }
.sample-player .play .icon { fill: currentColor; stroke: none; }
.sample-bar { flex: 1; height: 4px; border-radius: 2px; background: #DADADA; position: relative; }
.sample-bar span { position: absolute; inset-block: 0; inset-inline-start: 0; width: 30%; background: var(--ink); border-radius: 2px; }
.sample-player small { font-size: 13px; color: var(--muted); white-space: nowrap; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 8px; color: #8A8A8A; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb [aria-current] { color: var(--ink); }

/* التبويبات */
.tabs { margin-top: 80px; }
.tab-list { display: flex; justify-content: center; gap: 36px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab-list button { padding: 14px 2px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font-size: 20px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.tab-list button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.tab-panel { padding-top: 36px; max-width: 980px; margin-inline: auto; }
.prose p + p { margin-top: 14px; }
.prose { font-size: 17px; color: #333333; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.spec-table th, .spec-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: start; }
.spec-table th { width: 34%; font-weight: 500; color: var(--muted); background: var(--soft); }
.reviews-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; }
.reviews-summary strong { display: block; font-size: 56px; font-weight: 800; line-height: 1; margin-bottom: 8px; }
.rating-bars { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; }
.rating-bars li { display: grid; grid-template-columns: 60px 1fr 40px; align-items: center; gap: 10px; }
.bar { height: 6px; border-radius: 3px; background: var(--soft-2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); }
.review-note { margin-top: 16px; font-size: 14px; color: var(--muted); }
.review-form { margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); display: grid; gap: 12px; }
.review-form h3 { font-size: 17px; }
.star-pick { display: flex; gap: 4px; direction: ltr; justify-content: flex-end; }
.star-pick label { cursor: pointer; color: var(--star-off); }
.star-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-pick input:checked ~ label, .star-pick label:hover, .star-pick label:hover ~ label { color: var(--gold); }
.star-pick .icon { width: 24px; height: 24px; }
.field { width: 100%; min-height: 46px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--r); background: #FFFFFF; font-size: 15px; }
textarea.field { min-height: 110px; resize: vertical; }
.field:focus { outline: 0; border-color: var(--ink); }
.review-list { display: grid; gap: 16px; }

/* آراء القرّاء */
.reviews-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - var(--gap)) / 2); gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.reviews-row::-webkit-scrollbar { display: none; }
.review-card { scroll-snap-align: start; display: grid; grid-template-columns: 200px minmax(0, 1fr); background: #FFFFFF; border-radius: var(--r-lg); overflow: hidden; }
.review-card > img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2 / 3; }
.review-body { display: flex; flex-direction: column; gap: 16px; padding: 34px 26px; }
.review-body p { color: var(--muted); font-size: 16px; }
.review-who { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.review-avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--soft-2); font-weight: 700; color: var(--ink); flex-shrink: 0; }
.review-who b { display: block; font-weight: 500; }
.review-who small { font-size: 14px; color: var(--muted); }
.review-who small b { display: inline; color: var(--ink); }
.review-item { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #FFFFFF; }
.review-item p { color: #3D3D3D; }
.scroll-progress { width: 320px; max-width: 70%; height: 3px; margin: 48px auto 0; background: #DADADA; border-radius: 2px; overflow: hidden; }
.scroll-progress span { display: block; width: 50%; height: 100%; background: var(--ink); transition: width .2s; }
body[data-show-reviews="false"] .home-reviews,
body[data-show-reviews="false"] .reviews-tab,
body[data-show-reviews="false"] .reviews-panel { display: none !important; }

/* المؤلّفون */
.authors-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.author-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--soft-2); }
.author-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.author-tile:hover img { transform: scale(1.05); }
.author-tile::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent); }
.author-tile-info { position: absolute; inset-inline: 22px; bottom: 20px; z-index: 1; color: #FFFFFF; }
.author-tile-info h3 { color: #FFFFFF; font-size: 22px; font-weight: 700; }
.author-tile-info span { font-size: 14px; }

/* ---------------------------------------------------------------- التذييل */
.site-footer { padding-top: 80px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.7fr; gap: 40px; }
.footer-about .brand { margin-bottom: 22px; }
.footer-about .brand-name { font-size: 30px; }
.contact-list { display: grid; gap: 12px; color: var(--muted); font-size: 15px; }
.contact-list li { display: flex; align-items: center; gap: 12px; }
.contact-list .circ { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); flex-shrink: 0; }
.contact-list .icon { width: 16px; height: 16px; }
.social { display: flex; gap: 10px; margin-top: 22px; }
.social a { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); transition: .2s; }
.social a:hover { background: var(--ink); color: #FFFFFF; }
.footer-col h3 { font-size: 21px; font-weight: 700; margin-bottom: 22px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { font-size: 15px; color: var(--muted); }
.footer-col a:hover { color: var(--ink); }
.footer-col p { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.newsletter { display: flex; align-items: center; height: 52px; padding-inline-start: 22px; border: 1px solid var(--line); border-radius: var(--pill); }
.newsletter input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 15px; }
.newsletter input::placeholder { color: #6B6B6B; }
.newsletter button { height: 46px; width: 84px; margin-inline-end: 2px; border: 0; border-radius: var(--pill); background: var(--black); color: #FFFFFF; display: grid; place-items: center; padding: 0; }
.newsletter button:hover { background: var(--store-primary); }
.footer-mark {
	margin-top: 40px; overflow: hidden; height: clamp(34px, 10.4vw, 158px);
	font-size: clamp(42px, 13vw, 200px); font-weight: 800; line-height: 1; text-align: center;
	color: var(--cream); white-space: nowrap; user-select: none; border-bottom: 1px solid var(--line);
}
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 22px; font-size: 14px; color: var(--ink); }
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- رأس التصنيف والتصفية */
.page-hero { position: relative; display: grid; place-items: center; min-height: 340px; overflow: hidden; text-align: center; color: #FFFFFF; }
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .38); }
.page-hero .container { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-block: 60px; }
.page-hero h1 { color: #FFFFFF; font-size: 56px; font-weight: 800; }
.page-hero p { color: #FFFFFF; max-width: 620px; font-size: 17px; }
.page-hero .breadcrumb, .page-hero .breadcrumb [aria-current] { color: #FFFFFF; }
.page-hero .breadcrumb li + li::before { color: #FFFFFF; }
.sub-cats { display: grid; grid-auto-flow: column; grid-auto-columns: 130px; justify-content: center; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.sub-cats .cat-circle img { max-width: 120px; }
.sub-cats .cat-circle h3 { font-size: 15px; }
.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start; }
.listing .book-grid { --n: 4; }
body[data-books-per-row="3"] .listing .book-grid { --n: 3; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 24px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h2 { font-size: 22px; font-weight: 800; }
.filters-head .icon-btn { display: none; }
.filter-box { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.filter-box h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--black); }
.check .count { margin-inline-start: auto; font-size: 13px; color: var(--muted); }
.check .type-dot { width: 22px; height: 22px; box-shadow: none; }
.check .type-dot .icon { width: 12px; height: 12px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.toolbar p { color: var(--muted); }
.toolbar p b { color: var(--ink); }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.toolbar select.field { width: auto; min-width: 190px; border-radius: var(--pill); }
.filters-toggle { display: none; }

/* ترقيم الصفحات */
.pagination { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 60px; }
.pg-progress { width: 320px; max-width: 80%; height: 3px; border-radius: 2px; background: #DADADA; overflow: hidden; }
.pg-progress span { display: block; height: 100%; background: var(--ink); }
.pg-note { font-size: 14px; color: var(--muted); }
.pg-list { display: flex; align-items: center; gap: 8px; }
.pg-list a, .pg-list span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border: 1px solid var(--line); border-radius: 50%; font-weight: 500; }
.pg-list a:hover { border-color: var(--ink); }
.pg-list [aria-current="page"] { background: var(--black); border-color: var(--black); color: #FFFFFF; }
.pg-list .gap { border: 0; min-width: 20px; }

/* ---------------------------------------------------------------- المؤلّف */
.author-hero { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 60px; align-items: center; }
.author-hero > img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); background: var(--soft-2); }
.author-hero h1 { font-size: 54px; font-weight: 800; margin: 8px 0 10px; }
.author-count { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: var(--pill); background: var(--soft); font-size: 15px; font-weight: 500; }
.author-bio { margin-top: 22px; color: #3D3D3D; font-size: 17px; }
.author-bio p + p { margin-top: 12px; }

/* ---------------------------------------------------------------- السلّة */
.cart-page { background: var(--soft); padding-block: 50px 90px; }
.cart-page h1 { font-size: 44px; font-weight: 800; margin: 10px 0 30px; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 30px; align-items: start; }
.cart-items { display: grid; gap: 12px; }
.cart-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto 110px 40px; align-items: center; gap: 20px; padding: 16px 20px; background: #FFFFFF; border-radius: var(--r-lg); }
.cart-row > a img { width: 84px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.cart-info h3 { font-size: 17px; font-weight: 500; }
.cart-info p { font-size: 14px; color: var(--muted); }
.cart-type { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; color: var(--muted); }
.cart-type .type-dot { width: 22px; height: 22px; box-shadow: none; }
.cart-type .type-dot .icon { width: 12px; height: 12px; }
.cart-unit { margin-top: 4px; }
.cart-unit .price { font-size: 15px; }
.cart-total { font-weight: 700; text-align: end; }
.cart-row .icon-btn { width: 38px; height: 38px; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.summary { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; padding: 28px; background: #FFFFFF; border-radius: var(--r-lg); }
.summary h2 { font-size: 24px; font-weight: 800; }
.coupon { display: flex; gap: 8px; }
.coupon .field { border-radius: var(--pill); }
.coupon-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 14px; border-radius: var(--pill); background: var(--soft); font-size: 14px; width: fit-content; }
.coupon-chip button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: #FFFFFF; padding: 0; }
.coupon-chip .icon { width: 14px; height: 14px; }
.sum-rows { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }
.sum-rows div { display: flex; justify-content: space-between; }
.sum-rows .total { padding-top: 12px; border-top: 1px solid var(--line); font-size: 19px; font-weight: 800; }
.sum-note { font-size: 13px; color: var(--muted); }
.cart-empty { padding: 60px 20px; text-align: center; background: #FFFFFF; border-radius: var(--r-lg); }
.cart-empty h2 { font-size: 28px; margin-bottom: 10px; }

/* ---------------------------------------------------------------- 404 */
.nf-hero { position: relative; overflow: hidden; text-align: center; }
.nf-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nf-hero .container { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-block: 90px 100px; }
.nf-hero .nf-code { font-size: clamp(130px, 22vw, 260px); font-weight: 800; line-height: .9; color: var(--store-primary); }
.nf-hero h1 { font-size: 36px; font-weight: 800; }
.nf-hero p { color: #333333; max-width: 520px; }
.nf-search { width: min(520px, 100%); height: 54px; margin-top: 10px; }
.nf-search.search-pill { width: min(520px, 100%); background: #FFFFFF; }

/* ---------------------------------------------------------------- components.html */
.kit-intro { padding-block: 60px 20px; }
.kit-intro h1 { font-size: 46px; font-weight: 800; margin: 6px 0 10px; }
.kit-intro p { color: var(--muted); max-width: 760px; }
.kit-block { padding-block: 50px; border-top: 1px solid var(--line); }
.kit-block > .container > h2 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.kit-note { color: var(--muted); margin-bottom: 24px; font-size: 15px; }
.kit-note code { direction: ltr; unicode-bidi: embed; background: var(--soft); padding: 1px 6px; border-radius: 4px; font-size: 14px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.kit-label { font-weight: 700; min-width: 110px; }
.kit-dark { padding: 18px; border-radius: var(--r-lg); background: var(--store-primary); }
.kit-types { display: flex; flex-wrap: wrap; gap: 28px; }
.kit-types figure { margin: 0; display: flex; align-items: center; gap: 10px; }
.kit-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kit-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }

/* ---------------------------------------------------------------- الحركة */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.reveal.is-in, html:not(.js) .reveal { opacity: 1; transform: none; }
/* ==========================================================================
   ميزات المنصّة المعتمدة (SPEC، الملحق 8)
   ========================================================================== */
.book-quick { position: absolute; top: 98px; inset-inline-end: 9px; z-index: 2; width: 38px; height: 38px; border: 0; opacity: 0; transform: translateX(-6px); transition: .25s; }
.book-card:hover .book-quick, .book-card:focus-within .book-quick { opacity: 1; transform: none; }
@media (hover: none) { .book-quick { opacity: 1; transform: none; } }
.badge-best { background: var(--black); }
.qty-deal { display: inline-flex; align-self: flex-start; padding: 4px 12px; border: 1px dashed var(--sale); border-radius: var(--pill); color: var(--sale); font-size: 14px; font-weight: 700; }
.nl-offer { margin-top: 10px; font-size: 14px; font-weight: 700; }

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

/* ---------------------------------------------------------------- الأجهزة اللوحيّة */
@media (max-width: 1180px) {
	.main-nav, .search-pill.in-header { display: none; }
	.menu-toggle { display: inline-grid; }
	.header-main { grid-template-columns: auto 1fr auto; gap: 8px; }
	.header-main .brand { justify-self: start; }
	body[data-books-per-row="5"], body[data-books-per-row="6"] { --n: 4; }
	.cat-circles { gap: 16px; }
	.pdp { gap: 40px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.listing { grid-template-columns: 240px minmax(0, 1fr); gap: 28px; }
	.listing .book-grid { --n: 3 !important; }
	.cart-layout { grid-template-columns: minmax(0, 1fr) 340px; }
	.recent-row { --n: 5; }
}
@media (max-width: 1024px) {
	:root { --gutter: 24px; }
	.topbar-links { display: none; }
	.topbar .container { justify-content: center; }
	body[data-books-per-row] { --n: 3; }
	.recent-row { --n: 4; }
	.section { padding-block: 70px; }
	.cat-circles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 150px; overflow-x: auto; scrollbar-width: none; }
	.trust-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
	.pdp { grid-template-columns: 1fr; }
	.gallery { max-width: 560px; width: 100%; margin-inline: auto; }
	.reviews-layout { grid-template-columns: 1fr; gap: 30px; }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 70; width: min(340px, 88vw);
		padding: 20px; overflow-y: auto; background: #FFFFFF; transform: translateX(100%); visibility: hidden; transition: transform .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-head .icon-btn, .filters-toggle { display: inline-flex; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.author-hero { grid-template-columns: 300px minmax(0, 1fr); gap: 36px; }
	.feature-books { margin-inline-end: var(--gutter); }
	.reviews-row { grid-auto-columns: 85%; }
	.kit-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- الهاتف */
@media (max-width: 768px) {
	:root { --gutter: 16px; --gap: 12px; --header-h: 60px; }
	body { padding-bottom: 66px; }
	.header-tools .hide-sm { display: none; }
	.brand-name { font-size: 21px; }
	.brand img { width: 36px; height: 36px; }
	.section { padding-block: 56px; }
	.sec-head { margin-bottom: 28px; }
	.sec-title { font-size: 25px; }
	.sec-title-row { gap: 12px; }
	body[data-books-per-row] { --n: 2; }
	.book-row { grid-auto-columns: 46%; }
	.book-grid { gap: 28px var(--gap); }
	.listing .book-grid { --n: 2 !important; }
	.recent-row { grid-auto-columns: 38%; }
	.book-title { font-size: 15px; }
	.card-cart { min-height: 40px; font-size: 13px; padding: 0 8px; gap: 5px; }
	.slide { min-height: 520px; align-items: flex-end; }
	.slide .container { padding-bottom: 50px; }
	.hero-card { padding: 26px 22px; }
	.hero-card h2 { font-size: 30px; }
	.hero-card p { font-size: 15px; margin-bottom: 20px; }
	.marquee { padding-block: 14px; }
	.marquee li { font-size: 24px; }
	.marquee li::after { margin-inline: 28px; width: 7px; height: 7px; }
	.cat-circles { grid-auto-columns: 40%; }
	.wide-banner { min-height: 480px; }
	.wide-banner::after { background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, .1)); }
	.banner-copy h2 { font-size: 34px; }
	.banner-copy p { font-size: 15px; }
	.trust { padding-block: 50px; }
	.trust-grid { gap: 28px 14px; }
	.trust-item h3 { font-size: 16px; }
	.trust-item .icon { width: 36px; height: 36px; }
	.tall-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.tall-card { scroll-snap-align: start; }
	.feature > * { grid-area: auto; }
	.feature-banner { min-height: 460px; }
	.feature-banner::after { background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent 70%); }
	.feature-banner .container { padding-block: 40px 120px; }
	.feature-books { justify-self: center; margin: -90px auto 0; gap: 10px; }
	.float-card { width: 230px; }
	.float-card .book-row { grid-auto-columns: 100%; }
	.float-arrow { width: 38px; height: 38px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
	.pdp-info h1, .pdp-info .pdp-title { font-size: 30px; }
	.price-lg { font-size: 24px; }
	.pdp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.buy-row { gap: 8px; }
	.buy-row .btn-outline { min-width: 0; padding: 0 14px; }
	.qty button { width: 34px; }
	.qty input { width: 30px; }
	.tabs { margin-top: 56px; }
	.tab-list { justify-content: flex-start; gap: 24px; }
	.tab-list button { font-size: 17px; }
	.reviews-row { grid-auto-columns: 90%; }
	.review-card { grid-template-columns: 1fr; }
	.review-card > img { aspect-ratio: 16 / 9; height: auto; object-position: center 30%; }
	.review-body { padding: 22px 20px; }
	.authors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.author-tile-info h3 { font-size: 18px; }
	.site-footer { padding-top: 56px; }
	.footer-grid { grid-template-columns: 1fr; gap: 32px; }
	.footer-col h3 { margin-bottom: 14px; }
	.footer-bottom { flex-direction: column; text-align: center; }
	.page-hero { min-height: 260px; }
	.page-hero h1 { font-size: 38px; }
	.sub-cats { justify-content: start; grid-auto-columns: 100px; gap: 16px; }
	.sub-cats .cat-circle img { max-width: 96px; }
	.toolbar select.field { min-width: 0; }
	.author-hero { grid-template-columns: 1fr; }
	.author-hero > img { max-width: 320px; }
	.author-hero h1 { font-size: 38px; }
	.cart-page h1 { font-size: 32px; }
	.cart-row { grid-template-columns: 70px minmax(0, 1fr) 36px; grid-template-areas: "img info del" "img qty total"; gap: 10px 14px; padding: 14px; }
	.cart-row > a { grid-area: img; align-self: start; }
	.cart-row > a img { width: 70px; }
	.cart-info { grid-area: info; }
	.cart-row .qty { grid-area: qty; height: 40px; justify-self: start; }
	.cart-row .qty button { width: 34px; }
	.cart-total { grid-area: total; grid-column: 2 / 4; text-align: end; align-self: center; justify-self: end; }
	.cart-row .icon-btn { grid-area: del; }
	.summary { padding: 22px; }
	.nf-hero h1 { font-size: 26px; }
	.kit-grid-2 { grid-template-columns: 1fr; }

	.mobile-bar {
		position: fixed; inset-inline: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
		height: 62px; background: #FFFFFF; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0, 0, 0, .05);
	}
	.mobile-bar a, .mobile-bar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; padding: 0; font-size: 12px; color: var(--ink); }
	.mobile-bar .count-badge { top: 4px; inset-inline-end: calc(50% - 22px); }
}
@media (max-width: 420px) {
	.hero-card h2 { font-size: 27px; }
	.pdp-meta { grid-template-columns: 1fr 1fr; }
	.sec-title { font-size: 23px; }
}

/* ==========================================================================
   تطوير المتجر: عروضٌ بعدّاد، وتبويبات، ومدوّنة، وتصفيةٌ نشطة، وصيغ الكتاب
   ========================================================================== */
.sec-more { display: flex; justify-content: center; margin-top: 44px; }

/* عروض الموسم: شريطٌ كحليّ بعدّادٍ واحد، والكتب على بطاقاتٍ بيضاء عائمة */
.deal-band { background: var(--store-primary); color: #FFFFFF; }
.deal-layout { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 48px; align-items: center; }
.deal-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.deal-intro .eyebrow { color: var(--cream); font-weight: 700; }
.deal-intro .sec-title { color: #FFFFFF; font-size: 40px; }
.deal-sub { color: #FFFFFF; opacity: .92; font-size: 16px; }
.countdown { display: flex; gap: 10px; margin: 10px 0 14px; }
.cd-unit { display: grid; place-items: center; min-width: 66px; padding: 10px 6px 8px; border-radius: var(--r); background: #FFFFFF; color: var(--ink); line-height: 1.1; }
.cd-unit b { font-size: 28px; font-weight: 800; color: var(--store-primary); font-variant-numeric: tabular-nums; }
.cd-unit small { margin-top: 4px; font-size: 12px; color: var(--muted); }
.deal-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.deal-band .book-card { padding: 12px 12px 16px; background: #FFFFFF; color: var(--ink); border-radius: var(--r-lg); box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }

/* تبويبات صفّ الكتب (القاعدة 16): كبسولاتٌ تحت العنوان، والمختار أسود */
.row-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.row-tab { min-height: 40px; padding: 0 20px; border: 1px solid var(--line); border-radius: var(--pill); background: #FFFFFF; font-size: 15px; font-weight: 500; color: var(--ink); }
.row-tab:hover { border-color: var(--ink); }
.row-tab[aria-selected="true"] { background: var(--black); border-color: var(--black); color: #FFFFFF; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }
/* شبكة التبويبات صفّان كاملان بأيّ عددٍ في الصفّ */
.tab-grid > :nth-child(n + 9) { display: none; }
body[data-books-per-row="3"] .tab-grid > :nth-child(n + 7) { display: none; }
body[data-books-per-row="5"] .tab-grid > :nth-child(-n + 10) { display: flex; }
body[data-books-per-row="6"] .tab-grid > :nth-child(-n + 12) { display: flex; }

/* المدوّنة */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px var(--gap); }
.post-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: #FFFFFF; }
.section:not(.section-soft) .post-card { border: 1px solid var(--line); }
.post-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft-2); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 22px 22px; }
.post-date { font-size: 14px; font-weight: 500; color: var(--store-accent); }
.post-title { font-size: 20px; font-weight: 800; line-height: 1.4; }
.post-title a:hover { color: var(--store-primary); }
.post-excerpt { color: var(--muted); font-size: 15px; }
.post-more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.post-more:hover { color: var(--store-primary); }
.post-grid.is-blog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-grid.is-blog .post-card.is-lead { grid-column: 1 / -1; flex-direction: row; }
.post-card.is-lead .post-media { flex: 0 0 56%; aspect-ratio: 16 / 9; }
.post-card.is-lead .post-body { justify-content: center; padding: 34px 38px; }
.post-card.is-lead .post-title { font-size: 30px; }
.page-head { padding-block: 48px 40px; background: var(--soft); text-align: center; }
.page-head .breadcrumb { justify-content: center; margin-bottom: 14px; }
.page-head h1 { font-size: 46px; font-weight: 800; }
.page-head p { max-width: 620px; margin: 10px auto 0; color: var(--muted); }
.article { max-width: 780px; margin-inline: auto; }
.article-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 34px; }
.article-head .breadcrumb { justify-content: center; }
.article-title { font-size: 44px; font-weight: 800; line-height: 1.25; }
.article-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.article-img { width: 100%; margin: 34px 0; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-lg); }
.article-body { font-size: 18px; line-height: 1.95; color: #333333; }
.article-body p + p, .article-body blockquote, .article-body h2 { margin-top: 20px; }
.article-body h2 { font-size: 26px; font-weight: 800; color: var(--ink); }
.article-body blockquote { margin-inline: 0; padding: 18px 24px; border-inline-start: 4px solid var(--store-primary); background: var(--soft); border-radius: 0 var(--r) var(--r) 0; font-size: 20px; font-weight: 700; color: var(--ink); }
.article-book { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-top: 34px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.article-book img { width: 90px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.article-book small { display: block; color: var(--store-accent); font-weight: 500; }
.article-book b { font-size: 18px; }

/* التصفية النشطة وتبديل العرض */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -12px 0 24px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--pill); background: #FFFFFF; font-size: 14px; }
.chip .icon { width: 14px; height: 14px; }
.chip:hover { border-color: var(--ink); }
.chip-clear { font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; margin-inline-start: 4px; }
.view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); }
.view-switch button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--muted); padding: 0; }
.view-switch button[aria-pressed="true"] { background: var(--black); color: #FFFFFF; }
.book-grid.is-list { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
.book-grid.is-list .book-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #FFFFFF; }
.book-grid.is-list .book-body { padding-top: 4px; height: 100%; }
.book-grid.is-list .card-cart { width: auto; align-self: flex-start; padding: 0 22px; }
.book-grid.is-list .book-wish, .book-grid.is-list .book-quick { display: none; }

/* اختيار الصيغة */
.formats-box { width: 100%; }
.formats-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format-opt { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 16px 8px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #FFFFFF; }
.format-opt:hover { border-color: var(--ink); }
.format-opt.is-current { border-color: var(--store-primary); box-shadow: inset 0 0 0 1px var(--store-primary); }
.format-opt .type-dot { width: 28px; height: 28px; box-shadow: none; }
.format-opt .type-dot .icon { width: 15px; height: 15px; }
.format-name { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; }
.format-price { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; white-space: nowrap; }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ [data-preview-copy])) { display: none; }

/* أعمال المؤلّف: ستّة في صفٍّ واحد */
.works-grid { --n: 6 !important; }

/* كتاب الأسبوع: معرضٌ أقصر حتّى لا يبقى تحت المعلومات فراغ */
[data-region="home_spotlight"] .gallery-main { aspect-ratio: 5 / 4; }

@media (max-width: 1180px) {
	.deal-layout { grid-template-columns: 1fr; gap: 32px; }
	.deal-intro { align-items: center; text-align: center; }
	.works-grid { --n: 3 !important; }
	body[data-books-per-row] .tab-grid > :nth-child(n + 9) { display: none; }
}
@media (max-width: 1024px) {
	body[data-books-per-row] .tab-grid > :nth-child(n + 7) { display: none; }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid:not(.is-blog) > :nth-child(3) { display: none; }
	.post-grid.is-blog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid.is-blog .post-card.is-lead { grid-column: auto; flex-direction: column; }
	.post-card.is-lead .post-media { flex: none; aspect-ratio: 16 / 10; }
	.post-card.is-lead .post-body { padding: 20px 22px 22px; }
	.post-card.is-lead .post-title { font-size: 20px; }
}
@media (max-width: 768px) {
	.trust { padding-block: 18px; border-bottom: 1px solid var(--line); }
	.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); }
	.trust-grid::-webkit-scrollbar { display: none; }
	.trust-item { flex: 0 0 auto; scroll-snap-align: start; display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); text-align: start; }
	.trust-item .icon { grid-row: span 2; width: 28px; height: 28px; margin: 0; }
	.trust-item h3 { font-size: 15px; margin: 0; }
	.trust-item p { font-size: 12px; white-space: nowrap; }
	.deal-intro .sec-title { font-size: 28px; }
	.cd-unit { min-width: 58px; }
	.cd-unit b { font-size: 24px; }
	.deal-cards { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 18px; }
	.deal-cards::-webkit-scrollbar { display: none; }
	.deal-cards > * { scroll-snap-align: start; }
	.deal-band .book-card { padding: 8px 8px 12px; }
	.row-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 2 * var(--gutter)); }
	.row-tab { flex-shrink: 0; padding: 0 16px; }
	.post-grid, .post-grid.is-blog { 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(.is-blog) > :nth-child(3) { display: flex; }
	.post-grid.is-blog { grid-auto-flow: row; grid-template-columns: 1fr; overflow: visible; }
	.post-title { font-size: 18px; }
	.post-card.is-lead .post-title { font-size: 22px; }
	.post-card.is-lead .post-body { padding: 20px 22px 22px; }
	.page-head h1, .article-title { font-size: 30px; }
	.article-body { font-size: 17px; }
	.article-book { grid-template-columns: 70px minmax(0, 1fr); }
	.article-book img { width: 70px; }
	.article-book .btn { grid-column: 1 / -1; }
	.works-grid { --n: 2 !important; }
	.view-switch { display: none; }
	.book-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.format-opt { flex: 1 1 0; min-width: 0; padding-inline: 10px; }
	.pdp-meta > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
	.format-opt .type-dot { display: none; }
}

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