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

:root {
	--store-primary: #F55266;
	--store-primary-dark: #D93B50;
	--store-accent: #222934;
	--store-bg: #FFFFFF;
	--store-text: #181D25;

	/* محايدات */
	--on-primary: #12161D;          /* نصّ الزرّ الأساسيّ: الأبيض على المرجانيّ دون 4.5 */
	--muted: #4E5562;
	--muted-2: #6C727F;
	--line: #E0E5EB;
	--soft: #F5F7FA;
	--soft-2: #EEF1F6;
	--head-btn: #333D4C;
	--on-dark: #FFFFFF;
	--on-dark-muted: #B4BAC4;
	--star: #F59E0B;
	--sale: #D7263D;
	--new: #2563EB;
	--ok: #1F7A4D;

	--t-print: #DB7056;
	--t-ebook: #5675A3;
	--t-audio: #986AB0;
	--t-edu: #3f8f6b;

	--tint-1: color-mix(in srgb, var(--store-primary) 26%, #E7F0FD);
	--tint-2: color-mix(in srgb, var(--store-primary) 7%, #F4F8FE);

	--r-sm: 4px;
	--r: 8px;
	--r-lg: 16px;
	--shadow: 0 6px 24px rgba(24, 29, 37, .08);
	--shadow-lg: 0 14px 40px rgba(24, 29, 37, .14);
	--font: "Tajawal", system-ui, sans-serif;
	--container: 1296px;
	--gap: 24px;
}

body[data-corners="sharp"] {
	--r-sm: 0;
	--r: 0;
	--r-lg: 0;
}

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

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-flip { transform: scaleX(-1); }

/* ---------------------------------------------------------------- أزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 20px;
	border: 1px solid transparent; border-radius: var(--r);
	font-weight: 700; font-size: 15px; white-space: nowrap;
	background: var(--soft-2); color: var(--store-text);
	transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--line); }
.btn-primary { background: var(--store-primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--store-accent); color: var(--on-dark); }
.btn-dark { background: var(--store-accent); color: var(--on-dark); }
.btn-dark:hover { background: var(--store-text); }
.btn-outline { background: transparent; border-color: var(--line); }
.btn-outline:hover { background: var(--soft); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--soft-2); color: var(--muted); cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; }

.icon-btn {
	display: inline-grid; place-items: center;
	width: 40px; height: 40px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--store-bg); color: var(--store-text);
	transition: background .2s, border-color .2s;
}
.icon-btn:hover { background: var(--soft); }

.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 14px; color: var(--store-text); white-space: nowrap; }
.link-more:hover { text-decoration: underline; }
.link-more .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- شارات ونجوم وأسعار */
.badge { display: inline-block; padding: 1px 7px; border-radius: var(--r-sm); font-size: 12px; font-weight: 700; color: #fff; line-height: 1.6; }
.badge-sale { background: var(--sale); }
.badge-new { background: var(--new); }

.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: var(--star); }
.stars .icon { width: 13px; height: 13px; }
.stars .off { color: #D5DAE1; }
.rating-lg .stars .icon { width: 17px; height: 17px; }

.price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 800; font-size: 18px; color: var(--store-text); }
.price del { font-weight: 400; font-size: 13px; color: var(--muted); }
.price-lg { font-size: 28px; }
.price-lg del { font-size: 17px; }

.type-dot {
	display: inline-grid; place-items: center;
	width: 28px; height: 28px; border-radius: 50%;
	color: #fff; box-shadow: 0 0 0 2px #fff;
}
.type-dot .icon { width: 15px; height: 15px; stroke-width: 2; }
.type-dot[data-type="print"] { background: var(--t-print); }
.type-dot[data-type="ebook"] { background: var(--t-ebook); }
.type-dot[data-type="audio"] { background: var(--t-audio); }
.type-dot[data-type="educational"] { background: var(--t-edu); }

/* ==========================================================================
   الرأس الكحليّ من صفّين
   ========================================================================== */
.site-header { background: var(--store-accent); color: var(--on-dark); position: sticky; top: 0; z-index: 40; }
.head-top .container { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: 0; }
.menu-toggle { display: none; background: transparent; border-color: transparent; color: var(--on-dark); }
.menu-toggle:hover { background: var(--head-btn); }

.head-search { flex: 1; max-width: 520px; margin-inline-start: 30px; position: relative; }
.head-search input {
	width: 100%; height: 46px; padding: 0 48px 0 18px;
	border-radius: 999px; border: 1px solid #5B6474; background: transparent; color: var(--on-dark);
}
.head-search input::placeholder { color: var(--on-dark-muted); opacity: 1; }
.head-search button {
	position: absolute; inset-inline-start: 6px; top: 50%; transform: translateY(-50%);
	width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--on-dark);
	display: grid; place-items: center;
}
.head-promo { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.head-promo:has([data-option]:empty) { display: none; }
.head-promo .promo-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--head-btn); display: grid; place-items: center; color: var(--store-primary); }
.head-promo small { display: block; font-size: 12px; color: var(--on-dark-muted); line-height: 1.3; }
.head-promo b { display: block; max-width: 190px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.head-actions { display: flex; align-items: center; gap: 4px; }
.head-btn {
	position: relative; display: grid; place-items: center;
	width: 44px; height: 44px; border-radius: 50%; color: var(--on-dark);
	background: transparent; border: 0;
}
.head-btn:hover { background: var(--head-btn); }
.head-btn.is-cart { background: var(--head-btn); }
.head-btn .count {
	position: absolute; top: -2px; inset-inline-end: -2px;
	min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
	background: var(--store-primary); color: var(--on-primary);
	font-size: 12px; font-weight: 800; line-height: 20px; text-align: center;
}

.head-nav .container { display: flex; align-items: stretch; gap: 26px; min-height: 52px; }
.cat-toggle {
	position: relative; display: flex; align-items: center; gap: 10px;
	width: 276px; flex: none; padding: 0 16px; margin-top: auto;
	height: 52px; border: 0; border-radius: var(--r) var(--r) 0 0;
	background: var(--head-btn); color: var(--on-dark); font-weight: 700; font-size: 15px;
}
.cat-toggle .chev { margin-inline-start: auto; transition: transform .2s; }
.cat-wrap { position: relative; }
.cat-wrap.open .cat-toggle .chev { transform: rotate(180deg); }
.cat-drop {
	position: absolute; top: 100%; inset-inline-start: 0; width: 276px;
	display: none; z-index: 30;
}
.cat-wrap.open .cat-drop { display: block; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { position: relative; display: flex; align-items: center; height: 52px; padding: 0 12px; font-weight: 500; font-size: 15px; color: var(--on-dark); }
.main-nav a::after { content: ""; position: absolute; inset-inline: 12px; bottom: 12px; height: 2px; background: var(--store-primary); transform: scaleX(0); transition: transform .2s; }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-extra { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; color: var(--on-dark-muted); font-size: 14px; }
.nav-extra .icon { width: 18px; height: 18px; }
.nav-extra b { color: var(--on-dark); font-weight: 700; }

/* قائمة التصنيفات (مفتوحة في الرئيسيّة، منسدلة في غيرها) */
.cat-menu {
	background: var(--store-bg); color: var(--store-text);
	border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r);
	box-shadow: var(--shadow); padding: 6px 0; position: relative;
}
.cat-list a {
	display: flex; align-items: center; gap: 12px;
	padding: 8px 16px; font-size: 14.5px; color: var(--store-text);
}
.cat-list a:hover, .cat-list a:focus-visible { background: var(--soft); }
.cat-list img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.cat-list .chev { margin-inline-start: auto; width: 16px; height: 16px; color: var(--muted-2); transform: rotate(90deg); }
.cat-mega {
	position: absolute; top: -1px; inset-inline-start: 100%; width: 560px; min-height: calc(100% + 1px);
	display: none; grid-template-columns: 1fr 190px; gap: 24px; padding: 22px 24px;
	background: var(--store-bg); border: 1px solid var(--line); border-radius: var(--r);
	box-shadow: var(--shadow-lg);
}
.cat-menu:hover .cat-mega, .cat-menu:focus-within .cat-mega { display: grid; }
.cat-mega h3 { font-size: 15px; margin-bottom: 10px; }
.cat-mega ul { columns: 2; column-gap: 20px; }
.cat-mega li a { display: block; padding: 5px 0; font-size: 14px; color: var(--muted); }
.cat-mega li a:hover { color: var(--store-text); text-decoration: underline; }
.mega-card { position: relative; border-radius: var(--r); overflow: hidden; background: var(--store-accent); color: var(--on-dark); min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; }
.mega-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.mega-card span, .mega-card strong { position: relative; }
.mega-card span { font-size: 13px; }
.mega-card strong { font-size: 17px; }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(17, 21, 28, .5); opacity: 0; visibility: hidden; transition: .25s; z-index: 90; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(330px, 88vw);
	background: var(--store-bg); z-index: 100; overflow-y: auto;
	transform: translateX(100%); transition: transform .25s; visibility: hidden;
	display: flex; flex-direction: column;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--store-accent); color: var(--on-dark); }
.drawer-head .icon-btn { background: transparent; border-color: #5B6474; color: var(--on-dark); }
.drawer h3 { font-size: 13px; color: var(--muted); padding: 16px 18px 6px; font-weight: 700; }
.drawer-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--soft-2); font-weight: 500; }
.drawer-nav img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.drawer-foot { margin-top: auto; padding: 16px 18px; background: var(--soft); font-size: 14px; color: var(--muted); }
.drawer-foot b { color: var(--store-text); }

/* ==========================================================================
   أقسام عامّة
   ========================================================================== */
.section { padding: 46px 0; }
.section-tight { padding: 26px 0; }
.section-soft { background: var(--soft); }
.section-head {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding-bottom: 16px; margin-bottom: 26px; border-bottom: 1px solid var(--line);
}
.section-head.no-line { border-bottom: 0; padding-bottom: 0; }
.section-title { font-size: 26px; font-weight: 800; }
.section-head .slider-btns { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- الرئيسيّة: التصنيفات + السلايدر */
.hero-area { padding-bottom: 8px; }
.hero-grid { display: grid; grid-template-columns: 276px 1fr; gap: 24px; align-items: start; }
.hero-side .cat-menu { border-radius: 0 0 var(--r) var(--r); }
.hero-main { padding-top: 24px; min-width: 0; }
.hero-area:not(:has(.hero-main)) { display: none; }

.slider { position: relative; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(110deg, var(--tint-1), var(--tint-2)); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide {
	position: relative; flex: 0 0 100%; scroll-snap-align: start;
	min-height: 420px; display: flex; align-items: center;
	background: linear-gradient(110deg, var(--tint-1), var(--tint-2));
}
.slide > img {
	position: absolute; inset-block: 0; inset-inline-end: 0; width: 64%; height: 100%; object-fit: cover; object-position: left center;
	-webkit-mask-image: linear-gradient(to right, #000 62%, transparent);
	mask-image: linear-gradient(to right, #000 62%, transparent);
}
.slide-body { position: relative; padding: 40px 56px; max-width: 54%; }
.slide-body .eyebrow { display: block; font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.slide-body h1, .slide-body h2 { font-size: 44px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.slide-body p { color: var(--muted); font-size: 16px; margin-bottom: 24px; max-width: 420px; }
.slider-progress { position: absolute; bottom: 20px; inset-inline: 56px; display: flex; gap: 6px; }
.slider-progress button { flex: 1; height: 3px; border: 0; padding: 0; border-radius: 3px; background: rgba(24, 29, 37, .15); }
.slider-progress button[aria-current="true"] { background: var(--store-bg); box-shadow: 0 0 0 1px rgba(24, 29, 37, .06); }
.slider-progress button::before { content: ""; display: block; height: 14px; margin-top: -6px; }

/* ---------------------------------------------------------------- شريط الثقة */
.trust-bar { padding: 40px 0 10px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust-item { display: flex; align-items: center; gap: 16px; }
.trust-icon { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--soft-2); display: grid; place-items: center; }
.trust-icon .icon { width: 26px; height: 26px; stroke-width: 1.6; }
.trust-item h3 { font-size: 15.5px; font-weight: 700; }
.trust-item p { font-size: 13.5px; color: var(--muted); }
body[data-show-trust-bar="false"] .trust-bar { display: none; }

/* ---------------------------------------------------------------- وصل حديثًا: بانر عموديّ + بطاقات أفقيّة */
.new-grid { display: grid; grid-template-columns: 340px 1fr; gap: 36px; align-items: stretch; }
.tall-banner {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center;
	min-height: 460px; padding: 32px 24px; border-radius: var(--r-lg); overflow: hidden;
	background: var(--store-accent); color: var(--on-dark);
}
.tall-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tall-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(17, 21, 28, .85), rgba(17, 21, 28, 0) 60%); }
.tall-banner > :not(img) { position: relative; z-index: 1; }
.tall-banner h3 { font-size: 40px; font-weight: 800; line-height: 1.15; }
.tall-banner p { color: #E3E6EB; margin: 6px 0 16px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.recent-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.mini-card { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--store-bg); transition: box-shadow .2s, border-color .2s; }
.mini-card:hover { border-color: #C7CED8; box-shadow: var(--shadow); }
.mini-card > .cart-btn { margin-inline-start: auto; }
.mini-card .book-author { margin-bottom: 2px; }
.mini-cover { position: relative; flex: none; width: 64px; }
.mini-cover img { width: 64px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-sm); box-shadow: 0 4px 12px rgba(24, 29, 37, .16); }
.mini-cover .type-dot { position: absolute; top: -6px; inset-inline-end: -8px; width: 22px; height: 22px; }
.mini-cover .type-dot .icon { width: 12px; height: 12px; }
.mini-card .book-title { font-size: 14.5px; font-weight: 500; margin: 2px 0; }
.mini-card .book-title a:hover { text-decoration: underline; }
.mini-card .price { font-size: 17px; }
.mini-card > div { min-width: 0; }

/* ---------------------------------------------------------------- بطاقة الكتاب الأساسيّة (بلا إطار) */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row, 4), minmax(0, 1fr)); gap: 34px 24px; }
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; }

.book-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: var(--r); }
.book-media {
	position: relative; aspect-ratio: 1 / 1;
	border-radius: var(--r); background: var(--soft); overflow: hidden;
}
.book-media > a { position: absolute; inset: 10% 0; display: flex; justify-content: center; }
.book-media > a img { height: 100%; width: auto; max-width: none; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 10px 22px rgba(24, 29, 37, .22); transition: transform .3s; }
.book-card:hover .book-media > a img { transform: translateY(-4px); }
.book-badges { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.book-media .type-dot { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; }
.book-tools {
	position: absolute; top: 48px; inset-inline-end: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2;
	opacity: 0; transform: translateX(-6px); transition: .2s;
}
.book-card:hover .book-tools, .book-card:focus-within .book-tools { opacity: 1; transform: none; }
@media (hover: none) { .book-tools { opacity: 1; transform: none; } .book-spec { display: none; } }
.tool-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--store-bg); color: var(--store-text); box-shadow: 0 2px 8px rgba(24, 29, 37, .12); }
.tool-btn .icon { width: 17px; height: 17px; }
.tool-btn[aria-pressed="true"] { color: var(--sale); }
.tool-btn[aria-pressed="true"] .icon { fill: currentColor; }
.book-spec {
	position: absolute; inset-inline: 10px; bottom: 10px; z-index: 2;
	padding: 6px 10px; border-radius: var(--r-sm); background: var(--store-bg); box-shadow: 0 4px 14px rgba(24, 29, 37, .12);
	font-size: 12.5px; color: var(--muted); text-align: center;
	opacity: 0; transform: translateY(6px); transition: .2s;
}
.book-card:hover .book-spec { opacity: 1; transform: none; }
.stock-band { position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%); z-index: 2; padding: 6px; background: var(--store-text); color: #fff; text-align: center; font-weight: 700; font-size: 14px; }
.book-card.is-out .book-media > a img { opacity: .45; filter: grayscale(.6); }
.book-body { padding: 14px 6px 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.book-title { font-size: 15px; font-weight: 500; line-height: 1.45; }
.book-title a:hover { text-decoration: underline; }
.book-author { font-size: 13px; color: var(--muted); }
.book-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.cart-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: var(--r); background: var(--soft-2); color: var(--store-text); transition: background .2s, color .2s; }
.cart-btn:hover { background: var(--store-primary); color: var(--on-primary); }
.cart-btn[disabled] { opacity: .5; cursor: not-allowed; background: var(--soft-2); color: var(--store-text); }

/* أشكال البطاقة */
body[data-card-style="framed"] .book-card { border: 1px solid var(--line); padding: 10px 10px 14px; background: var(--store-bg); }
body[data-card-style="framed"] .book-media { background: var(--soft); }
body[data-card-style="shadow"] .book-card { padding: 10px 10px 14px; background: var(--store-bg); box-shadow: var(--shadow); }
body[data-card-style="shadow"] .book-card:hover { box-shadow: var(--shadow-lg); }

/* ---------------------------------------------------------------- بانر القسيمة */
.coupon {
	position: relative; display: grid; grid-template-columns: 26% 1fr; min-height: 170px;
	border-radius: var(--r-lg); overflow: hidden; color: var(--store-text);
}
.coupon-stub { position: relative; display: grid; place-items: center; text-align: center; padding: 20px; background: var(--tint-1); }
.coupon-stub strong { font-size: 46px; font-weight: 800; line-height: 1.05; }
.coupon-main { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 24px 44px; background: linear-gradient(100deg, var(--tint-1), var(--tint-2)); border-inline-start: 3px dashed var(--store-bg); }
.coupon-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; -webkit-mask-image: linear-gradient(to right, #000 45%, transparent 75%); mask-image: linear-gradient(to right, #000 45%, transparent 75%); }
.coupon-main > :not(img) { position: relative; max-width: 58%; }
.coupon-main h3 { font-size: 26px; font-weight: 800; }
.coupon-main p { font-size: 15.5px; color: var(--muted); }
.coupon-main .code { display: inline-block; padding: 1px 12px; border-radius: 999px; background: var(--store-bg); color: var(--store-text); font-weight: 700; }
.coupon::before, .coupon::after {
	content: ""; position: absolute; inset-inline-start: calc(26% - 13px); width: 26px; height: 26px; border-radius: 50%;
	background: var(--store-bg); z-index: 2;
}
.coupon::before { top: -13px; }
.coupon::after { bottom: -13px; }

/* ---------------------------------------------------------------- دوّار الكتب */
.carousel { position: relative; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 24px) / 4); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }

/* ---------------------------------------------------------------- المؤلّفون في مربّعات مؤطَّرة */
.author-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.author-tile {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
	min-height: 168px; padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--r-lg);
	transition: border-color .2s, box-shadow .2s;
}
.author-tile:hover { border-color: #C7CED8; box-shadow: var(--shadow); }
.author-tile img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.author-tile h3 { font-size: 15px; font-weight: 700; }
.author-tile { background: var(--store-bg); }
.author-tile small { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.author-tile small .icon { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- النشرة + شاهدتَه مؤخّرًا */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.newsletter h2 { font-size: 24px; margin-bottom: 6px; }
.newsletter > p { color: var(--muted); margin-bottom: 18px; }
.subscribe { display: flex; gap: 10px; max-width: 470px; }
.field {
	width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r);
	background: var(--store-bg); color: var(--store-text);
}
.field::placeholder { color: var(--muted-2); opacity: 1; }
textarea.field { height: auto; padding: 12px 14px; min-height: 110px; resize: vertical; }
.social { display: flex; gap: 10px; margin-top: 26px; }
.social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--soft-2); color: var(--store-text); }
.social a:hover { background: var(--line); }
.social .icon { width: 18px; height: 18px; }
.recent-list { display: grid; gap: 18px; }
.recent-list h2 { font-size: 18px; font-weight: 700; }
.news-band { background: linear-gradient(110deg, var(--tint-1), var(--tint-2)); }
.news-band .news-grid { align-items: stretch; }
.news-band .newsletter { display: flex; flex-direction: column; justify-content: center; padding: 34px 36px; border-radius: var(--r-lg); background: var(--store-bg); box-shadow: var(--shadow); }
.news-band .newsletter > p { color: var(--muted); }
.news-band .social a { background: var(--soft-2); }
.news-band .recent-list h2 { margin-bottom: 2px; }
body[data-show-newsletter="false"] .newsletter { display: none; }
body[data-show-newsletter="false"] .news-grid { grid-template-columns: 1fr; }
body[data-show-newsletter="false"] .news-grid [data-slot="recent.items"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body .news-grid:not(:has([data-slot="recent.items"])) { grid-template-columns: 1fr; }

/* ==========================================================================
   التذييل الكحليّ
   ========================================================================== */
.site-footer { background: var(--store-accent); color: var(--on-dark-muted); padding-top: 56px; font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-about .brand { color: var(--on-dark); margin-bottom: 14px; }
.foot-about p { margin-bottom: 14px; }
.foot-contact li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.foot-contact .icon { width: 17px; height: 17px; color: var(--on-dark); }
.foot-contact bdi, .foot-contact b { color: var(--on-dark); font-weight: 500; }
.foot-col h3 { font-size: 16px; font-weight: 700; color: var(--on-dark); margin-bottom: 14px; }
.foot-col li { margin-bottom: 8px; }
.foot-col a:hover, .foot-cats a:hover { color: var(--on-dark); text-decoration: underline; }
.foot-cats { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 36px; padding: 0; }
.foot-cats li { display: flex; align-items: center; }
.foot-cats li + li::before { content: "/"; margin: 0 12px; color: #6F7886; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding: 22px 0; border-top: 1px solid #353E4C; font-size: 13.5px; }
.foot-bottom b { color: var(--on-dark); }
.pay-icons { display: flex; gap: 10px; align-items: center; }
.pay-icons span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-sm); background: var(--head-btn); color: var(--on-dark); font-size: 12.5px; }
.pay-icons .icon { width: 16px; height: 16px; }

/* ==========================================================================
   صفحات داخليّة
   ========================================================================== */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); padding-top: 22px; }
.breadcrumb li + li::before { content: "‹"; margin-inline-end: 6px; color: var(--muted-2); }
.breadcrumb a:hover { color: var(--store-text); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--store-text); }
.page-title { font-size: 30px; font-weight: 800; margin: 10px 0 0; }
.page-lead { color: var(--muted); margin-top: 6px; }

/* التصنيف */
.banner-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 22px; }
.pair-banner { position: relative; min-height: 200px; border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: 28px 34px; background: var(--soft-2); }
.pair-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pair-banner > :not(img) { position: relative; max-width: 55%; }
.pair-banner h3 { font-size: 24px; font-weight: 800; }
.pair-banner p { font-size: 14.5px; }
.pair-banner.is-dark { color: var(--on-dark); }
.pair-banner.is-dark p { color: #E3E6EB; }
.pair-banner .btn { margin-top: 8px; }

.listing { display: grid; grid-template-columns: 276px 1fr; gap: 32px; align-items: start; }
.listing .book-grid { --per-row: 3; }
body[data-books-per-row="5"] .listing .book-grid, body[data-books-per-row="6"] .listing .book-grid { --per-row: 4; }
.filters { display: grid; gap: 16px; }
.filters-head { display: none; }
.filter-box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.filter-box h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 12px; }
.filter-cats a { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14.5px; color: var(--muted); }
.filter-cats a:hover, .filter-cats a[aria-current] { color: var(--store-text); }
.filter-cats a[aria-current] { font-weight: 700; }
.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--store-accent); }
.check .count { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.range { position: relative; height: 26px; }
.range input[type="range"] { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--store-bg); border: 2px solid var(--store-accent); margin-top: -7px; }
.range input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--store-bg); border: 2px solid var(--store-accent); }
.range-track { position: absolute; top: 11px; inset-inline: 0; height: 4px; border-radius: 4px; background: var(--line); }
.range-track span { position: absolute; top: 0; bottom: 0; inset-inline-start: 10%; inset-inline-end: 35%; background: var(--store-accent); border-radius: 4px; }
.price-fields { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 10px; }
.price-fields .field { height: 40px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line); font-size: 14px; background: var(--store-bg); }
.chip .icon { width: 14px; height: 14px; }
.chip-clear { border: 0; background: none; text-decoration: underline; font-size: 14px; color: var(--store-text); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.toolbar p { color: var(--muted); font-size: 14.5px; }
.toolbar p b { color: var(--store-text); }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.toolbar select.field { width: auto; height: 40px; padding-inline-end: 36px; }
.filters-toggle { display: none; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 8px; border-radius: var(--r); font-weight: 500; color: var(--store-text); }
.pagination a:hover { background: var(--soft-2); }
.pagination [aria-current="page"] { background: var(--soft-2); font-weight: 800; }
.pagination .icon { width: 18px; height: 18px; }

/* صفحة الكتاب */
.pdp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.pdp-head h1 { font-size: 30px; font-weight: 800; }
.pdp-tabs { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 28px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pdp-tabs nav { display: flex; gap: 4px; }
.pdp-tabs nav a { padding: 12px 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pdp-tabs nav a:hover { color: var(--store-text); }
.pdp-tabs nav a[aria-current="true"] { color: var(--store-text); border-color: var(--store-text); font-weight: 700; }
.pdp-tabs .rating a { text-decoration: underline; color: var(--store-text); }
.pdp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.gallery { display: grid; gap: 14px; position: sticky; top: 150px; }
.gallery-main { position: relative; aspect-ratio: 5 / 4; border-radius: var(--r-lg); background: linear-gradient(120deg, var(--tint-1), var(--tint-2)); }
.gallery-main img { position: absolute; top: 9%; left: 50%; transform: translateX(-50%); height: 82%; width: auto; max-width: none; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 18px 40px rgba(24, 29, 37, .28); }
.gallery-main .type-dot { position: absolute; top: 16px; inset-inline-end: 16px; width: 34px; height: 34px; }
.gallery-main .type-dot .icon { width: 18px; height: 18px; }
.thumbs { display: flex; gap: 10px; }
.thumbs button { width: 74px; aspect-ratio: 1; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); display: grid; place-items: center; }
.thumbs button[aria-pressed="true"] { border-color: var(--store-text); }
.thumbs img { height: 60px; width: auto; max-width: none; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.buy { display: grid; gap: 22px; }
.opt-label { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.opt-label b { color: var(--store-text); }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r); font-size: 14.5px; background: var(--store-bg); }
.opt[aria-pressed="true"] { border-color: var(--store-text); box-shadow: inset 0 0 0 1px var(--store-text); font-weight: 700; }
.opt .icon { width: 17px; height: 17px; }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.buy-row .btn-primary { flex: 1; min-width: 180px; }
.buy-row .icon-btn { width: 50px; height: 50px; border-radius: var(--r); }
.qty { display: inline-flex; align-items: center; height: 50px; border: 1px solid var(--line); border-radius: var(--r); background: var(--store-bg); }
.qty button { width: 40px; height: 100%; border: 0; background: none; font-size: 18px; }
.qty input { width: 42px; height: 100%; border: 0; text-align: center; background: none; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 40px; }
.qty-sm button { width: 34px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ok); }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ship-table { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ship-table table { font-size: 14px; }
.ship-table th, .ship-table td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--line); }
.ship-table tr:last-child td { border-bottom: 0; }
.ship-table th { background: var(--soft); font-weight: 700; color: var(--store-text); }
.ship-table td { color: var(--muted); }
.ship-table td b { color: var(--store-text); font-weight: 700; }
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .icon { transition: transform .2s; }
.acc details[open] summary .icon { transform: rotate(180deg); }
.acc .acc-body { padding: 0 0 16px; color: var(--muted); font-size: 14.5px; }
.spec-list { display: grid; gap: 0; }
.spec-list div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.spec-list div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; color: var(--store-text); font-weight: 500; text-align: end; }
.sample-player { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--soft); }
.sample-player .play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--store-accent); color: var(--on-dark); display: grid; place-items: center; flex: none; }
.sample-player .bar { flex: 1; height: 4px; border-radius: 4px; background: var(--line); position: relative; }
.sample-player .bar span { position: absolute; inset-block: 0; inset-inline-start: 0; width: 28%; border-radius: 4px; background: var(--store-accent); }
.sample-player small { font-size: 13px; color: var(--muted); }

.pdp-section { padding: 46px 0 0; scroll-margin-top: 20px; }
.pdp-section > h2 { font-size: 22px; margin-bottom: 16px; }
.prose { color: var(--muted); max-width: 820px; display: grid; gap: 12px; font-size: 15.5px; line-height: 1.85; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.reviews-layout { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.reviews-summary { padding: 22px; border-radius: var(--r-lg); background: var(--soft); }
.reviews-summary strong { display: block; font-size: 44px; font-weight: 800; line-height: 1.1; }
.rating-bars { display: grid; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.rating-bars li { display: grid; grid-template-columns: 54px 1fr 34px; align-items: center; gap: 8px; }
.rating-bars .bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.rating-bars .bar span { display: block; height: 100%; background: var(--star); }
.review-note { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.review-list { display: grid; gap: 0; }
.review-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review-item:first-child { padding-top: 0; }
.review-who { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.review-who b { font-weight: 700; }
.review-who small { color: var(--muted); font-size: 13px; }
.review-item p { color: var(--muted); margin-top: 6px; }
.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; }
.star-pick button { border: 0; background: none; padding: 2px; color: var(--star); }
.star-pick button .icon { width: 22px; height: 22px; }
body[data-show-reviews="false"] .reviews-block, body[data-show-reviews="false"] .tab-reviews { display: none; }

/* المؤلّف */
.author-hero { margin-top: 18px; display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: center; padding: 32px 40px; border-radius: var(--r-lg); background: linear-gradient(110deg, var(--tint-1), var(--tint-2)); }
.author-hero img { width: 180px; height: 180px; border-radius: var(--r-lg); object-fit: cover; box-shadow: var(--shadow); }
.author-hero h1 { font-size: 32px; }
.author-hero .meta { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0 12px; color: var(--muted); font-size: 14.5px; }
.author-hero .meta b { color: var(--store-text); }
.author-hero p { color: var(--muted); max-width: 760px; }

/* السلّة */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.cart-table th { text-align: start; font-size: 14px; font-weight: 500; color: var(--muted); padding: 0 10px 14px; 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; gap: 16px; align-items: center; }
.cart-book .mini-cover { width: 64px; }
.cart-book h3 { font-size: 15.5px; font-weight: 700; }
.cart-book p { font-size: 13.5px; color: var(--muted); }
.cart-book .fmt { font-size: 13px; color: var(--muted); }
.cart-remove { border: 0; background: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.cart-remove:hover { background: var(--soft-2); color: var(--store-text); }
.cart-under { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.summary { background: var(--soft); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 12px; }
.summary h2 { font-size: 20px; margin-bottom: 4px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; color: var(--muted); }
.summary-row b { color: var(--store-text); font-weight: 700; }
.summary-total { padding-top: 14px; border-top: 1px solid var(--line); font-size: 17px; color: var(--store-text); font-weight: 800; }
.summary .acc { border-top: 1px solid var(--line); }
.summary .acc details { border-bottom: 0; }
.coupon-field { display: flex; gap: 8px; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.coupon-applied b { color: var(--store-text); }
.coupon-applied button { border: 0; background: none; text-decoration: underline; font-size: 13.5px; color: var(--store-text); }
.summary .note { font-size: 13px; color: var(--muted); text-align: center; }
.empty-cart { text-align: center; padding: 50px 20px; display: grid; justify-items: center; gap: 10px; }
.empty-cart .trust-icon { margin-bottom: 6px; }
.empty-cart p { color: var(--muted); }

/* 404 */
.nf { text-align: center; padding: 40px 0 10px; }
.nf-art { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 180px; font-weight: 800; line-height: 1; color: var(--store-text); }
.nf-art svg { width: 160px; height: 160px; }
.nf h1 { font-size: 30px; margin: 18px 0 8px; }
.nf p { color: var(--muted); margin-bottom: 22px; }
.nf .head-search { margin: 0 auto 22px; max-width: 460px; }
.nf .head-search input { border-color: var(--line); color: var(--store-text); }
.nf .head-search input::placeholder { color: var(--muted-2); }
.nf .head-search button { color: var(--store-text); }

/* components */
.kit-section { padding: 36px 0; border-bottom: 1px solid var(--line); }
.kit-section > .container > h2 { font-size: 20px; margin-bottom: 18px; }
.kit-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.kit-note { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.kit-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r); background: var(--soft); margin-bottom: 20px; font-size: 14px; }
.kit-controls label { display: inline-flex; align-items: center; gap: 6px; }
.kit-controls select { height: 36px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 8px; background: var(--store-bg); }

/* ==========================================================================
   العروض
   ========================================================================== */
@media (max-width: 1199px) {
	.head-promo { display: none; }
	.nav-extra { display: none; }
	.main-nav a { padding: 0 10px; white-space: nowrap; }
	.head-search { margin-inline-start: auto; }
	.hero-grid { grid-template-columns: 240px 1fr; }
	.cat-toggle, .cat-drop { width: 240px; }
	.slide-body { padding: 32px 36px; max-width: 60%; }
	.slide-body h1, .slide-body h2 { font-size: 34px; }
	.new-grid { grid-template-columns: 300px 1fr; gap: 26px; }
	.new-list .mini-grid { grid-template-columns: 1fr; }
	.new-list .mini-grid > :nth-child(n+6) { display: none; }
	.recent-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.carousel-track { grid-auto-columns: calc((100% - 2 * 24px) / 3); }
	body[data-books-per-row="5"], body[data-books-per-row="6"] { --per-row: 4; }
	.listing { grid-template-columns: 240px 1fr; gap: 24px; }
}

@media (max-width: 991px) {
	.container { padding-inline: 16px; }
	.menu-toggle { display: inline-grid; }
	.head-top .container { flex-wrap: wrap; gap: 8px 10px; min-height: 64px; padding-block: 10px; }
	.head-search { order: 5; flex: 1 0 100%; max-width: none; margin: 0; }
	.head-search input { height: 42px; }
	.head-actions { margin-inline-start: auto; }
	.head-actions .hide-sm { display: none; }
	.head-nav { display: none; }
	.hero-grid { grid-template-columns: 1fr; }
	.hero-side { display: none; }
	.hero-main { padding-top: 16px; }
	.slide { min-height: 0; flex-direction: column; align-items: stretch; }
	.slide > img { position: relative; width: 100%; height: auto; aspect-ratio: 1200 / 520; order: 2; object-fit: cover; object-position: left center; -webkit-mask-image: none; mask-image: none; }
	.slide-body { max-width: none; padding: 28px 24px 8px; text-align: center; }
	.slide-body p { margin-inline: auto; }
	.slider-progress { inset-inline: 24px; bottom: 14px; }
	.trust-bar { padding-top: 22px; }
	.trust-grid { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
	.trust-grid::-webkit-scrollbar { display: none; }
	.trust-item { flex: 0 0 auto; scroll-snap-align: start; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--soft); }
	.trust-icon { width: 40px; height: 40px; background: var(--store-bg); }
	.trust-icon .icon { width: 20px; height: 20px; }
	.trust-item h3 { font-size: 14px; white-space: nowrap; }
	.trust-item p { font-size: 12.5px; white-space: nowrap; }
	.author-grid { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 180px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
	.author-grid::-webkit-scrollbar { display: none; }
	.author-tile { scroll-snap-align: start; }
	.new-grid { grid-template-columns: 1fr; }
	.tall-banner { min-height: 280px; }
	.tall-banner img { object-position: center 35%; }
	.tall-banner::after { background: linear-gradient(to top, rgba(17, 21, 28, .92) 25%, rgba(17, 21, 28, .45)); }
	.new-list .mini-grid { grid-template-columns: 1fr 1fr; }
	.new-list .mini-grid > :nth-child(n+6) { display: flex; }
	.book-grid, .listing .book-grid { --per-row: 3 !important; gap: 28px 16px; }
	.coupon { grid-template-columns: 30% 1fr; }
	.coupon::before, .coupon::after { inset-inline-start: calc(30% - 13px); }
	.coupon-stub strong { font-size: 34px; }
	.coupon-main { padding: 22px 26px; }
	.coupon-main > :not(img) { max-width: 70%; }
	.coupon-main h3 { font-size: 21px; }
	.news-grid { grid-template-columns: 1fr; gap: 36px; }
	.foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
	.listing { grid-template-columns: 1fr; }
	.filters-toggle { display: inline-flex; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(340px, 90vw); z-index: 100;
		background: var(--store-bg); overflow-y: auto; padding: 0 16px 16px; align-content: start;
		transform: translateX(100%); visibility: hidden; transition: transform .25s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; position: sticky; top: 0; background: var(--store-bg); }
	.filters-head h2 { font-size: 18px; }
	.pdp { grid-template-columns: 1fr; gap: 28px; }
	.gallery { position: static; }
	.reviews-layout { grid-template-columns: 1fr; gap: 24px; }
	.details-grid { grid-template-columns: 1fr; }
	.cart-layout { grid-template-columns: 1fr; }
	.author-hero { grid-template-columns: 140px 1fr; padding: 24px; gap: 22px; }
	.author-hero img { width: 140px; height: 140px; }
}

@media (max-width: 640px) {
	body { font-size: 14.5px; }
	.brand-name { font-size: 19px; }
	.brand img { width: 34px; height: 34px; }
	.head-btn { width: 40px; height: 40px; }
	.section { padding: 34px 0; }
	.section-title { font-size: 21px; }
	.section-head { margin-bottom: 20px; }
	.slide-body h1, .slide-body h2 { font-size: 27px; }
	.slide-body p { font-size: 14.5px; margin-bottom: 18px; }
	.mini-grid, .new-list .mini-grid, .recent-row, body[data-show-newsletter="false"] .news-grid [data-slot="recent.items"] { grid-template-columns: 1fr; gap: 10px; }
	.mini-card { padding: 10px 12px; }
	.tall-banner { min-height: 230px; padding: 22px 18px; }
	.tall-banner h3 { font-size: 30px; }
	.slide > img { aspect-ratio: 16 / 9; object-fit: cover; object-position: left center; }
	.new-list .mini-grid > :nth-child(n+5) { display: none; }
	.book-grid, .listing .book-grid { --per-row: 2 !important; gap: 26px 14px; }
	.book-body { padding-inline: 2px; }
	.book-title { font-size: 14px; }
	.price { font-size: 16px; }
	.cart-btn { width: 36px; height: 36px; }
	.book-media .type-dot { width: 24px; height: 24px; top: 8px; inset-inline-end: 8px; }
	.book-media .type-dot .icon { width: 13px; height: 13px; }
	.book-badges { top: 8px; inset-inline-start: 8px; }
	.book-tools { top: 40px; inset-inline-end: 8px; }
	.tool-btn { width: 30px; height: 30px; }
	.carousel-track { grid-auto-columns: calc((100% - 14px) / 2); gap: 14px; }
	.coupon { grid-template-columns: 1fr; }
	.coupon::before, .coupon::after { display: none; }
	.coupon-stub { padding: 18px; }
	.coupon-main { border-inline-start: 0; border-top: 3px dashed var(--store-bg); padding: 20px; min-height: 150px; }
	.coupon-main img { -webkit-mask-image: linear-gradient(to right, #000, transparent 70%); mask-image: linear-gradient(to right, #000, transparent 70%); }
	.coupon-main > :not(img) { max-width: 72%; }
	.author-grid { grid-auto-columns: 150px; gap: 12px; }
	.author-tile { min-height: 0; padding: 16px 10px; }
	.subscribe { flex-direction: column; }
	.foot-grid { grid-template-columns: 1fr; }
	.foot-bottom { flex-direction: column; align-items: flex-start; }
	.pay-icons { flex-wrap: wrap; }
	.banner-pair { grid-template-columns: 1fr; gap: 14px; }
	.pair-banner { min-height: 160px; padding: 22px; }
	.pair-banner h3 { font-size: 20px; }
	.page-title, .pdp-head h1 { font-size: 24px; }
	.pdp-tabs nav a { padding: 10px 8px; font-size: 14px; }
	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; }
	.cart-table tr { position: relative; padding: 16px 0; border-bottom: 1px solid var(--line); }
	.cart-table td { padding: 4px 0; border: 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); color: var(--muted); font-size: 13.5px; }
	.cart-table td.cell-remove { position: absolute; top: 12px; inset-inline-end: 0; }
	.cart-book { padding-inline-end: 40px; }
	.author-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
	.author-hero .meta { justify-content: center; }
	.nf-art { font-size: 96px; }
	.nf-art svg { width: 86px; height: 86px; }
	.reviews-summary strong { font-size: 36px; }
}

/* ---------- ميزات المنصّة: عدّاد العروض، الباقات، الخصم حسب الكمّيّة، شريط الشحن المجّانيّ ---------- */
.offers-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; flex: 1; min-width: 0; }
.countdown { display: flex; align-items: center; gap: 6px; direction: rtl; }
.countdown[hidden] { display: none; }
.cd-unit { display: inline-flex; align-items: baseline; gap: 3px; min-width: 50px; justify-content: center; padding: 5px 9px; border-radius: var(--r); background: var(--sale); color: #fff; line-height: 1.3; }
.cd-unit b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 11.5px; }
.cd-sep { color: var(--muted); font-weight: 700; }
.qty-deal { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 12px; border-radius: var(--r); background: var(--tint-2); color: var(--store-text); font-size: 14px; font-weight: 700; }
.qty-deal .icon { width: 17px; height: 17px; color: var(--sale); }
.bundle-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.bundle { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.bundle-items { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 20px 12px; border-radius: var(--r); background: var(--soft); }
.bundle-cover { display: block; width: 96px; border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--shadow); background: var(--soft); }
.bundle-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.bundle-plus { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--soft-2); color: var(--muted); font-weight: 800; font-size: 14px; }
.bundle-body { display: grid; gap: 6px; min-width: 0; }
.bundle-title { font-size: 18px; font-weight: 800; }
.bundle-list { color: var(--muted); font-size: 14px; }
.bundle-foot { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.bundle-foot > div { display: grid; gap: 4px; }
.bundle-save { justify-self: start; padding: 1px 8px; border-radius: var(--r-sm); background: var(--sale); color: #fff; font-size: 12.5px; font-weight: 700; }
.ship-progress { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.ship-progress p { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--store-text); }
.ship-progress .icon { flex: none; width: 20px; height: 20px; color: var(--ok); }
.ship-bar { height: 6px; border-radius: 6px; background: var(--soft-2); overflow: hidden; }
.ship-bar span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
@media (max-width: 991px) {
	.bundle-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
	.bundle { padding: 14px; gap: 14px; }
	.bundle-items { gap: 6px; padding: 16px 8px; }
	.bundle-cover { width: 74px; }
	.bundle-foot .btn { width: 100%; }
	.countdown { gap: 4px; }
	.cd-sep { display: none; }
	.cd-unit { min-width: 0; padding: 4px 7px; }
	.cd-unit b { font-size: 14.5px; }
}

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

/* شريط الشحن المجّانيّ: يختفي موضعه بلا فراغ حين يُخفيه theme.js */
[data-slot="cart.free_shipping_left"][hidden] { display: none !important; }

/* ---------- الإصدار الثاني: تبويبات الصفّ، كتاب الشهر، التصنيفات، الآراء، المدوّنة، النظرة السريعة ---------- */
.section-sub { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* تبويبات «الأكثر رواجًا» (القاعدة 16) */
.section-head.has-tabs .section-title { margin-inline-end: 8px; }
.row-tabs { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.row-tabs::-webkit-scrollbar { display: none; }
.row-tab { flex: none; height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--store-bg); color: var(--store-text); font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.row-tab:hover { border-color: #C7CED8; }
.row-tab[aria-selected="true"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--on-dark); font-weight: 700; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* صفوفٌ كاملة: ثماني بطاقات تملأ الصفّ أيًّا كان عدد الكتب فيه */
body[data-books-per-row="3"] .fill-8 > :nth-child(n+7),
body[data-books-per-row="5"] .fill-8 > :nth-child(n+6),
body[data-books-per-row="6"] .fill-8 > :nth-child(n+7) { display: none; }
.book-grid.row-4 { --per-row: 4 !important; }

/* النظرة السريعة على البطاقة: تطفو فوق الغلاف ولا تحجز مكانًا */
.book-tools .tool-btn[data-action="quick-view"] .icon { width: 18px; height: 18px; }

/* كتاب الشهر: شريطٌ كحليّ وغلافٌ كبير في مدار */
.featured-band { background: var(--store-accent); color: var(--on-dark); overflow: hidden; }
.featured-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; padding-bottom: 18px; margin-bottom: 30px; border-bottom: 1px solid #3A4454; }
.featured-head .section-sub { color: var(--on-dark-muted); margin: 0; }
.featured-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: var(--head-btn); color: var(--on-dark); font-size: 13px; font-weight: 700; }
.featured-kicker .icon { width: 14px; height: 14px; color: var(--star); }
.feature-book { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 56px; align-items: center; }
.feature-title { font-size: 34px; font-weight: 800; }
.feature-title a:hover { text-decoration: underline; }
.feature-author { color: var(--on-dark-muted); margin: 4px 0 10px; }
.feature-author a { color: var(--on-dark); font-weight: 700; text-decoration: underline; }
.featured-band .rating { color: var(--on-dark-muted); }
.featured-band .stars .off { color: #4A5464; }
.feature-desc { display: grid; gap: 10px; margin: 16px 0 18px; max-width: 640px; color: #D3D8DF; font-size: 15.5px; line-height: 1.85; }
.feature-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.feature-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r); background: var(--head-btn); font-size: 14px; }
.feature-facts .icon { width: 16px; height: 16px; color: var(--store-primary); }
.feature-buy { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.feature-price { display: flex; margin-top: 2px; line-height: 1.3; color: var(--on-dark); }
.feature-buy .icon-btn { width: 50px; height: 50px; background: transparent; border-color: #5B6474; color: var(--on-dark); }
.feature-buy .icon-btn:hover { background: var(--head-btn); }
.feature-buy .icon-btn[aria-pressed="true"] { color: var(--store-primary); }
.feature-buy .icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.feature-buy .btn-primary:hover { background: var(--store-bg); color: var(--store-text); }
.feature-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.feature-orbit { position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--store-primary) 30%, transparent) 0 38%, transparent 39%); border: 1px dashed #5B6474; }
.feature-orbit::before, .feature-orbit::after { content: ""; position: absolute; border-radius: 50%; }
.feature-orbit::before { inset: 14%; border: 1px solid #3F4A5A; }
.feature-orbit::after { width: 18px; height: 18px; top: 9%; right: 16%; background: var(--star); }
.feature-media > a { position: relative; width: 56%; }
.feature-media img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 24px 50px rgba(0, 0, 0, .45); transform: rotate(-3deg); transition: transform .3s; }
.feature-media a:hover img { transform: rotate(0); }
.feature-media .type-dot { position: absolute; top: 14%; inset-inline-end: 20%; width: 34px; height: 34px; box-shadow: 0 0 0 3px var(--store-accent); }

/* تسوّق حسب التصنيف */
.cat-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.cat-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 0 16px; border-radius: var(--r-lg); background: var(--soft); text-align: center; transition: box-shadow .2s, transform .2s; }
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-card-media { display: grid; place-items: center; width: 100%; aspect-ratio: 5 / 4; margin-bottom: 6px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: radial-gradient(circle at 50% 60%, var(--store-bg) 0 34%, transparent 35%); }
.cat-card-media img { height: 74%; width: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 10px 20px rgba(24, 29, 37, .22); transform: rotate(-6deg); transition: transform .3s; }
.cat-card:hover .cat-card-media img { transform: rotate(0); }
.cat-card b { font-size: 15.5px; font-weight: 700; }
.cat-card small { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.cat-card small .icon { width: 14px; height: 14px; }

/* آراء القرّاء على الكتب */
.store-score { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.store-score b { color: var(--store-text); font-size: 16px; }
.store-score:has([data-slot="store.rating"]:empty) { display: none; }
.review-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.review-card { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--store-bg); }
.review-top { display: flex; align-items: center; justify-content: space-between; }
.review-top .stars .icon { width: 16px; height: 16px; }
.review-quote { width: 30px; height: 30px; color: var(--tint-1); stroke: var(--store-primary); stroke-width: 1.4; }
.review-card blockquote { margin: 0; color: var(--store-text); line-height: 1.8; }
.review-card figcaption { display: flex; flex-direction: column; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.review-card figcaption b { font-weight: 700; }
.review-card figcaption small { font-size: 13.5px; color: var(--muted); }
body[data-show-reviews="false"] .home-reviews { display: none; }

/* المدوّنة */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--store-bg); border: 1px solid var(--line); transition: box-shadow .2s; }
.post-card:hover { box-shadow: var(--shadow); }
.post-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft-2); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; }
.post-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.post-date .icon { width: 15px; height: 15px; }
.post-title { font-size: 18px; font-weight: 800; line-height: 1.45; }
.post-title a:hover { text-decoration: underline; }
.post-excerpt { color: var(--muted); font-size: 14.5px; }
.post-grid.is-blog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card.is-lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; background: var(--soft); border: 0; }
.is-lead .post-media { aspect-ratio: auto; min-height: 340px; }
.is-lead .post-body { justify-content: center; padding: 34px 40px; gap: 10px; }
.is-lead .post-title { font-size: 28px; }
.is-lead .post-excerpt { font-size: 16px; }
.is-lead .btn { align-self: flex-start; margin-top: 8px; }
.blog-list { padding-top: 26px; }
.article { max-width: 820px; margin: 0 auto; padding-bottom: 20px; }
.article-head { padding: 14px 0 22px; }
.article-head h1 { font-size: 36px; font-weight: 800; margin-top: 8px; }
.article-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); }
.article-body { display: grid; gap: 14px; margin-top: 28px; font-size: 16.5px; line-height: 1.95; color: #2E3540; }
.article-body h2 { font-size: 22px; margin-top: 12px; color: var(--store-text); }
.article-body blockquote { margin: 6px 0; padding: 18px 22px; border-inline-start: 4px solid var(--store-primary); border-radius: var(--r); background: var(--soft); font-size: 18px; font-weight: 700; color: var(--store-text); }
.article-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }

/* اختيار الصيغة في صفحة الكتاب */
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.format-opt { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--store-bg); }
.format-opt:hover { border-color: #C7CED8; }
.format-opt .type-dot { grid-row: span 2; width: 28px; height: 28px; box-shadow: none; }
.format-opt b { font-size: 14.5px; font-weight: 700; }
.format-opt small { font-size: 13px; color: var(--muted); }
.format-opt[aria-current="page"] { border-color: var(--store-text); box-shadow: inset 0 0 0 1px var(--store-text); }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ [data-preview-copy])) { display: none; }

/* عرض القائمة في صفحة التصنيف */
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.view-toggle button { width: 40px; height: 38px; display: grid; place-items: center; border: 0; background: var(--store-bg); color: var(--muted); }
.view-toggle button[aria-pressed="true"] { background: var(--soft-2); color: var(--store-text); }
.view-toggle .icon { width: 18px; height: 18px; }
.book-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.book-grid.is-list .book-card { flex-direction: row; align-items: stretch; gap: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.book-grid.is-list .book-media { flex: none; width: 180px; }
.book-grid.is-list .book-body { padding: 4px 0 0; }
.book-grid.is-list .book-title { font-size: 17px; }
.book-grid.is-list .book-foot { justify-content: flex-start; gap: 22px; }

/* أعمال المؤلّف: صفٌّ أفقيّ لا يترك صفًّا ناقصًا */
.works-track { grid-auto-columns: calc((100% - 3 * 24px) / 4); }

@media (max-width: 1199px) {
	.feature-book { grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; }
	.cat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	body[data-books-per-row="5"] .fill-8 > :nth-child(n+6),
	body[data-books-per-row="6"] .fill-8 > :nth-child(n+7) { display: flex; }
	.works-track { grid-auto-columns: calc((100% - 2 * 24px) / 3); }
}
@media (max-width: 991px) {
	.section-head.has-tabs { flex-wrap: wrap; }
	.section-head.has-tabs .row-tabs { order: 3; flex: 1 0 100%; }
	body[data-books-per-row] .fill-8 > :nth-child(n+7) { display: none; }
	.feature-book { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
	.feature-title { font-size: 28px; }
	.news-band .news-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
	.news-band .subscribe { flex-direction: column; }
	.news-band .newsletter { padding: 26px 24px; }
	.review-cards, .post-grid, .post-grid.is-blog { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
	.cat-card-media { aspect-ratio: 4 / 3; }
	.cat-cards::-webkit-scrollbar, .review-cards::-webkit-scrollbar, .post-grid::-webkit-scrollbar { display: none; }
	.cat-card, .review-card, .post-card { scroll-snap-align: start; }
	.post-grid.is-blog { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
	.post-card.is-lead { grid-template-columns: 1fr; }
	.is-lead .post-media { min-height: 0; aspect-ratio: 16 / 9; }
	.is-lead .post-body { padding: 24px; }
}
@media (max-width: 640px) {
	body[data-books-per-row] .fill-8 > :nth-child(n+7) { display: flex; }
	.featured-head { margin-bottom: 20px; }
	.feature-book { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.feature-media { order: -1; width: 74%; margin-inline: auto; }
	.feature-title { font-size: 24px; }
	.feature-desc { font-size: 14.5px; margin: 12px 0 14px; }
	.feature-buy .btn-lg { flex: 1; }
	.cat-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 38%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
	.news-band .news-grid { grid-template-columns: 1fr; }
	.cat-card-media { aspect-ratio: 1; }
	.news-band .newsletter { padding: 24px 20px; }
	.review-cards, .post-grid { grid-auto-columns: 84%; gap: 14px; }
	.post-grid.is-blog { grid-template-columns: minmax(0, 1fr); }
	.is-lead .post-title { font-size: 22px; }
	.article-head h1 { font-size: 26px; }
	.article-body { font-size: 15.5px; }
	.format-opt { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 4px; padding: 8px 10px; }
	.format-opt .type-dot { grid-row: auto; width: 24px; height: 24px; }
	.buy-row .btn-primary { min-width: 0; padding-inline: 14px; }
	.buy-row .qty button { width: 34px; }
	.works-track { grid-auto-columns: calc((100% - 14px) / 2); }
	.section-head .toolbar-actions .slider-btns { display: none; }
	.book-grid.is-list .book-media { width: 120px; }
	.book-grid.is-list .book-card { gap: 14px; }
	.row-tab { height: 40px; padding: 0 14px; font-size: 14px; }
	.book-grid.row-4 { --per-row: 2 !important; }
}

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