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

:root {
	/* ألوان المتجر (يختارها الناشر) */
	--store-primary: #333333;
	--store-primary-dark: #1F1F1F;
	--store-accent: #C61932;
	--store-bg: #FFFFFF;
	--store-text: #333333;

	/* ألوان محايدة */
	--tile: #F2F2F2;
	--soft: #F8F8F8;
	--line: #E4E4E4;
	--line-strong: #BDBDBD;
	--muted: #5F5F5F;
	--muted-2: #6B6B6B;
	--white: #FFFFFF;
	--gold: #F2B01E;
	--star-off: #D9D9D9;

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

	--font: "IBM Plex Sans Arabic", "Tajawal", system-ui, sans-serif;
	--wrap: 1320px;
	--gutter: 24px;
	--radius: 0px;
	--radius-sm: 0px;
	--hero-h: 600px;
	--section: 80px;
	--cols: 4;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* خيار الزوايا */
[data-corners="rounded"] { --radius: 12px; --radius-sm: 6px; }

/* عدد الكتب في الصفّ */
[data-books-per-row="3"] { --cols: 3; }
[data-books-per-row="4"] { --cols: 4; }
[data-books-per-row="5"] { --cols: 5; }

/* ── الأساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.75;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
[data-option]:empty, [data-slot="section.subtitle"]:empty { display: none; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon.star { fill: var(--gold); stroke: var(--gold); stroke-width: 1; }
.icon.star.off { fill: var(--star-off); stroke: var(--star-off); }
.icon-xl { width: 56px; height: 56px; stroke-width: 1; }
use[href="#i-play"] { fill: currentColor; }

/* ── الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 50px; padding: 0 32px;
	font-size: 14px; font-weight: 500;
	border: 1px solid transparent; border-radius: var(--radius-sm);
	transition: background .25s, color .25s, border-color .25s;
	white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn-dark { background: var(--store-primary); color: var(--white); }
.btn-dark:hover { background: var(--store-primary-dark); }
.btn-line { border-color: var(--store-primary); color: var(--store-text); background: transparent; }
.btn-line:hover { background: var(--store-primary); color: var(--white); }
.btn-block { width: 100%; }
.icon-btn {
	display: inline-grid; place-items: center; width: 50px; height: 50px; flex: none;
	border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .2s, color .2s;
}
.icon-btn:hover, .icon-btn[aria-pressed="true"] { border-color: var(--store-primary); }
.icon-btn[aria-pressed="true"] .icon, .tool[aria-pressed="true"] .icon { fill: var(--store-accent); stroke: var(--store-accent); }
.text-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); border-bottom: 1px solid currentColor; line-height: 1.6; }
.text-btn .icon { width: 15px; height: 15px; }
.read-more { display: inline-block; font-size: 13px; font-weight: 600; border-bottom: 1px solid currentColor; line-height: 1.7; }
.more-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; padding-bottom: 2px; border-bottom: 1px solid var(--line-strong); }
.more-link .icon { width: 15px; height: 15px; }
.more-wrap { text-align: center; margin-top: 50px; }

/* الحقل بخطٍّ سفليّ وسهم */
.line-field { display: flex; align-items: center; border-bottom: 1px solid var(--line-strong); max-width: 100%; }
.line-field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 0; font-size: 14px; outline: none; }
.line-field input::placeholder { color: var(--muted); }
.line-field button { display: grid; place-items: center; width: 40px; height: 44px; color: var(--store-text); }
.line-field:focus-within { border-color: var(--store-primary); }
.line-input, .line-select, .line-area {
	border: 0; border-bottom: 1px solid var(--line-strong); background: transparent; padding: 8px 0; font-size: 14px; border-radius: 0;
}
.line-input:focus, .line-select:focus, .line-area:focus { outline: none; border-color: var(--store-primary); }
.line-area { width: 100%; resize: vertical; }

/* ── شريط الخدمات */
.svc-bar { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); background: var(--store-bg); }
.svc { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 40px; }
.svc-phone { display: flex; align-items: center; gap: 8px; }
.svc-phone .icon { width: 15px; height: 15px; }
.svc-phone a { color: var(--store-text); border-bottom: 1px solid currentColor; line-height: 1.5; }
.svc-end { display: flex; align-items: center; gap: 22px; }
.svc-end > a { display: inline-flex; align-items: center; gap: 6px; }
.svc-end > a:hover { color: var(--store-text); }
.svc-end .icon { width: 15px; height: 15px; }
.svc-social { display: flex; gap: 14px; padding-inline-start: 22px; border-inline-start: 1px solid var(--line); }
.svc-social a { display: grid; place-items: center; color: var(--store-text); }
.svc-social .icon { width: 15px; height: 15px; }

/* شريط الشحن المجّانيّ */
.shipbar { display: flex; align-items: center; gap: 10px; }
.shipbar > .icon { width: 17px; height: 17px; color: var(--store-text); }
.shipbar b { color: var(--store-text); font-weight: 600; }
.ship-track { width: 90px; height: 3px; background: var(--line); overflow: hidden; flex: none; }
.ship-track > span { display: block; height: 100%; background: var(--store-primary); }
.shipbar.is-free [data-ship-msg] { color: var(--store-text); font-weight: 500; }
[data-slot="cart.free_shipping_left"][hidden] { display: none !important; }
[data-option]:empty, [data-slot="section.subtitle"]:empty { display: none; }

/* ── الرأس */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--store-bg); transition: box-shadow .3s; }
.site-header.is-stuck { box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(0, 0, 0, .04); }
.hdr { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand-name { font-size: 22px; font-weight: 400; white-space: nowrap; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav > ul { display: flex; align-items: center; gap: 40px; }
.main-nav a, .drop-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; padding: 28px 0; position: relative; }
.main-nav > ul > li > a::after, .drop-btn::after {
	content: ""; position: absolute; inset-inline: 0; bottom: 22px; height: 1px; background: currentColor; transform: scaleX(0); transition: transform .3s var(--ease);
}
.main-nav > ul > li > a:hover::after, .main-nav a[aria-current="page"]::after, .drop-btn:hover::after { transform: scaleX(1); }
.drop-btn .icon { width: 14px; height: 14px; }
.has-drop { position: relative; }
.drop {
	position: absolute; top: 100%; inset-inline-start: -24px; min-width: 220px; padding: 14px 0;
	background: var(--store-bg); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .06);
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .25s, visibility .25s;
}
.has-drop:hover .drop, .has-drop.open .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: block; padding: 7px 24px; font-size: 14px; color: var(--muted); }
.drop a:hover { color: var(--store-text); }
.hdr-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.main-nav + .hdr-actions { margin-inline-start: 0; }
.hdr-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; color: var(--store-text); }
.hdr-btn .icon { width: 21px; height: 21px; }
.count {
	position: absolute; top: 3px; inset-inline-end: 1px; min-width: 18px; height: 18px; padding: 0 4px;
	border-radius: 9px; background: var(--store-accent); color: var(--white);
	font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.menu-btn { display: none; }

/* البحث */
.search-panel { display: none; border-top: 1px solid var(--line); padding: 22px 0 26px; background: var(--store-bg); }
.search-open .search-panel { display: block; }
.search-panel .line-field { max-width: 640px; margin-inline: auto; }
.search-panel input { font-size: 18px; font-weight: 300; }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .35); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.drawer {
	position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 100; width: min(86vw, 340px);
	background: var(--store-bg); padding: 18px 22px 30px; overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s;
}
.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-bottom: 14px; border-bottom: 1px solid var(--line); }
.drawer-head .brand-name { font-size: 19px; }
.drawer-nav > li > a { display: block; padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.drawer-label { padding: 14px 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.drawer-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.drawer-sub a { padding: 6px 0; font-size: 14px; color: var(--muted); }
.drawer-call { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 14px; color: var(--muted); }
.drawer-call .icon { width: 17px; height: 17px; }
.drawer-call b { color: var(--store-text); font-weight: 500; }

/* ── الأقسام */
.section { padding-block: var(--section); }
.sec-head { text-align: center; margin-bottom: 54px; }
.sec-title { font-size: 36px; font-weight: 300; line-height: 1.35; }
.sec-sub { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ── السلايدر */
.hero { position: relative; overflow: hidden; background: var(--tile); }
.slides { display: grid; }
.slide { grid-area: 1 / 1; position: relative; height: var(--hero-h); opacity: 0; visibility: hidden; transition: opacity 1s var(--ease), visibility 1s; }
.slide.is-active, .hero:not(.slider-ready) .slide:first-child { opacity: 1; visibility: visible; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to left, rgba(255, 255, 255, .72), rgba(255, 255, 255, 0) 60%); }
.slide-body { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.slide-kicker { font-size: 15px; font-weight: 500; margin-bottom: 14px; }
.slide-title { font-size: clamp(34px, 4.6vw, 66px); font-weight: 300; line-height: 1.25; max-width: 560px; margin-bottom: 36px; }
.slide.is-active .slide-kicker, .slide.is-active .slide-title, .slide.is-active .btn { animation: rise .9s var(--ease) both; }
.slide.is-active .slide-title { animation-delay: .1s; }
.slide.is-active .btn { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-dots { position: absolute; bottom: 28px; inset-inline: 0; z-index: 3; display: flex; justify-content: center; gap: 10px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(51, 51, 51, .25); transition: background .3s, transform .3s; }
.hero-dots button[aria-current="true"] { background: var(--store-primary); transform: scale(1.25); }

/* ── البانران المتجاوران */
.banners-sec { padding-block: 56px 0; }
.banners { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.banner { position: relative; display: block; overflow: hidden; height: 540px; border-radius: var(--radius); background: var(--tile); }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.banner:hover > img { transform: scale(1.04); }
.banner-title { display: block; font-size: 40px; font-weight: 400; line-height: 1.3; }
.banner-text { display: block; margin-top: 10px; font-size: 15px; }
.banner-frame {
	position: absolute; inset-block: 40px; inset-inline-start: 40px; width: min(44%, 380px);
	display: flex; flex-direction: column; justify-content: center; padding: 36px;
	border: 1px solid rgba(255, 255, 255, .7); border-radius: var(--radius-sm);
	background: rgba(14, 26, 42, .32); color: var(--white);
}
.banner-panel {
	position: absolute; inset-inline: 24px; bottom: 24px; padding: 24px 26px;
	background: rgba(255, 255, 255, .88); border-radius: var(--radius-sm); color: var(--store-text);
}
.banner-panel .banner-title { font-size: 30px; }
.banner-panel .banner-text { color: var(--muted); }

/* ── شريط الثقة */
.trust { margin-top: 56px; }
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.trust-item { display: flex; align-items: center; gap: 16px; padding: 28px 24px; }
.trust-item + .trust-item { border-inline-start: 1px solid var(--line); }
.trust-item .icon { width: 34px; height: 34px; stroke-width: 1.1; }
.trust-item b { display: block; font-size: 15px; font-weight: 500; }
.trust-item span { display: block; font-size: 13px; color: var(--muted); }
[data-show-trust-bar="false"] .trust { display: none; }

/* ── بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 46px 30px; }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { position: relative; aspect-ratio: 3 / 4; background: var(--tile); border-radius: var(--radius); overflow: hidden; }
.card-cover { display: flex; align-items: center; justify-content: center; height: 100%; }
.card-cover img { width: 60%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 14px 26px rgba(0, 0, 0, .14); transition: transform .6s var(--ease); }
.card:hover .card-cover img { transform: translateY(-6px); }
.type-dot {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--white); flex: none;
}
.type-dot .icon { width: 15px; height: 15px; stroke-width: 1.8; }
.type-dot[data-type="print"] { background: var(--type-print); }
.type-dot[data-type="ebook"] { background: var(--type-ebook); }
.type-dot[data-type="audio"] { background: var(--type-audio); }
.type-dot[data-type="educational"] { background: var(--type-edu); }
.card-media > .type-dot { position: absolute; top: 14px; inset-inline-end: 14px; }
.badges { position: absolute; top: 14px; inset-inline-start: 14px; display: flex; flex-direction: column; gap: 8px; }
.badge {
	display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; width: 44px; height: 44px; border-radius: 50%;
	font-size: 12px; font-weight: 600; line-height: 1;
}
.badge-disc { direction: ltr; unicode-bidi: isolate; background: color-mix(in srgb, var(--store-primary) 10%, var(--white)); color: var(--store-text); }
.badge-new { background: var(--store-accent); color: var(--white); }
.badge-best { background: var(--store-primary); color: var(--white); }
.card-tools {
	position: absolute; top: 56px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 8px;
}
.tool {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--white); color: var(--store-text);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .08); opacity: 0; transform: translateX(-10px); transition: opacity .3s, transform .3s var(--ease), color .2s;
}
.tool .icon { width: 17px; height: 17px; }
.tool:nth-child(2) { transition-delay: .05s; }
.card:hover .tool, .card:focus-within .tool { opacity: 1; transform: none; }
.stock-band {
	position: absolute; inset-inline: 0; bottom: 0; padding: 10px; text-align: center;
	background: rgba(51, 51, 51, .88); color: var(--white); font-size: 13px; font-weight: 500;
}
.is-out .card-cover img { opacity: .55; }
.card-body { flex: 1; padding-top: 16px; display: flex; flex-direction: column; }
.card-title { font-size: 15px; font-weight: 400; line-height: 1.55; }
.card-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-author { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rating { display: inline-flex; align-items: center; gap: 6px; }
.stars { display: inline-flex; gap: 1px; }
.stars .icon { width: 14px; height: 14px; }
.rating-lg .stars .icon { width: 19px; height: 19px; }
.rc { font-size: 12px; color: var(--muted); }
.card-body .rating { margin-top: 5px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; font-size: 15px; font-weight: 600; }
.price del { font-size: 12px; font-weight: 400; color: var(--muted-2); }
.price > * { white-space: nowrap; }
.card .price del { order: 1; }
/* صفّ السعر وزرّ السلّة: يُدفع وحده إلى أسفل البطاقة لتتساوى الصفوف (البند 7).
   والزرّ شريط «نسيم» الأصليّ (مسطّح بعرض البطاقة، «+ أضف إلى السلّة»)، ظاهرٌ دائمًا تحت السعر بدل أن يصعد فوق الغلاف عند التحويم */
.card-foot { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: auto; padding-top: 6px; }
.card-add {
	display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px;
	border-radius: var(--radius-sm); background: var(--store-primary); color: var(--white); font-size: 13px; font-weight: 500;
	white-space: nowrap; transition: background .2s;
}
.card-add .icon { width: 16px; height: 16px; flex: none; }
.card-add:hover { background: var(--store-primary-dark); }
.card-add:disabled { background: var(--tile); color: var(--muted); cursor: not-allowed; }

/* شكل البطاقة */
[data-card-style="framed"] .card-media { background: var(--white); border: 1px solid var(--line); }
[data-card-style="plain"] .card-media { background: transparent; aspect-ratio: 2 / 3; }
[data-card-style="plain"] .card-cover img { width: 100%; box-shadow: 0 10px 26px rgba(0, 0, 0, .13); }

/* على أجهزة اللمس تظهر الأزرار دائمًا */
@media (hover: none) {
	.tool { opacity: 1; transform: none; }
}

/* ── التصنيفات */
.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cat-media { display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: var(--tile); border-radius: var(--radius); }
.cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.cat-tile:hover .cat-media img { transform: scale(1.06); }
.cat-name { margin-top: 14px; font-size: 16px; font-weight: 500; }
.cat-count { font-size: 13px; color: var(--muted); }

/* ── المؤلّفون */
.authors-sec { padding-top: 0; }
.author-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 56px; }
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; width: 170px; }
.author-photo { display: block; width: 170px; height: 170px; padding: 10px; border-radius: 50%; background: var(--tile); }
.author-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: grayscale(.2); transition: filter .4s; }
.author-card:hover .author-photo img { filter: none; }
.author-name { margin-top: 16px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.author-count { font-size: 13px; color: var(--muted); }

/* ── آراء القرّاء */
.reviews-band { position: relative; overflow: hidden; background: var(--soft); padding: 100px 0 90px; text-align: center; }
.leaf { position: absolute; bottom: -6px; inset-inline-end: -10px; width: 230px; fill: color-mix(in srgb, var(--store-primary) 12%, transparent); stroke: color-mix(in srgb, var(--store-primary) 22%, transparent); stroke-width: 1.4; }
.leaf path:first-child { fill: none; }
.quote-mark { display: block; font-size: 80px; font-weight: 600; line-height: .6; height: 40px; }
.quotes { display: grid; max-width: 880px; margin: 26px auto 0; }
.quote { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility .8s; }
.quote.is-active, .quotes:not(.rot-ready) .quote:first-child { opacity: 1; visibility: visible; }
.quote blockquote { margin-top: 18px; font-size: 23px; font-weight: 300; line-height: 1.9; }
.quote figcaption { margin-top: 26px; display: flex; flex-direction: column; gap: 2px; }
.quote figcaption b { font-size: 15px; font-weight: 600; }
.quote figcaption span { font-size: 13px; color: var(--muted); }
.quote-dots { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.quote-dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(51, 51, 51, .22); }
.quote-dots button[aria-current="true"] { background: var(--store-primary); }
[data-show-reviews="false"] .reviews-band { display: none; }

/* ── المقالات */
.posts-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: center; }
.posts-intro .sec-title { font-size: 42px; }
.posts-intro p { margin: 18px 0 32px; color: var(--muted); max-width: 340px; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 30px; }
.post-grid-3, .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card { display: flex; flex-direction: column; align-items: flex-start; }
.post-media { display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tile); border-radius: var(--radius); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-date { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 13px; color: var(--muted); }
.post-date .icon { width: 15px; height: 15px; }
.post-card h3 { margin-top: 8px; font-size: 19px; font-weight: 500; line-height: 1.55; }
.post-excerpt { margin: 10px 0 16px; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── شاهدتَه مؤخّرًا */
.recent { padding-top: 0; }
.recent .sec-head { margin-bottom: 36px; }
.mini-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.mini { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.mini-cover { flex: none; width: 70px; padding: 8px; background: var(--tile); border-radius: var(--radius-sm); }
.mini-body { min-width: 0; }
.mini-body .type-dot { width: 22px; height: 22px; }
.mini-body .type-dot .icon { width: 12px; height: 12px; }
.mini h3 { margin-top: 4px; font-size: 14px; font-weight: 500; line-height: 1.5; }
.mini p { font-size: 12px; color: var(--muted); }
.mini .price { margin-top: 2px; font-size: 13px; color: var(--store-text); }

/* ── التذييل */
.site-footer { background: var(--soft); padding-top: 80px; font-size: 14px; }
.foot-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.6fr; gap: 40px; padding-bottom: 60px; }
.site-footer h3 { font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.site-footer ul li + li { margin-top: 10px; }
.site-footer ul a { color: var(--muted); transition: color .2s; }
.site-footer ul a:hover { color: var(--store-text); }
.foot-brand p { margin: 18px 0 20px; color: var(--muted); max-width: 300px; }
.foot-contact li { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); }
.foot-contact .icon { width: 16px; height: 16px; margin-top: 4px; }
.foot-social a { display: inline-flex; align-items: center; gap: 10px; }
.foot-social .icon { width: 16px; height: 16px; }
.news-title { font-size: 32px !important; font-weight: 300 !important; margin-bottom: 12px !important; }
.foot-news > p { color: var(--muted); }
.foot-news .line-field { margin-top: 18px; }
.news-offer { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.news-offer .icon { width: 15px; height: 15px; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 30px; padding-block: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pay-note { display: inline-flex; align-items: center; gap: 8px; }
.pay-note .icon { width: 16px; height: 16px; }
.to-top {
	position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 40; display: grid; place-items: center;
	width: 44px; height: 44px; background: var(--store-primary); color: var(--white); border-radius: var(--radius-sm);
	opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .3s, transform .3s, visibility .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top .up { transform: rotate(90deg); }

/* ── رأس الصفحات الداخليّة */
.page-head { position: relative; overflow: hidden; background: var(--soft); }
.page-head-in { position: relative; z-index: 1; padding-block: 64px; }
.page-head h1 { margin-top: 14px; font-size: 46px; font-weight: 300; line-height: 1.3; }
.page-head p { margin-top: 8px; color: var(--muted); max-width: 520px; }
.page-head-img {
	position: absolute; inset-block: 0; inset-inline-end: 0; width: 46%; height: 100%; object-fit: cover;
	-webkit-mask-image: linear-gradient(to left, transparent, #000 45%); mask-image: linear-gradient(to left, transparent, #000 45%);
}
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line-strong); }
.breadcrumb a:hover { color: var(--store-text); }
.breadcrumb [aria-current] { color: var(--store-text); }
.crumbs-bar { padding-block: 26px 10px; }

/* شريط التصنيفات الفرعيّة */
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 34px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; transition: border-color .2s; }
.chip small { font-size: 12px; color: var(--muted); }
.chip:hover { border-color: var(--store-primary); }
.chip[aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: var(--white); }

/* ── قائمة الكتب */
.listing-sec { padding-top: 46px; }
.listing { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
.listing .book-grid { --cols: 3; }
[data-books-per-row="5"] .listing .book-grid { --cols: 4; }
.filters-head { display: none; }
.f-box { padding-block: 22px; border-bottom: 1px solid var(--line); }
.f-box:first-of-type { padding-top: 0; }
.f-box h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--store-primary); margin: 0; }
.check small { margin-inline-start: auto; font-size: 12px; color: var(--muted); }
.check > span { display: inline-flex; align-items: center; gap: 6px; }
.price-range { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.price-range .line-input { width: 70px; color: var(--store-text); }
.filters > .btn { display: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.tb-count { font-size: 14px; color: var(--muted); }
.tb-count b { color: var(--store-text); font-weight: 500; }
.tb-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.tb-sort .line-select { color: var(--store-text); padding-inline-end: 6px; }
.filters-toggle { display: none; min-height: 40px; padding: 0 18px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 64px; }
.pagination a, .pg-gap { display: grid; place-items: center; min-width: 40px; height: 40px; font-size: 16px; font-weight: 300; color: var(--muted); }
.pagination a[aria-current="page"] { color: var(--store-text); font-weight: 500; box-shadow: inset 0 -1px 0 var(--store-primary); }
.pagination a:hover { color: var(--store-text); }
.pg-arrow .icon { width: 18px; height: 18px; }

/* ── صفحة الكتاب */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 72px; padding-bottom: 40px; }
.pdp-stage { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: var(--tile); border-radius: var(--radius); }
.pdp-cover { width: 50%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 24px 46px rgba(0, 0, 0, .16); }
.pdp-stage > .type-dot { position: absolute; top: 20px; inset-inline-end: 20px; width: 36px; height: 36px; }
.pdp-stage > .badge { position: absolute; top: 20px; inset-inline-start: 20px; width: 52px; height: 52px; font-size: 13px; }
.thumbs { display: flex; gap: 12px; margin-top: 14px; }
.thumb { width: 82px; padding: 9px 14px; background: var(--tile); border: 1px solid transparent; border-radius: var(--radius-sm); }
.thumb[aria-pressed="true"] { border-color: var(--store-primary); }
.pdp-info { padding-top: 10px; }
.pdp-title { font-size: 40px; font-weight: 300; line-height: 1.35; }
.pdp-by { margin-top: 8px; color: var(--muted); }
.pdp-by a, .pdp-by span { color: var(--store-text); border-bottom: 1px solid var(--line-strong); }
.pdp-rating { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.pdp-rating a:hover { color: var(--store-text); }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin-top: 22px; font-size: 26px; font-weight: 500; }
.pdp-price del { font-size: 16px; font-weight: 400; color: var(--muted-2); }
.qty-deal { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 16px; background: var(--soft); border-inline-start: 2px solid var(--store-accent); font-size: 14px; }
.qty-deal .icon { width: 17px; height: 17px; }
.pdp-lead { margin-top: 18px; color: var(--muted); line-height: 1.95; }
.formats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.formats-label { width: 100%; font-size: 13px; font-weight: 600; }
.fmt { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; min-width: 130px; }
.fmt .icon { grid-row: span 2; width: 19px; height: 19px; }
.fmt [data-slot="book.price"] { font-size: 12px; color: var(--muted); }
.fmt[aria-current="true"] { border-color: var(--store-primary); box-shadow: inset 0 0 0 1px var(--store-primary); }
.stock-line { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 14px; }
.stock-line .icon { width: 17px; height: 17px; color: var(--type-edu); stroke-width: 2; }
.buy-row { display: flex; gap: 12px; margin-top: 18px; }
.btn-grow { flex: 1; min-height: 52px; }
.buy-row .icon-btn { height: 52px; width: 52px; }
.pdp-info > .btn-block { margin-top: 12px; }
.qty { display: inline-flex; align-items: stretch; height: 52px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); flex: none; }
.qty button { width: 40px; display: grid; place-items: center; }
.qty .icon { width: 15px; height: 15px; }
.qty input { width: 42px; border: 0; background: transparent; text-align: center; font-size: 15px; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 42px; }
.qty-sm button { width: 34px; }
.qty-sm input { width: 34px; }
.sample { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 14px 16px; background: var(--soft); border-radius: var(--radius-sm); }
.sample-play { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--store-primary); color: var(--white); flex: none; }
.sample-play .icon { width: 18px; height: 18px; fill: currentColor; }
.sample-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sample-body b { font-weight: 500; }
.sample-track { display: block; height: 3px; background: var(--line); }
.sample-track span { display: block; height: 100%; background: var(--store-primary); }
.sample-body small { font-size: 12px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts li { display: flex; flex-direction: column; gap: 2px; }
.facts .icon { width: 22px; height: 22px; stroke-width: 1.2; margin-bottom: 6px; }
.facts span { font-size: 12px; color: var(--muted); }
.facts b { font-size: 14px; font-weight: 500; }

.pdp-tabs-sec { padding-top: 40px; }
.pdp-tabs { display: flex; justify-content: center; gap: 46px; border-bottom: 1px solid var(--line); }
.pdp-tabs [role="tab"] { padding: 16px 0; font-size: 16px; font-weight: 500; color: var(--muted); box-shadow: inset 0 0 0 transparent; transition: color .2s, box-shadow .2s; }
.pdp-tabs [role="tab"][aria-selected="true"] { color: var(--store-text); box-shadow: inset 0 -2px 0 var(--store-primary); }
.tab-panel { max-width: 960px; margin-inline: auto; padding-top: 44px; }
.prose p { font-size: 16px; line-height: 2; }
.prose p + p { margin-top: 16px; }
.prose h2 { margin: 34px 0 12px; font-size: 24px; font-weight: 400; }
.prose blockquote { margin: 26px 0; padding-inline-start: 22px; border-inline-start: 2px solid var(--store-primary); font-size: 19px; font-weight: 300; line-height: 1.9; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 50px; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec dt { color: var(--muted); }
.spec dd { font-weight: 500; text-align: end; }
.rv-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 60px; }
.rv-summary { text-align: center; }
.rv-score { display: block; font-size: 60px; font-weight: 300; line-height: 1.1; }
.rv-summary > p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.rv-bars { margin-top: 22px; }
.rv-bars li { display: grid; grid-template-columns: 14px 1fr 36px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.rv-bars li + li { margin-top: 6px; }
.bar { height: 4px; background: var(--line); }
.bar span { display: block; height: 100%; background: var(--gold); }
.rv { padding-block: 22px; border-bottom: 1px solid var(--line); }
.rv:first-child { padding-top: 0; }
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rv-top time { font-size: 12px; color: var(--muted); }
.rv p { margin-top: 10px; font-size: 15px; line-height: 1.9; }
.rv > b { display: block; margin-top: 8px; font-size: 14px; font-weight: 600; }
.rv-form { margin-top: 34px; padding: 28px; background: var(--soft); border-radius: var(--radius); }
.rv-form h3 { font-size: 19px; font-weight: 400; }
.rv-form > p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.rv-form .btn { margin-top: 18px; }
.rv-form .line-area { margin-top: 10px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; margin-top: 14px; padding: 0; border: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; }
.star-input label .icon { width: 24px; height: 24px; fill: var(--star-off); stroke: var(--star-off); }
.star-input input:checked ~ label .icon, .star-input label:hover .icon, .star-input label:hover ~ label .icon { fill: var(--gold); stroke: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary); outline-offset: 2px; }
.related { padding-top: 40px; }

/* ── السلّة */
.page-head-plain .page-head-in { padding-block: 54px; }
.cart-sec { padding-top: 56px; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
.cart-head, .cart-row { display: grid; grid-template-columns: 84px minmax(0, 1.8fr) 1fr 1fr 1fr 36px; gap: 20px; align-items: center; }
.cart-head { padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.cart-head span:first-child { grid-column: span 2; }
.cart-row { padding-block: 22px; border-bottom: 1px solid var(--line); }
.cart-cover { padding: 9px; background: var(--tile); border-radius: var(--radius-sm); }
.cart-info h3 { font-size: 16px; font-weight: 500; line-height: 1.5; }
.cart-info > p { font-size: 13px; color: var(--muted); }
.cart-type { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-type .type-dot { width: 22px; height: 22px; }
.cart-type .type-dot .icon { width: 12px; height: 12px; }
.cart-price { display: flex; flex-direction: column; font-size: 15px; }
.cart-price del { font-size: 12px; color: var(--muted-2); }
.cart-total { font-size: 15px; font-weight: 600; }
.cart-remove { display: grid; place-items: center; width: 36px; height: 36px; color: var(--muted); }
.cart-remove:hover { color: var(--store-text); }
.cart-remove .icon { width: 18px; height: 18px; }
.cart-empty { padding: 60px 20px; text-align: center; }
.cart-empty h2 { margin-top: 16px; font-size: 26px; font-weight: 300; }
.cart-empty p { margin: 8px 0 24px; color: var(--muted); }
.cart-empty .icon-xl { margin-inline: auto; }
.cart-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.coupon { display: flex; align-items: center; gap: 14px; }
.coupon .line-input { width: 200px; }
.coupon .btn { min-height: 42px; padding: 0 22px; }
.summary { padding: 34px 32px; background: var(--soft); border-radius: var(--radius); }
.summary h2 { font-size: 24px; font-weight: 300; margin-bottom: 14px; }
.summary dl > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 13px; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary dt { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.sum-total { font-size: 18px !important; border-bottom: 0 !important; }
.sum-total dt { color: var(--store-text); }
.sum-total dd { font-weight: 600; }
.summary .btn-block { margin-top: 14px; }
.continue { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 14px; }
.continue .icon { width: 16px; height: 16px; }
.sum-notes { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sum-notes li { display: flex; align-items: center; gap: 8px; }
.sum-notes li + li { margin-top: 6px; }
.sum-notes .icon { width: 16px; height: 16px; }

/* ── 404 */
.nf { padding: 70px 0 30px; text-align: center; }
.nf-in { display: flex; flex-direction: column; align-items: center; }
.nf-code { font-size: clamp(120px, 20vw, 230px); font-weight: 300; line-height: 1; }
.nf h1 { margin-top: 10px; font-size: 30px; font-weight: 300; }
.nf-in > p { margin-top: 10px; color: var(--muted); max-width: 520px; }
.nf-search { width: 100%; max-width: 480px; margin: 34px 0 30px; }
.faq-sec { padding-top: 0; }
.faq-wrap { max-width: 900px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 16px; font-weight: 500; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { width: 18px; height: 18px; transition: transform .3s; }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item p { padding-bottom: 22px; color: var(--muted); max-width: 760px; }

/* ── المؤلّف */
.author-head { background: var(--soft); padding: 40px 0 76px; }
.author-hero { display: flex; align-items: center; gap: 64px; margin-top: 40px; }
.author-photo-lg { width: 270px; height: 270px; padding: 12px; background: var(--white); flex: none; }
.author-intro h1 { font-size: 46px; font-weight: 300; line-height: 1.3; }
.author-meta { color: var(--muted); }
.author-intro .quote-mark { margin-top: 30px; }
.author-bio { margin-top: 6px; font-size: 19px; font-weight: 300; line-height: 2; max-width: 760px; }

/* ── المقال */
.post-head { max-width: 860px; text-align: center; padding-block: 34px 34px; display: flex; flex-direction: column; align-items: center; }
.post-head .post-date { margin-top: 26px; }
.post-head h1 { margin-top: 8px; font-size: 42px; font-weight: 300; line-height: 1.4; }
.post-figure { max-width: 1060px; }
.post-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.post-body { max-width: 780px; padding-block: 50px 20px; }
.posts-related { background: var(--soft); margin-top: 60px; }

/* ── صفحة المكوّنات */
.cmp-block { padding-block: 46px; border-bottom: 1px solid var(--line); }
.cmp-title { font-size: 16px; font-weight: 500; margin-bottom: 24px; }
.cmp-title code { font-family: ui-monospace, monospace; font-size: 12px; font-weight: 400; background: var(--soft); padding: 2px 8px; direction: ltr; unicode-bidi: isolate; }
.cmp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.cmp-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.cmp-note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.cmp-cards { --cols: 5; }
.cmp-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 40px; }
.cmp-styles .book-grid { --cols: 1 !important; margin-top: 12px; }
.cmp-styles .cmp-note { margin-top: 0; }
.cmp-svc { border: 1px solid var(--line); padding-inline: 16px; }
.cmp-band { padding: 50px 20px; }
.cmp-fields .line-field { width: 280px; }

/* ==========================================================================
   العروض
   ========================================================================== */
@media (max-width: 1199px) {
	:root { --section: 80px; }
	.main-nav > ul { gap: 26px; }
	.book-grid { --cols: min(var(--cols-md, 4), 4); }
	[data-books-per-row="3"] .book-grid { --cols: 3; }
	.cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.mini-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.foot-cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
	.foot-news { grid-column: 1 / -1; max-width: 520px; }
	.cmp-cards { --cols: 3; }
}

@media (max-width: 1023px) {
	:root { --hero-h: 480px; --section: 70px; }
	.main-nav { display: none; }
	.main-nav + .hdr-actions { margin-inline-start: auto; }
	.menu-btn { display: inline-grid; }
	.hdr { gap: 4px; min-height: 70px; }
	.hdr .brand { margin-inline-start: 4px; }
	.book-grid { --cols: 3; }
	.book-row .book-grid { --cols: 4; gap: 40px 18px; }
	.svc { gap: 16px; font-size: 12px; }
	.svc-social, .svc-end > a[data-slot="store.whatsapp"], .svc-phone > span { display: none; }
	.banner { height: 400px; }
	.banner-title { font-size: 28px; }
	.banner-frame { inset-block: 28px; inset-inline-start: 28px; width: min(60%, 340px); padding: 26px; }
	.banner-panel .banner-title { font-size: 24px; }
	.trust-row { grid-template-columns: repeat(2, 1fr); }
	.trust-item:nth-child(3) { border-inline-start: 0; }
	.trust-item:nth-child(n+3) { border-top: 1px solid var(--line); }
	.posts-layout { grid-template-columns: 1fr; gap: 36px; }
	.posts-intro { text-align: center; display: flex; flex-direction: column; align-items: center; }
	.posts-intro p { max-width: 520px; }
	.blog-grid, .post-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 100; width: min(88vw, 360px); padding: 18px 22px 30px;
		background: var(--store-bg); overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s;
	}
	.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; margin-bottom: 14px; }
	.filters-head h2 { font-size: 20px; font-weight: 400; }
	.filters > .btn { display: flex; margin-top: 24px; }
	.f-box:first-of-type { padding-top: 22px; }
	.filters-toggle { display: inline-flex; }
	.listing .book-grid, [data-books-per-row="5"] .listing .book-grid { --cols: 3; }
	.pdp { grid-template-columns: 1fr; gap: 36px; }
	.pdp-gallery { max-width: 560px; width: 100%; margin-inline: auto; }
	.rv-layout { grid-template-columns: 1fr; gap: 30px; }
	.rv-summary { max-width: 320px; margin-inline: auto; }
	.cart-layout { grid-template-columns: 1fr; }
	.author-hero { gap: 40px; }
	.author-photo-lg { width: 210px; height: 210px; }
	.page-head-img { width: 55%; opacity: .7; }
}

@media (max-width: 767px) {
	:root { --gutter: 16px; --hero-h: 440px; --section: 60px; }
	body { font-size: 14px; }
	.svc { justify-content: center; min-height: 36px; font-size: 12px; }
	.svc-end { display: none; }
	.svc:has(.shipbar:not([hidden])) .svc-phone { display: none; }
	.ship-track { width: 60px; }
	.hdr { min-height: 62px; }
	.hide-sm { display: none; }
	.brand-name { font-size: 19px; }
	.brand img { width: 30px; height: 30px; }
	.hdr-btn { width: 40px; height: 40px; }
	.sec-head { margin-bottom: 34px; }
	.sec-title { font-size: 28px; }
	.banner-frame { width: auto; }
	.trust-item { gap: 10px; }
	.trust-item .icon { width: 28px; height: 28px; }
	.trust-item b { font-size: 14px; }
	.trust-item span { font-size: 12px; }
	.book-grid { --cols: 2 !important; gap: 34px 14px; }
	.card-tools { top: 50px; inset-inline-end: 8px; }
	.tool { width: 34px; height: 34px; }
	.badges { top: 10px; inset-inline-start: 10px; gap: 6px; }
	.badge { width: 38px; height: 38px; font-size: 11px; }
	.card-media > .type-dot { top: 10px; inset-inline-end: 10px; width: 28px; height: 28px; }
	.card-title { font-size: 14px; }
	.more-wrap { margin-top: 36px; }
	.author-photo { width: 100%; height: auto; aspect-ratio: 1; padding: 6px; }
	.author-name { font-size: 14px; margin-top: 10px; }
	.author-count { font-size: 12px; }
	.reviews-band { padding: 70px 0 60px; }
	.quote blockquote { font-size: 18px; }
	.leaf { width: 140px; }
	.post-grid, .blog-grid, .post-grid-3 { grid-template-columns: 1fr; gap: 40px; }
	.posts-intro .sec-title { font-size: 32px; }
	.mini-row { display: flex; overflow-x: auto; gap: 18px; padding-bottom: 6px; scroll-snap-type: x mandatory; }
	.mini { flex: 0 0 230px; scroll-snap-align: start; }
	.foot-cols { grid-template-columns: 1fr 1fr; gap: 34px 20px; padding-bottom: 40px; }
	.foot-brand, .foot-news { grid-column: 1 / -1; }
	.site-footer { padding-top: 60px; }
	.page-head-in { padding-block: 40px; }
	.page-head h1 { font-size: 34px; }
	.page-head-img { display: none; }
	.listing-sec { padding-top: 30px; }
	.listing .book-grid { --cols: 2; }
	.toolbar { gap: 12px; }
	.tb-count { order: 3; width: 100%; }
	.pdp-title { font-size: 30px; }
	.pdp-price { font-size: 22px; }
	.btn-grow { padding: 0 14px; min-width: 0; }
	.facts { gap: 10px; }
	.facts b { font-size: 13px; }
	.pdp-tabs { gap: 28px; }
	.tab-panel { padding-top: 30px; }
	.spec { grid-template-columns: 1fr; }
	.cart-head { display: none; }
	.cart-row { grid-template-columns: 76px minmax(0, 1fr) auto; grid-template-areas: "cover info remove" "cover price price" "cover qty total"; gap: 8px 14px; align-items: start; }
	.cart-cover { grid-area: cover; }
	.cart-info { grid-area: info; }
	.cart-price { grid-area: price; flex-direction: row; gap: 10px; align-items: baseline; }
	.cart-row .qty { grid-area: qty; justify-self: start; }
	.cart-total { grid-area: total; align-self: center; }
	.cart-remove { grid-area: remove; }
	.coupon { width: 100%; }
	.coupon .line-input { flex: 1; width: auto; min-width: 0; }
	.summary { padding: 28px 20px; }
	.author-hero { flex-direction: column; text-align: center; gap: 24px; margin-top: 26px; }
	.author-photo-lg { width: 190px; height: 190px; }
	.author-intro h1 { font-size: 34px; }
	.author-bio { font-size: 16px; }
	.post-head h1 { font-size: 30px; }
	.post-body { padding-top: 34px; }
	.cmp-styles { grid-template-columns: 1fr 1fr; gap: 24px; }
	.cmp-cards { --cols: 2; }
	.cmp-fields .line-field { width: 100%; }
	.cmp-svc .svc { flex-wrap: wrap; justify-content: flex-start; padding-block: 8px; }
}

@media (max-width: 420px) {
	.pdp-tabs [role="tab"] { font-size: 15px; }
	.formats .fmt { min-width: 0; flex: 1; padding: 10px; }
}

/* ==========================================================================
   الإصدار الثاني: التبويبات، والعروض بعدّاد، والدوّار، وكتاب الأسبوع،
   وعرض القائمة في التصنيف، وصندوق التوصيل والدفع
   ========================================================================== */

/* تبويبات «الرائج الآن» تحت العنوان: خطٌّ رفيع تحت المختار (القاعدة 16) */
.row-tabs { display: flex; justify-content: center; gap: 34px; margin-top: 24px; overflow-x: auto; scrollbar-width: none; }
.row-tabs::-webkit-scrollbar { display: none; }
.row-tab { flex: none; padding: 8px 0; font-size: 15px; color: var(--muted); white-space: nowrap; box-shadow: inset 0 -1px 0 transparent; transition: color .2s, box-shadow .2s; }
.row-tab:hover { color: var(--store-text); }
.row-tab[aria-selected="true"] { color: var(--store-text); font-weight: 500; box-shadow: inset 0 -1px 0 var(--store-primary); }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* شبكة الرئيسيّة: صفّان كاملان لكلّ عددٍ في الصفّ (8 أو 9 أو 10 كتب) */
.home-grid > .card:nth-child(n+9) { display: none; }
[data-books-per-row="3"] .home-grid > .card:nth-child(9),
[data-books-per-row="5"] .home-grid > .card:nth-child(n+9) { display: flex; }

/* ── عروض الموسم */
.deals-sec { background: var(--soft); }
.deals { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 56px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 10px; }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.deals-intro .sec-title { font-size: 40px; }
.deals-intro .sec-sub { max-width: 320px; }
.countdown { display: flex; gap: 8px; margin-top: 26px; }
.countdown[hidden] { display: none; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 10px 4px 8px; background: var(--white); border-radius: var(--radius-sm); }
.cd-unit b { font-size: 28px; font-weight: 300; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: var(--muted); }
.rail-nav { display: flex; align-items: center; gap: 8px; margin-top: 30px; }
.rail-nav .more-link { margin-inline-start: 14px; }
.rail-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--store-text); transition: border-color .2s, opacity .2s; }
.rail-btn:hover { border-color: var(--store-primary); }
.rail-btn:disabled { opacity: .35; cursor: default; }
.rail-btn .icon { width: 18px; height: 18px; }
.deals-sec .card-media { background: var(--white); }
[data-card-style="plain"] .deals-sec .card-media { background: transparent; }

/* الدوّار الأفقيّ: يُمرَّر باللمس، ويتحرّك بسهمين في الحاسوب */
.rail { min-width: 0; --rail-cols: var(--cols); --rail-gap: 30px; }
.deals .rail { --rail-cols: 3; }
.book-rail {
	display: grid; grid-auto-flow: column; grid-template-columns: none; gap: 40px var(--rail-gap);
	grid-auto-columns: calc((100% - (var(--rail-cols) - 1) * var(--rail-gap)) / var(--rail-cols));
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 2px;
}
.book-rail::-webkit-scrollbar { display: none; }
.book-rail > .card { scroll-snap-align: start; }
.sec-head .rail-nav { justify-content: center; margin-top: 22px; }

/* ── كتاب الأسبوع */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; max-width: 1140px; margin-inline: auto; }
.feature-media { position: relative; display: grid; place-items: center; aspect-ratio: 5 / 4; background: var(--tile); border-radius: var(--radius); overflow: hidden; }
.feature-media img { width: 38%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 24px 46px rgba(0, 0, 0, .16); transition: transform .6s var(--ease); }
.feature-media:hover img { transform: translateY(-6px); }
.feature-media > .type-dot { position: absolute; top: 20px; inset-inline-end: 20px; width: 36px; height: 36px; }
.feature-title { font-size: 38px; font-weight: 300; line-height: 1.35; }
.feature-desc { margin-top: 18px; color: var(--muted); line-height: 1.95; }
.feature-desc p + p { margin-top: 10px; }
.feature-body .pdp-price { margin-top: 16px; }
.feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }

/* التصنيفات على رماديٍّ فاتح، والمؤلّفون بعدها على الأبيض */
.cats-sec { background: var(--soft); }
.cats-sec .cat-media { background: var(--white); }
.authors-sec { padding-top: var(--section); }

/* ── التصنيف: المرشّحات المختارة، وتبديل الشبكة والقائمة */
.tb-end { display: flex; align-items: center; gap: 18px; }
.view-switch { display: flex; gap: 4px; }
.view-switch button { display: grid; place-items: center; width: 40px; height: 40px; color: var(--muted); border: 1px solid transparent; border-radius: var(--radius-sm); }
.view-switch button[aria-pressed="true"] { color: var(--store-text); border-color: var(--line-strong); }
.view-switch .icon { width: 18px; height: 18px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -16px 0 32px; }
.active-filters .chip { padding: 5px 12px; font-size: 13px; gap: 6px; }
.active-filters .chip .icon { width: 13px; height: 13px; }
.clear-filters { font-size: 13px; color: var(--muted); border-bottom: 1px solid currentColor; line-height: 1.6; margin-inline-start: 6px; }
.book-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 26px; }
.is-list .card { flex-direction: row; gap: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.is-list .card-media { flex: none; width: 180px; }
.is-list .card-body { padding-top: 8px; }
.is-list .card-title { font-size: 19px; }
.is-list .card-foot { flex-direction: row; align-items: center; justify-content: flex-start; gap: 26px; }
.is-list .card-add { padding: 0 26px; }
.is-list .badges { top: 8px; inset-inline-start: 8px; gap: 4px; }
.is-list .badge { width: 34px; height: 34px; font-size: 10px; }
.is-list .card-media > .type-dot { top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; }

/* ── صفحة الكتاب: المعرض يثبت بجانب العمود الأطول، وصندوق التوصيل والدفع */
.pdp-gallery { position: sticky; top: 110px; align-self: start; }
.info-list { display: grid; gap: 8px; margin-top: 22px; padding: 16px 18px; background: var(--soft); border-radius: var(--radius-sm); font-size: 14px; }
.info-list li { display: flex; align-items: center; gap: 10px; }
.info-list .icon { width: 17px; height: 17px; flex: none; }

@media (min-width: 1024px) {
	.filters { position: sticky; top: 110px; }
}

@media (min-width: 768px) {
	/* صفوف الاقتراحات الداخليّة بأربعة كتب: صفٌّ واحد كامل */
	.book-grid.row-4 { --cols: 4; }
}

@media (max-width: 1199px) {
	[data-books-per-row="5"] .home-grid > .card:nth-child(n+9) { display: none; }
	.deals-intro .sec-title { font-size: 34px; }
	.deals { grid-template-columns: minmax(0, 1fr); gap: 34px; }
	.deals-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 30px; align-items: end; }
	.deals-intro > .kicker, .deals-intro > .sec-title, .deals-intro > .sec-sub { grid-column: 1; justify-self: start; }
	.deals-intro .sec-sub { max-width: none; }
	.deals-intro .countdown { grid-column: 2; grid-row: 1 / 4; margin-top: 0; }
	.deals-intro .rail-nav { grid-column: 1 / -1; margin-top: 20px; }
	.deals .rail { --rail-cols: 4; }
	.feature { gap: 48px; }
}

@media (max-width: 1023px) {
	[data-books-per-row="3"] .home-grid > .card:nth-child(9) { display: none; }
	.rail, .deals .rail { --rail-cols: 3; --rail-gap: 18px; }
	.feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; }
	.feature-title { font-size: 30px; }
	.is-list .card-media { width: 150px; }
	.pdp-gallery { position: static; }
}

@media (max-width: 767px) {
	/* السلايدر: الصورة فوق النصّ لا خلفه */
	.hero { background: var(--soft); }
	.slide { height: auto; display: flex; flex-direction: column; }
	.slide > img { position: relative; inset: auto; height: 210px; object-position: 0 center; }
	.slide::before { display: none; }
	.slide-body { height: auto; justify-content: flex-start; padding-block: 22px 54px; }
	.slide-kicker { margin-bottom: 6px; }
	.slide-title { font-size: 30px; margin-bottom: 20px; }
	.hero-dots { bottom: 22px; }
	/* البانران: شريطٌ يُمرَّر */
	.banners-sec { padding-top: 34px; }
	.banners { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
	.banners::-webkit-scrollbar { display: none; }
	.banner { flex: 0 0 84%; height: 230px; scroll-snap-align: start; }
	.banner-frame { inset: 16px; padding: 18px; }
	.banner-title, .banner-panel .banner-title { font-size: 23px; }
	.banner-text { margin-top: 4px; font-size: 13px; }
	.banner-panel { inset-inline: 14px; bottom: 14px; padding: 14px 18px; }
	/* شريط الثقة: صفٌّ واحد يُمرَّر */
	.trust { margin-top: 30px; }
	.trust-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-row::-webkit-scrollbar { display: none; }
	.trust-item { flex: 0 0 74%; padding: 14px 12px; scroll-snap-align: start; }
	.trust-item:nth-child(n) { border-top: 0; }
	.trust-item + .trust-item, .trust-item:nth-child(3) { border-inline-start: 1px solid var(--line); }
	/* التبويبات تُمرَّر من حافّة الشاشة */
	.row-tabs { justify-content: flex-start; gap: 24px; margin-top: 16px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
	/* العروض */
	.deals-intro { display: block; }
	.deals-intro .sec-title { font-size: 30px; }
	.deals-intro .countdown { margin-top: 18px; }
	.cd-unit { min-width: 0; flex: 1; }
	.cd-unit b { font-size: 24px; }
	.deals-intro .rail-nav { margin-top: 16px; }
	.rail-btn { display: none; }
	.rail-nav .more-link { margin-inline-start: 0; }
	.rail, .deals .rail { --rail-cols: 1.75; --rail-gap: 14px; margin-inline: calc(-1 * var(--gutter)); }
	.book-rail { padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
	/* كتاب الأسبوع */
	.feature { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.feature-media { aspect-ratio: 4 / 3; }
	.feature-title { font-size: 28px; }
	.feature-actions .btn { flex: 1; }
	/* التصنيفات ثلاثةٌ في الصفّ، والمؤلّفون صفٌّ يُمرَّر */
	.cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
	.cat-name { margin-top: 8px; font-size: 14px; }
	.cat-count { font-size: 12px; }
	.author-row { flex-wrap: nowrap; justify-content: flex-start; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
	.author-row::-webkit-scrollbar { display: none; }
	.author-card { flex: 0 0 30%; width: auto; scroll-snap-align: start; }
	/* التصنيف */
	.tb-end { gap: 8px; }
	.active-filters { margin: -12px 0 24px; }
	.is-list .card { gap: 16px; padding-bottom: 20px; }
	.is-list .card-media { width: 112px; }
	.is-list .card-title { font-size: 15px; }
	.is-list .card-foot { flex-direction: column; align-items: stretch; gap: 10px; }
}

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

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