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

:root {
	--store-primary: #FD8D27;
	--store-primary-dark: #B45309;
	--store-accent: #E9DCCF;
	--store-bg: #FFFFFF;
	--store-text: #333333;

	/* محايدة */
	--ink: var(--store-text);
	--muted: #67615B;
	--line: #E6E1DA;
	--soft: #F6F4F1;
	--soft-2: color-mix(in srgb, var(--store-accent) 35%, #fff);
	--foot: #2F2F2F;
	--foot-text: #D9D5CF;
	--gold: #F2A900;
	--sale: var(--store-primary);
	--new: #2D7A55;
	--out: #3A3A3A;

	--wrap: 1240px;
	--gutter: 24px;
	--hdr-h: 84px;
	--radius: 10px;
	--pill: 999px;
	--per: 5;
	--shadow: 0 10px 30px rgba(51, 40, 30, .08);
	--ease: cubic-bezier(.2, .7, .2, 1);
}

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

/* ── الأساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: "Almarai", "Tajawal", system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	color: var(--ink);
	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, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--store-primary-dark); outline-offset: 2px; }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 200; background: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 18px; height: 18px; }
.icon-xs { width: 14px; height: 14px; }
.icon-thin { width: 46px; height: 46px; stroke-width: 1; }

/* ── الأزرار: كبسوليّة */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 10px 26px; border-radius: var(--pill); border: 1px solid transparent;
	font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap;
	transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--store-primary); color: var(--store-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--store-primary) 88%, #fff); }
.btn-white { background: #fff; color: var(--store-text); }
.btn-white:hover { background: var(--soft); }
.btn-ring { border-color: var(--line); }
.btn-dark { background: var(--store-text); color: #fff; }
.btn-dark:hover { background: color-mix(in srgb, var(--store-text) 85%, #000); }
.btn-outline { background: transparent; border-color: var(--store-text); color: var(--store-text); }
.btn-outline:hover { background: var(--store-text); color: #fff; }
.btn-lg { min-height: 54px; padding-inline: 32px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 6px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.icon-btn {
	position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px;
	border-radius: 50%; border: 0; background: transparent; color: var(--ink);
}
.icon-btn:hover { background: rgba(0, 0, 0, .05); }
.icon-ring { border: 1px solid var(--line); width: 54px; height: 54px; }
.icon-btn[aria-pressed="true"] .icon, .tool[aria-pressed="true"] .icon { fill: var(--store-primary); stroke: var(--store-primary); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

.field {
	width: 100%; min-height: 48px; padding: 10px 20px; border-radius: var(--pill);
	border: 1px solid var(--line); background: #fff;
}
.field:focus { outline: none; border-color: var(--store-text); }
textarea.field { border-radius: 16px; resize: vertical; }
select.field { appearance: none; padding-inline-end: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left 14px center / 16px; }

/* ── النجوم: ذهبيّة دائمًا */
.rating { display: inline-flex; gap: 2px; vertical-align: middle; }
.star { width: 15px; height: 15px; fill: var(--gold); stroke: none; }
.star.off { fill: #DDD6CC; }

/* ── دائرة نوع الكتاب */
.type-dot {
	display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
	color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.type-dot .icon { width: 17px; height: 17px; stroke-width: 1.9; }
.type-dot[data-type="print"] { background: #DB7056; }
.type-dot[data-type="ebook"] { background: #5675A3; }
.type-dot[data-type="audio"] { background: #986AB0; }
.type-dot[data-type="educational"] { background: #3f8f6b; }

/* ── الشارات */
.badge { display: inline-block; padding: 3px 11px; border-radius: var(--pill); font-size: 12px; font-weight: 800; line-height: 1.6; }
.badge-sale { background: var(--sale); color: var(--store-text); }
.badge-new { background: var(--new); color: #fff; }

/* ==========================================================================
   الرأس
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 60;
	background: #fff; border-bottom: 1px solid var(--line);
	transition: background .3s, box-shadow .3s, border-color .3s;
}
/* شفّافٌ فوق السلايدر وحده، في أعلى الرئيسيّة */
body:has(main > .hero:first-child:not([hidden])) .site-header:not(.is-scrolled):not(.is-open) {
	background: transparent; border-bottom-color: transparent;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(40, 30, 20, .08); border-bottom-color: transparent; }
.hdr { display: flex; align-items: center; gap: 20px; height: var(--hdr-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -.2px; white-space: nowrap; }
.hdr-menu { display: none; }
.hdr-nav { display: flex; align-items: center; gap: 30px; margin-inline-start: 44px; font-size: 15px; font-weight: 700; }
.hdr-nav > a { padding: 8px 0; position: relative; }
.hdr-nav > a::after { content: ""; position: absolute; inset-inline: 0; bottom: 2px; height: 2px; background: var(--store-primary); transform: scaleX(0); transition: transform .25s var(--ease); }
.hdr-nav > a:hover::after, .hdr-nav > a[aria-current]::after { transform: scaleX(1); }
.cats-menu { position: relative; }
.cats-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; font-weight: 700; padding: 8px 0; }
.cats-drop {
	position: absolute; top: calc(100% + 14px); inset-inline-start: -18px; min-width: 240px; padding: 10px;
	background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--ease);
}
.cats-menu:hover .cats-drop, .cats-menu.is-open .cats-drop, .cats-menu:focus-within .cats-drop { opacity: 1; visibility: visible; transform: none; }
.cats-drop a { display: block; padding: 9px 14px; border-radius: 8px; font-weight: 400; }
.cats-drop a:hover { background: var(--soft); }
.hdr-icons { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.dot-count {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px;
	border-radius: var(--pill); background: var(--store-text); color: #fff; font-size: 11px; font-weight: 700;
	display: grid; place-items: center; line-height: 1;
}
.hdr-search { background: #fff; border-top: 1px solid var(--line); padding: 14px 0; }
.search-row { display: flex; gap: 10px; }
.search-row .btn { flex: none; }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(30, 24, 20, .45); z-index: 90; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100; width: min(340px, 88vw);
	background: #fff; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; overflow-y: auto;
	transform: translateX(105%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav > a { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.drawer-label { margin-top: 12px; font-size: 13px; color: var(--muted); }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.drawer-cats a { padding: 6px 14px; border-radius: var(--pill); background: var(--soft); font-size: 14px; }
.drawer-call { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px; border-radius: 12px; background: var(--soft); font-size: 14px; }
.drawer-call b { display: block; font-size: 16px; }

/* ==========================================================================
   الأقسام
   ========================================================================== */
.section { padding-block: 72px; }
.section-tight { padding-block: 22px; }
.section-tight-top { padding-top: 44px; }
.section-soft { background: var(--soft); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.sec-head.center { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.sec-title { font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; line-height: 1.3; letter-spacing: -.3px; }
.sec-title.center { text-align: center; }
.sec-sub { color: var(--muted); margin-top: 6px; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: #B5ADA4; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); }

/* ── السلايدر */
.hero { position: relative; margin-top: calc(-1 * var(--hdr-h) - 1px); height: clamp(520px, 50vw, 720px); overflow: hidden; background: var(--store-accent); }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.slide.is-on { opacity: 1; visibility: visible; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.slide-text { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; padding-top: var(--hdr-h); }
.slide-title { max-width: 620px; font-size: clamp(36px, 4.6vw, 66px); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.slide-sub { max-width: 500px; font-size: clamp(17px, 1.5vw, 21px); }
.slide-text .btn { margin-top: 10px; box-shadow: 0 6px 18px rgba(80, 60, 40, .12); }
.slide.is-on .slide-text > * { animation: rise .8s var(--ease) both; }
.slide.is-on .slide-text > :nth-child(2) { animation-delay: .1s; }
.slide.is-on .slide-text > :nth-child(3) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-arrow {
	position: absolute; top: 55%; z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 0;
	background: rgba(255, 255, 255, .75); display: grid; place-items: center; color: var(--ink); transition: background .2s;
}
.hero-arrow:hover { background: #fff; }
.hero-arrow.prev { inset-inline-start: 26px; }
.hero-arrow.next { inset-inline-end: 26px; }
.hero-dots { position: absolute; bottom: 22px; inset-inline: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.hero-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: rgba(51, 51, 51, .3); transition: width .3s; }
.hero-dots button[aria-current="true"] { width: 28px; border-radius: 6px; background: var(--ink); }

/* ── بطاقات التصنيف الطوليّة */
.cat-tall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cat-tall { position: relative; display: block; aspect-ratio: 600 / 760; border-radius: 6px; overflow: hidden; background: var(--store-accent); isolation: isolate; }
.cat-tall img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.cat-tall::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(38, 28, 20, .62) 0%, rgba(38, 28, 20, .38) 34%, rgba(38, 28, 20, 0) 60%); }
.cat-tall:hover img { transform: scale(1.05); }
.cat-tall-text { position: absolute; z-index: 2; inset: 0 0 auto; padding: 34px 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: #fff; }
.cat-tall-name { font-size: clamp(26px, 2.5vw, 36px); font-weight: 800; line-height: 1.2; }
.cat-tall-count { font-size: 15px; }
.cat-tall .btn { margin-top: 10px; }

/* ==========================================================================
   بطاقة الكتاب
   ========================================================================== */
.bk-grid { display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); }
.bk { position: relative; display: flex; flex-direction: column; background: #fff; min-width: 0; }
.bk-media { position: relative; padding: 18px 18px 0; }
.bk-cover { display: block; position: relative; aspect-ratio: 2 / 3; background: var(--soft); border-radius: 4px 4px 0 0; overflow: hidden; }
.bk-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.bk:hover .bk-cover img { transform: scale(1.04); }
.bk-media .type-dot { position: absolute; top: 28px; inset-inline-end: 28px; }
.bk-badges { position: absolute; top: 28px; inset-inline-start: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bk-out { position: absolute; inset-inline: 18px; top: 46%; padding: 8px; text-align: center; background: var(--out); color: #fff; font-size: 13px; font-weight: 700; }
.bk.is-out .bk-cover img { filter: grayscale(.7); opacity: .7; }
.bk-tools { position: absolute; top: 68px; inset-inline-end: 28px; display: flex; flex-direction: column; gap: 8px; }
.tool { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 3px 10px rgba(0, 0, 0, .1); }
.tool .icon { width: 17px; height: 17px; }
.tool:hover { background: var(--store-primary); }
.bk-add {
	display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
	min-height: 42px; border: 0; background: var(--store-text); color: #fff; font-size: 14px; font-weight: 700; border-radius: 0 0 4px 4px;
	transition: background .2s, color .2s;
}
.bk-add .icon { width: 18px; height: 18px; }
.bk-add:hover { background: var(--store-primary); color: var(--store-text); }
.bk-add:disabled { background: #6E6862; cursor: not-allowed; }
@media (hover: hover) {
	.bk-tools .tool { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease), background .2s; }
	.bk-tools .tool[aria-pressed="true"] { opacity: 1; transform: none; }
	.bk:hover .bk-tools .tool, .bk:focus-within .bk-tools .tool { opacity: 1; transform: none; }
}
.bk-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 20px; flex: 1; }
.bk-title { font-size: 15px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bk-title a:hover { color: var(--store-primary-dark); }
.bk-author { font-size: 13px; color: var(--muted); }
.bk-rate { display: flex; align-items: center; gap: 6px; }
.bk-count { font-size: 12px; color: var(--muted); }
.bk-price { margin-top: auto; padding-top: 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-weight: 800; font-size: 17px; color: var(--store-primary-dark); }
.bk-price del { font-size: 13px; font-weight: 400; color: var(--muted); }

/* شكل البطاقة: ملتصقة (افتراضيّ)، مؤطَّرة، بسيطة */
body[data-card-style="joined"] .bk-grid { padding: 1px 1px 0 0; }
body[data-card-style="joined"] .bk-grid > .bk { border: 1px solid var(--line); margin: -1px -1px 0 0; }
body[data-card-style="framed"] .bk-grid { gap: 20px; }
body[data-card-style="framed"] .bk { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
body[data-card-style="minimal"] .bk-grid { gap: 26px 20px; }
body[data-card-style="minimal"] .bk-media { padding: 0; }
body[data-card-style="minimal"] .bk-media .type-dot, body[data-card-style="minimal"] .bk-tools { top: 10px; inset-inline-end: 10px; }
body[data-card-style="minimal"] .bk-tools { top: 50px; }
body[data-card-style="minimal"] .bk-badges { top: 10px; inset-inline-start: 10px; }
body[data-card-style="minimal"] .bk-out { inset-inline: 0; }
body[data-card-style="minimal"] .bk-body { padding: 14px 2px 0; }

/* صفّ الكتب المنزلق */
.track-wrap { position: relative; }
.bk-track { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 1px) / var(--per)); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.bk-track::-webkit-scrollbar { display: none; }
.bk-track > .bk { scroll-snap-align: start; }
body[data-card-style="framed"] .bk-track, body[data-card-style="minimal"] .bk-track { grid-auto-columns: calc((100% - (var(--per) - 1) * 20px) / var(--per)); }
.track-btn {
	position: absolute; top: 38%; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
	background: #fff; display: grid; place-items: center; box-shadow: var(--shadow);
}
.track-btn.prev { inset-inline-start: -22px; }
.track-btn.next { inset-inline-end: -22px; }
.track-btn:disabled { opacity: 0; pointer-events: none; }

/* ── البانرات العريضة */
.wide-banner { position: relative; min-height: 420px; border-radius: 6px; overflow: hidden; display: flex; align-items: center; background: var(--soft); }
.wide-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.wide-banner-text { position: relative; max-width: 470px; padding: 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.wide-banner-title { font-size: clamp(32px, 3.6vw, 52px); font-weight: 800; line-height: 1.2; letter-spacing: -.4px; }
.wide-banner p { font-size: 17px; }
.wide-banner.tall { min-height: 520px; align-items: flex-start; }
.wide-banner.center .wide-banner-text { max-width: 640px; margin-inline: auto; align-items: center; text-align: center; padding-top: 70px; }
.wide-banner.center > img { object-position: center bottom; }

/* ── شريط الثقة */
.trust { padding-block: 64px 40px; }
.trust-list { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 44px; }
.trust-list li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 34px; }
.trust-list li + li { border-inline-start: 1px solid var(--line); }
.trust-list h3 { font-size: 18px; font-weight: 800; margin-top: 6px; }
.trust-list p { font-size: 14px; color: var(--muted); max-width: 280px; }
body[data-show-trust-bar="false"] .trust { display: none; }

/* ── آراء القرّاء */
.quote-mark { display: inline-block; width: 34px; height: 24px; margin-inline-end: 12px; vertical-align: -2px; background: linear-gradient(105deg, transparent 8%, var(--store-primary) 8% 40%, transparent 40% 58%, var(--store-primary) 58% 90%, transparent 90%); }
.store-rate { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 14px; color: var(--muted); }
.store-rate b { color: var(--ink); font-size: 16px; }
.rv-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: start; }
.rv { display: flex; flex-direction: column; gap: 14px; padding: 26px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.rv-text { font-size: 15px; line-height: 1.85; }
.rv-foot { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
.rv-av { grid-row: span 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--store-accent); color: var(--store-text); font-weight: 800; }
.rv-foot b { font-size: 15px; }
.rv-foot small { font-size: 13px; color: var(--muted); }
.rv-book { grid-column: 1 / -1; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.rv-book span { color: var(--ink); font-weight: 700; }
body[data-show-reviews="false"] .reviews { display: none; }

/* ── المقالات */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.post-media { display: block; aspect-ratio: 600 / 760; border-radius: 6px; overflow: hidden; background: var(--store-accent); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post:hover .post-media img { transform: scale(1.04); }
.post-body { padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.post-date { font-size: 13px; color: var(--muted); }
.post-title { font-size: 20px; font-weight: 800; line-height: 1.45; }
.post-title a:hover { color: var(--store-primary-dark); }
.post-excerpt { font-size: 15px; color: var(--muted); }

/* ── المؤلّفون */
.au-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.au { text-align: center; }
.au-photo { display: block; aspect-ratio: 1; border-radius: 50% 50% 6px 6px; overflow: hidden; background: var(--store-accent); margin-bottom: 14px; }
.au-photo img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.15); transition: transform .6s var(--ease); }
.au:hover .au-photo img { transform: scale(1.05); }
.au h3 { font-size: 17px; font-weight: 800; }
.au-count { font-size: 14px; color: var(--muted); }

/* ── الأسئلة الشائعة */
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 60px; align-items: start; }
.faq-side { position: sticky; top: calc(var(--hdr-h) + 24px); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 17px; font-weight: 700; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 400; transition: transform .25s; }
.faq-item[open] summary::after { content: "−"; background: var(--store-primary); border-color: var(--store-primary); }
.faq-item p { padding-bottom: 22px; color: var(--muted); max-width: 640px; }

/* ── النشرة */
.newsletter { position: relative; overflow: hidden; background: #9C6B55; }
.newsletter-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.newsletter::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(48, 30, 22, .5) 0%, rgba(48, 30, 22, .3) 45%, rgba(48, 30, 22, 0) 70%); }
.newsletter-inner { position: relative; z-index: 1; padding-block: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.newsletter-title { max-width: 560px; color: #fff; font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.3; }
.newsletter-field { display: flex; gap: 10px; width: 100%; max-width: 520px; }
.newsletter-field .field { border-color: transparent; }
.newsletter-field .btn { flex: none; }
.newsletter-offer { color: #fff; font-size: 15px; }
body[data-show-newsletter="false"] .newsletter { display: none; }

/* ==========================================================================
   التذييل
   ========================================================================== */
.site-footer { background: var(--foot); color: var(--foot-text); padding-top: 64px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1.5fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 46px; }
.site-footer .brand-name { color: #fff; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-inline-end: 28px; border-inline-end: 1px solid #484848; }
.foot-about { line-height: 1.8; }
.foot-line { display: flex; gap: 8px; align-items: flex-start; }
.foot-line .icon { width: 18px; height: 18px; margin-top: 4px; }
.social { display: flex; gap: 6px; }
.social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.social a:hover { background: #444; }
.social .icon { width: 19px; height: 19px; }
.foot-h { color: #fff; font-size: 17px; font-weight: 800; margin-bottom: 18px; }
.foot-phone { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-size: clamp(22px, 2vw, 28px); font-weight: 800; }
.foot-phone .icon { width: 28px; height: 28px; color: var(--store-primary); }
.foot-hours { margin-top: 10px; padding-bottom: 18px; border-bottom: 1px solid #484848; }
.foot-mail { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; color: #fff; font-weight: 700; }
.foot-mail .icon { width: 18px; height: 18px; }
.foot-col li + li { margin-top: 10px; }
.foot-col a:hover, .foot-about a:hover { color: #fff; text-decoration: underline; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 24px; border-top: 1px solid #484848; font-size: 14px; }
.pay { display: flex; gap: 8px; flex-wrap: wrap; }
.pay li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px; background: #fff; color: var(--store-text); font-size: 12px; font-weight: 700; }
.pay .icon { width: 17px; height: 17px; }

/* ==========================================================================
   الصفحات الداخليّة
   ========================================================================== */
.page-hero { background: var(--store-accent); }
.page-hero-inner { display: grid; grid-template-columns: 1fr 260px; align-items: center; gap: 40px; }
.page-hero-text { padding-block: 44px; display: flex; flex-direction: column; gap: 12px; }
.page-hero .crumbs, .page-hero .page-sub { color: #554D46; }
.page-hero-img { width: 260px; height: 220px; object-fit: cover; object-position: center 80%; align-self: end; border-radius: 120px 120px 0 0; }
.page-hero-soft { background: var(--soft); }
.page-title { font-size: clamp(32px, 4vw, 54px); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.page-sub { color: var(--muted); max-width: 620px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips a { display: inline-block; padding: 7px 16px; border-radius: var(--pill); background: #fff; font-size: 14px; font-weight: 700; }
.chips a:hover { background: var(--store-text); color: #fff; }

.cat-mini-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 16px) / 5); gap: 16px; overflow-x: auto; scrollbar-width: none; }
.cat-mini-row::-webkit-scrollbar { display: none; }
.cat-mini { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--store-accent); }
.cat-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 85%; }
.cat-mini::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(38, 28, 20, .66), rgba(38, 28, 20, .2) 70%); }
.cat-mini-text { position: absolute; z-index: 2; inset: 0 0 auto; padding: 16px 18px; color: #fff; display: flex; flex-direction: column; font-weight: 800; font-size: 17px; line-height: 1.35; }
.cat-mini-text small { font-weight: 400; font-size: 13px; }

.listing-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.filters { display: flex; flex-direction: column; gap: 4px; position: sticky; top: calc(var(--hdr-h) + 18px); }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h2 { font-size: 20px; font-weight: 800; }
.filters-head .icon-btn { display: none; }
.filter { padding-block: 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.filter legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--store-text); margin: 0; }
.check small { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.check .rating { margin-inline-end: 4px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price-range label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.price-range .field { min-height: 42px; padding-inline: 14px; color: var(--ink); }
.filters-backdrop { display: none; }
.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.filters-open { display: none; }
.toolbar-count { color: var(--muted); font-size: 15px; }
.sort { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; font-size: 14px; color: var(--muted); }
.sort .field { width: auto; min-height: 42px; color: var(--ink); }
.bk-grid-listing { --per: 4; }
body[data-books-per-row="3"] .bk-grid-listing { --per: 3; }

.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; }
.pg { min-width: 44px; height: 44px; padding: 0 10px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-weight: 700; }
.pg:hover { border-color: var(--store-text); }
.pg.is-on { background: var(--store-text); border-color: var(--store-text); color: #fff; }
.pg .icon { width: 18px; height: 18px; }
.pg-gap { color: var(--muted); }

/* صفحة الكتاب */
.pdp-crumbs { padding-block: 22px 8px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 40px; }
.pdp-gallery { display: flex; flex-direction: column; gap: 14px; }
.pdp-stage { position: relative; display: grid; place-items: center; padding: 56px 40px; border-radius: 6px; background: var(--store-accent); min-height: 520px; }
.pdp-stage img { width: min(300px, 70%); box-shadow: 18px 22px 40px rgba(70, 48, 30, .28); border-radius: 3px; }
.pdp-stage .type-dot { position: absolute; top: 20px; inset-inline-end: 20px; width: 40px; height: 40px; }
.pdp-stage .type-dot .icon { width: 20px; height: 20px; }
.thumbs { display: flex; gap: 12px; }
.thumb { width: 78px; padding: 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--soft); }
.thumb.is-on { border-color: var(--store-text); }
.pdp-info { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 10px; }
.pdp-kind { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.pdp-kind .type-dot { width: 26px; height: 26px; box-shadow: none; }
.pdp-kind .type-dot .icon { width: 14px; height: 14px; }
.pdp-title { font-size: clamp(34px, 4vw, 56px); font-weight: 800; line-height: 1.15; letter-spacing: -.5px; }
.pdp-by { font-size: 17px; color: var(--muted); }
.pdp-by a { color: var(--ink); font-weight: 700; border-bottom: 1px solid currentColor; }
.pdp-rate { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.pdp-rate .star { width: 18px; height: 18px; }
.pdp-price { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; font-size: clamp(34px, 3.4vw, 46px); font-weight: 800; line-height: 1.2; }
.pdp-price del { font-size: 20px; font-weight: 400; color: var(--muted); }
.pdp-stock { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.stock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--new); }
.pdp-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--line); width: 100%; }
.pdp-buy .btn-primary { flex: 1 1 220px; }
.pdp-more { display: flex; flex-wrap: wrap; gap: 12px; }
.pdp-perks { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.pdp-perks li { display: inline-flex; align-items: center; gap: 6px; }

.qty { display: inline-flex; align-items: center; height: 54px; border: 1px solid var(--line); border-radius: var(--pill); padding: 0 6px; }
.qty button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center; }
.qty button:hover { background: var(--soft); }
.qty input { width: 42px; text-align: center; border: 0; background: none; font-weight: 800; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.facts-wrap { padding-block: 10px 30px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 34px; border-block: 1px solid var(--line); }
.facts li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 4px 18px; }
.facts li + li { border-inline-start: 1px solid var(--line); }
.facts .icon-thin { width: 40px; height: 40px; margin-bottom: 6px; }
.facts small { font-size: 13px; color: var(--muted); }
.facts b { font-size: 16px; }

.pdp-details { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; padding-block: 40px; }
.block-title { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.prose p + p { margin-top: 14px; }
.prose { font-size: 17px; line-height: 1.95; }
.spec { border-radius: 6px; background: var(--soft); padding: 10px 26px; align-self: start; }
.spec div { display: flex; justify-content: space-between; gap: 16px; padding-block: 14px; }
.spec div + div { border-top: 1px solid var(--line); }
.spec dt { color: var(--muted); }
.spec dd { font-weight: 700; text-align: end; }

.pdp-reviews { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; padding-block: 40px 70px; align-items: start; }
.rv-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; position: sticky; top: calc(var(--hdr-h) + 20px); }
.rv-score { display: flex; align-items: center; gap: 12px; }
.rv-score b { font-size: 56px; font-weight: 800; line-height: 1; }
.rv-score .star { width: 20px; height: 20px; }
.rv-total { color: var(--muted); margin-bottom: 10px; }
.rv-col { display: flex; flex-direction: column; gap: 24px; }
.rv-list { display: grid; gap: 16px; }
.rv-form { padding: 28px; border-radius: 6px; background: var(--soft); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.rv-form h3 { font-size: 20px; font-weight: 800; }
.rv-form p { color: var(--muted); font-size: 15px; }
.rv-form .field { background: #fff; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input legend { font-weight: 700; margin-bottom: 4px; float: right; width: 100%; padding: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; }
.star-input .star { width: 28px; height: 28px; fill: #DDD6CC; }
.star-input input:checked ~ label .star, .star-input label:hover .star, .star-input label:hover ~ label .star { fill: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary-dark); border-radius: 4px; }

/* شاهدتَه مؤخّرًا */
.mini-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.mini { display: flex; flex-direction: column; gap: 10px; }
.mini-cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: #fff; }
.mini-cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-cover .type-dot { position: absolute; top: 8px; inset-inline-end: 8px; width: 28px; height: 28px; }
.mini-cover .type-dot .icon { width: 15px; height: 15px; }
.mini-body { display: flex; flex-direction: column; gap: 2px; }
.mini h3 { font-size: 14px; font-weight: 700; line-height: 1.5; }
.mini .bk-price { font-size: 15px; margin-top: 2px; }

/* المؤلّف */
.author-hero { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 56px; align-items: center; padding: 44px; margin-bottom: 10px; border-radius: 6px; background: var(--store-accent); }
.author-photo { aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-text { display: flex; flex-direction: column; gap: 16px; }
.eyebrow { font-weight: 700; font-size: 14px; color: #554D46; }
.author-bio { font-size: 18px; line-height: 1.9; max-width: 640px; }
.author-stats { display: flex; flex-wrap: wrap; gap: 14px; }
.author-stats li { display: flex; flex-direction: column; padding: 12px 20px; border-radius: 6px; background: #fff; }
.author-stats b { font-size: 18px; font-weight: 800; }
.author-stats span { font-size: 13px; color: var(--muted); }

/* السلّة */
.cart-page { padding-bottom: 70px; }
.cart-page .page-title { margin-bottom: 28px; font-size: clamp(30px, 3.4vw, 44px); }
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: start; font-size: 14px; color: var(--muted); font-weight: 700; padding: 0 12px 14px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 20px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.c-item { display: flex; align-items: center; gap: 16px; }
.c-cover { flex: none; width: 76px; border-radius: 3px; overflow: hidden; background: var(--soft); }
.c-info { display: flex; flex-direction: column; gap: 2px; }
.c-title { font-weight: 800; font-size: 16px; }
.c-author { font-size: 13px; color: var(--muted); }
.c-type { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 4px; }
.c-type .type-dot { width: 22px; height: 22px; box-shadow: none; }
.c-type .type-dot .icon { width: 12px; height: 12px; }
.c-price { white-space: nowrap; font-weight: 700; }
.c-price del { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.c-total { font-weight: 800; white-space: nowrap; }
.c-qty .qty { height: 46px; }
.cart-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 22px; }
.coupon { display: flex; gap: 8px; flex: 1 1 300px; max-width: 420px; }
.coupon .btn { flex: none; }
.coupon-on { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.summary { padding: 30px; border-radius: 6px; background: var(--soft); display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--hdr-h) + 20px); }
.summary h2 { font-size: 22px; font-weight: 800; }
.summary dl div { display: flex; justify-content: space-between; padding-block: 10px; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--muted); }
.summary dd { font-weight: 700; }
.summary .sum-total { border-bottom: 0; padding-top: 16px; font-size: 20px; }
.summary .sum-total dt { color: var(--ink); font-weight: 800; }
.summary .sum-total dd { font-weight: 800; }
.cart-empty { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* 404 */
.nf { position: relative; overflow: hidden; background: #8A6A55; }
.nf-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nf::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(40, 28, 20, .62), rgba(40, 28, 20, .38) 60%, rgba(40, 28, 20, .2)); }
.nf-inner { position: relative; z-index: 1; padding-block: 90px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; color: #fff; }
.nf-code { font-size: clamp(90px, 13vw, 180px); font-weight: 800; line-height: .9; letter-spacing: -4px; }
.nf-title { font-size: clamp(26px, 3vw, 40px); font-weight: 800; }
.nf-text { max-width: 520px; font-size: 17px; }
.nf-search { display: flex; gap: 10px; width: 100%; max-width: 520px; }
.nf-search .field { border-color: transparent; color: var(--ink); }
.nf-search .btn { flex: none; }

/* المقال */
.article { padding-bottom: 60px; }
.article-media { margin-bottom: 40px; }
.article-media img { width: 100%; aspect-ratio: 1400 / 560; object-fit: cover; border-radius: 6px; }
.article-col { max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.article-title { font-size: clamp(32px, 3.8vw, 50px); font-weight: 800; line-height: 1.2; letter-spacing: -.4px; }
.article-lead { font-size: 20px; line-height: 1.8; color: #4A4541; }
.article-body { margin-block: 10px 20px; }
.article-body h2 { font-size: 24px; font-weight: 800; margin-top: 32px; margin-bottom: 8px; }
.article-body blockquote { margin-block: 24px; padding: 22px 26px; border-inline-start: 4px solid var(--store-primary); background: var(--soft); font-size: 20px; font-weight: 700; border-radius: 4px; }

/* صفحة المكوّنات */
.kit { padding-block: 40px 70px; }
.kit-sec { margin-top: 48px; }
.kit-h { font-size: 22px; font-weight: 800; padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.kit-note { color: var(--muted); margin-bottom: 18px; }
.kit-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.kit-card figcaption { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.kit-card .bk { border: 1px solid var(--line); height: calc(100% - 32px); }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.kit-dark { margin-top: 16px; padding: 24px; border-radius: 6px; background: #7B5E4A; }
.kit-type { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.kit-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.kit-hdr-demo { position: relative; height: 220px; border-radius: 6px; overflow: hidden; }
.kit-hdr-demo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kit-hdr-bar { position: relative; display: flex; align-items: center; gap: 32px; padding: 20px 28px; font-weight: 700; }
.kit-hdr-links { display: flex; gap: 22px; }
.kit-hdr-icons { display: flex; gap: 14px; margin-inline-start: auto; }

/* ظهورٌ هادئ عند التمرير */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   العروض الأصغر
   ========================================================================== */
@media (max-width: 1100px) {
	body[data-books-per-row] { --per: 4; }
	body[data-books-per-row="3"] { --per: 3; }
	.track-btn.prev { inset-inline-start: -14px; }
	.track-btn.next { inset-inline-end: -14px; }
	.hdr-nav { gap: 22px; margin-inline-start: 24px; }
	.foot-grid { grid-template-columns: 1fr 1fr 1fr; }
	.foot-brand { grid-column: 1 / -1; border: 0; padding: 0; }
	.au-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.au-grid > :nth-child(5) { display: none; }
	.rv-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mini-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.mini-row > :nth-child(n+5) { display: none; }
	.kit-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bk-grid-listing { --per: 3; }
}

@media (max-width: 920px) {
	:root { --hdr-h: 66px; --gutter: 20px; }
	body[data-books-per-row] { --per: 3; }
	.hdr { gap: 6px; }
	.hdr-menu { display: inline-grid; margin-inline-start: -10px; }
	.hdr-nav, .hide-m { display: none; }
	.hdr-icons { margin-inline-end: -10px; }
	.brand-name { font-size: 18px; }
	.brand img { width: 38px; height: 38px; }
	.section { padding-block: 52px; }
	.cat-tall-grid { gap: 14px; }
	.cat-tall-text { padding: 22px; }
	.wide-banner-text { padding: 36px; }
	.listing-grid { grid-template-columns: minmax(0, 1fr); }
	.filters-open { display: inline-flex; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100; width: min(340px, 88vw); padding: 18px 22px;
		background: #fff; overflow-y: auto; transform: translateX(105%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s;
	}
	.filters.is-open { transform: none; visibility: visible; }
	.filters-head .icon-btn { display: inline-grid; }
	.filters-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 90; background: rgba(30, 24, 20, .45); }
	.pdp, .pdp-details, .pdp-reviews { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.rv-summary { position: static; }
	.author-hero { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 28px; }
	.cart-grid { grid-template-columns: minmax(0, 1fr); }
	.summary { position: static; }
	.faq-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.faq-side { position: static; }
	.post-grid { gap: 18px; }
	.page-hero-inner { grid-template-columns: 1fr 180px; }
	.page-hero-img { width: 180px; height: 170px; }
}

@media (max-width: 640px) {
	body[data-books-per-row] { --per: 2; }
	.hero { height: 500px; }
	.slide > img { top: auto; height: 42%; object-position: 14% 72%; }
	.slide-text { justify-content: flex-start; align-items: center; text-align: center; gap: 12px; padding-top: calc(var(--hdr-h) + 24px); }
	.slide-title { font-size: 34px; }
	.slide-sub { font-size: 16px; }
	.hero-arrow { display: none; }
	.cat-tall-grid, .au-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74%; gap: 12px; 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); }
	.cat-tall-grid::-webkit-scrollbar, .au-grid::-webkit-scrollbar { display: none; }
	.cat-tall-grid > *, .au-grid > * { scroll-snap-align: start; }
	.cat-tall { aspect-ratio: 1 / .84; }
	.cat-tall img { object-position: center 80%; }
	.au-grid { grid-auto-columns: 40%; }
	.bk-media { padding: 10px 10px 0; }
	.bk-media .type-dot { top: 18px; inset-inline-end: 18px; width: 28px; height: 28px; }
	.bk-media .type-dot .icon { width: 15px; height: 15px; }
	.bk-badges { top: 18px; inset-inline-start: 18px; }
	.bk-tools { top: 54px; inset-inline-end: 18px; }
	.bk-out { inset-inline: 10px; }
	.bk-add { min-height: 40px; gap: 6px; font-size: 13px; }
	.bk-add .icon { width: 16px; height: 16px; }
	.bk-body { padding: 12px 12px 16px; }
	.bk-price { flex-wrap: nowrap; font-size: 14px; gap: 6px; white-space: nowrap; }
	.bk-price del { font-size: 11px; }
	.bk-track { grid-auto-columns: calc((100% - 1px) / 2.15); }
	body[data-card-style="framed"] .bk-grid, body[data-card-style="minimal"] .bk-grid { gap: 14px; }
	body[data-card-style="framed"] .bk-track, body[data-card-style="minimal"] .bk-track { grid-auto-columns: calc((100% - 14px) / 2.15); }
	.track-btn { display: none; }
	.bk-grid:not(.bk-track) > [data-preview-copy]:nth-child(5):last-child { display: none; }
	.wide-banner { min-height: 0; flex-direction: column; align-items: stretch; }
	.wide-banner > img { position: relative; order: 2; height: 200px; }
	.wide-banner-text, .wide-banner.center .wide-banner-text { padding: 30px 22px 22px; max-width: none; }
	.wide-banner.tall { min-height: 0; }
	.wide-banner.center > img { height: 200px; }
	.trust { padding-block: 34px 10px; }
	.trust .sec-title { font-size: 22px; }
	.trust-list { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; gap: 10px; margin: 16px calc(-1 * var(--gutter)) 0; padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-list::-webkit-scrollbar { display: none; }
	.trust-list li, .trust-list li + li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; text-align: start; padding: 14px; border: 1px solid var(--line); border-radius: 6px; scroll-snap-align: start; }
	.trust-list .icon-thin { grid-row: span 2; width: 32px; height: 32px; }
	.trust-list h3 { margin: 0; font-size: 15px; }
	.trust-list p { font-size: 13px; }
	.rv-track { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.rv-track > .rv { scroll-snap-align: start; }
	.post-grid { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.post-grid > * { scroll-snap-align: start; }
	.post-grid-3 { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); overflow: visible; }
	.au-grid > :nth-child(5) { display: block; }
	.newsletter-inner { padding-block: 64px; }
	.newsletter::after { background: rgba(48, 30, 22, .45); }
	.newsletter-field { flex-direction: column; }
	.foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
	.foot-help { grid-column: 1 / -1; }
	.foot-bottom { flex-direction: column; align-items: flex-start; }
	.page-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.page-hero-img { display: none; }
	.page-hero-text { padding-block: 30px; }
	.cat-mini-row { grid-auto-columns: 46%; }
	.bk-grid-listing, body[data-books-per-row="3"] .bk-grid-listing { --per: 2; }
	.toolbar-count { order: 3; width: 100%; }
	.facts { grid-template-columns: 1fr 1fr; row-gap: 26px; }
	.facts li:nth-child(3) { border-inline-start: 0; }
	.pdp-stage { min-height: 380px; padding: 36px 24px; }
	.pdp-buy .btn-primary { flex-basis: 100%; order: 3; }
	.pdp-more .btn { flex: 1 1 auto; }
	.author-hero { grid-template-columns: minmax(0, 1fr); padding: 22px; }
	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; }
	.cart-row { position: relative; display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); }
	.cart-table td { padding: 0; border: 0; }
	.cart-table .c-item { display: flex; grid-column: 1 / -1; padding-inline-end: 44px; }
	.c-price::before, .c-total::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
	.c-qty { grid-column: 1 / -1; }
	.c-remove { position: absolute; top: 14px; inset-inline-end: 0; }
	.mini-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
	.mini-row > :nth-child(n+4) { display: none; }
	.kit-cards, .kit-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kit-hdr-links { display: none; }
	.nf-search { flex-direction: column; }
	.sec-head { flex-wrap: wrap; }
}

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

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

/* ── تبويبات صفّ الكتب (القاعدة 16): كبسولاتٌ كأزرار القالب، والمختار داكن */
.row-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.row-tab { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 20px; border-radius: var(--pill); border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; transition: background .2s, border-color .2s, color .2s; }
.row-tab:hover { border-color: var(--store-text); }
.row-tab[aria-selected="true"] { background: var(--store-text); border-color: var(--store-text); color: #fff; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* ── شبكة الصفّين: تُعرض صفّان كاملان أيًّا كان عدد الكتب في الصفّ */
body[data-books-per-row="3"] .two-rows > :nth-child(n+7),
body[data-books-per-row="4"] .two-rows > :nth-child(n+9),
body[data-books-per-row="5"] .two-rows > :nth-child(n+11) { display: none; }

/* ── عرض الأسبوع: لوحٌ بيج بعرض الشاشة، وغلافٌ كبير، وعدّادٌ واحد */
.deal { background: var(--store-accent); }
.deal-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 2fr); gap: 56px; align-items: center; }
.deal-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.deal-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: var(--pill); background: #fff; font-size: 14px; font-weight: 800; }
.deal-kicker .icon { color: var(--store-primary-dark); }
.deal .sec-sub, .deal-author, .deal-price del, .deal .bk-count { color: #554D46; }
.countdown { display: flex; gap: 10px; margin-top: 8px; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 72px; padding: 12px 8px 10px; border-radius: 6px; background: #fff; }
.cd-unit b { font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: var(--muted); }
.deal-book { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.deal-stage { position: relative; display: grid; place-items: center; padding: 40px; border-radius: 6px; background: color-mix(in srgb, var(--store-accent) 45%, #fff); }
.deal-cover { display: block; width: min(250px, 80%); }
.deal-cover img { border-radius: 3px; box-shadow: 18px 22px 40px rgba(70, 48, 30, .28); }
.deal-stage .type-dot { position: absolute; top: 16px; inset-inline-end: 16px; }
.deal-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.deal-title { font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.2; letter-spacing: -.3px; }
.deal-title a:hover { color: var(--store-primary-dark); }
.deal-author { font-size: 16px; }
.deal-price { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 32px; font-weight: 800; line-height: 1.3; }
.deal-price del { font-size: 18px; font-weight: 400; }
.deal-desc { max-width: 460px; margin-top: 4px; font-size: 15px; color: #4A4541; }
.deal-desc p + p { margin-top: 6px; }
.deal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 12px; }
.deal-actions .icon-ring { background: #fff; border-color: transparent; }

/* ── اختيار الصيغة في صفحة الكتاب: كبسولاتٌ بدائرة النوع، وتُخفى إن لم تكن غير صيغةٍ واحدة */
.formats-box { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.formats-label { font-size: 14px; font-weight: 700; color: var(--muted); }
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format-opt { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; padding: 7px 20px 7px 8px; border: 1px solid var(--line); border-radius: var(--pill); background: #fff; transition: border-color .2s; }
.format-opt .type-dot { grid-row: span 2; width: 32px; height: 32px; box-shadow: none; }
.format-opt .type-dot .icon { width: 16px; height: 16px; }
.format-name { font-size: 14px; font-weight: 800; line-height: 1.3; }
.format-price { font-size: 13px; color: var(--muted); line-height: 1.3; }
.format-opt:hover { border-color: var(--store-text); }
.format-opt.is-current { 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; }

/* ── صندوق التوصيل والدفع في صفحة الكتاب */
.pdp-info-box { width: 100%; display: grid; gap: 10px; margin-top: 6px; padding: 16px 20px; border-radius: 6px; background: var(--soft); font-size: 14px; line-height: 1.7; }
.pdp-info-box li { display: flex; align-items: flex-start; gap: 10px; }
.pdp-info-box .icon { margin-top: 2px; color: var(--store-primary-dark); }
.pdp-info-box b { margin-inline-end: 4px; }

/* ── قائمة التصنيف: التصفية الحاليّة، والتبديل بين الشبكة والقائمة */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 20px; font-size: 14px; }
.af-label { color: var(--muted); }
.af-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px 4px 14px; border-radius: var(--pill); background: var(--store-accent); font-weight: 700; }
.af-chip .icon { width: 15px; height: 15px; }
.af-chip:hover { background: var(--store-text); color: #fff; }
.af-clear { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.view-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); }
.view-switch button { width: 38px; height: 36px; border: 0; border-radius: var(--pill); background: none; display: grid; place-items: center; color: var(--muted); }
.view-switch button[aria-pressed="true"] { background: var(--store-text); color: #fff; }
.bk-grid-listing.is-list { grid-template-columns: minmax(0, 1fr); }
.bk-grid-listing.is-list > .bk { flex-direction: row; align-items: center; }
.bk-grid-listing.is-list .bk-media { flex: none; width: 190px; padding-bottom: 18px; }
.bk-grid-listing.is-list .bk-body { padding: 18px 10px 18px 24px; gap: 6px; }
.bk-grid-listing.is-list .bk-title { font-size: 18px; }
.bk-grid-listing.is-list .bk-price { margin-top: 6px; }

@media (max-width: 1100px) {
	body[data-books-per-row] .two-rows > :nth-child(n+9) { display: none; }
	.wide-banner.tall { min-height: 430px; }
	.deal-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
	.deal-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 30px; row-gap: 8px; align-items: end; }
	.deal-head > :not(.countdown) { grid-column: 1; }
	.deal-head .countdown { grid-column: 2; grid-row: 1 / span 3; }
	.deal-head .deal-kicker { justify-self: start; }
}
@media (max-width: 920px) {
	body[data-books-per-row] .two-rows > :nth-child(n+7) { display: none; }
	.deal-book { gap: 28px; }
}
@media (max-width: 640px) {
	body[data-books-per-row] .two-rows > :nth-child(n+5) { display: none; }
	.row-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tab { flex: none; }
	.deal-head { display: flex; }
	.countdown { width: 100%; gap: 8px; }
	.cd-unit { flex: 1; min-width: 0; padding: 10px 4px 8px; }
	.cd-unit b { font-size: 24px; }
	.deal-book { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	.deal-stage { padding: 22px; }
	.deal-cover { width: 150px; }
	.deal-price { font-size: 28px; }
	.view-switch { display: none; }
	.active-filters { margin-top: -8px; }
	.bk-grid-listing.is-list .bk-media { width: 120px; padding-bottom: 10px; }
	.bk-grid-listing.is-list .bk-body { padding: 12px 6px 12px 14px; }
	.bk-grid-listing.is-list .bk-title { font-size: 15px; }
}

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