/* ==================================================================
   كثبان (kuthban) — قالب متجر كتب لمنصّة «ناشر»
   واجهةٌ داخل إطارٍ مستدير الركن، وشريطٌ كحليّ في وسط الصفحة،
   وعناوين في البداية تنتهي بنقطةٍ بلون المتجر.
   ألوان الهويّة متغيّراتٌ يختارها الناشر؛ وما سواها ألوانٌ محايدة.
   ================================================================== */

:root {
	--store-primary: #B4552D;
	--store-primary-dark: #8A3E1F;
	--store-accent: #212E47;
	--store-bg: #FFFCF7;
	--store-text: #221C16;

	/* محايدة */
	--white: #FFFFFF;
	--muted: #5F574F;
	--line: #E8E1D6;
	--soft: #F5F2EC;
	--footer: #F4F0EA;
	--footer-2: #ECE6DD;
	--gold: #F2A531;
	--gold-soft: #FFF1D6;
	--shadow: 0 6px 22px rgba(34, 28, 22, .07);
	--shadow-lg: 0 18px 44px rgba(34, 28, 22, .12);
	--radius: 16px;
	--frame-gap: clamp(12px, 2.2vw, 32px);
	--bpr: 4;

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

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

/* ------------------------------------------------------------------ أساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: "Tajawal", system-ui, sans-serif;
	font-size: 15.5px;
	line-height: 1.7;
	color: var(--store-text);
	background: var(--store-bg);
}
main { 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 { line-height: 1.35; }
ul, ol { padding: 0; }
.container { width: 100%; max-width: 1288px; margin-inline: auto; padding-inline: 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.skip-link { position: absolute; top: -48px; inset-inline-start: 12px; z-index: 100; background: var(--store-accent); color: var(--white); padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { top: 10px; }
:focus-visible { outline: 3px solid var(--store-primary); outline-offset: 2px; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }

/* ------------------------------------------------------------------ أزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
	font-weight: 700; font-size: 15px; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--store-primary); color: var(--white); }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-dark { background: var(--store-accent); color: var(--white); }
.btn-dark:hover { background: var(--store-text); }
.btn-outline { background: var(--white); border-color: var(--line); color: var(--store-text); }
.btn-outline:hover { border-color: var(--store-text); }
.btn-light { background: var(--white); color: var(--store-text); }
.btn-light:hover { background: var(--soft); }
.icon-btn {
	position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px;
	border-radius: 50%; border: 0; background: transparent; color: var(--store-text);
}
.icon-btn:hover { background: var(--soft); }
.icon-btn[aria-pressed="true"] { color: var(--store-primary); }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.round-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white); color: var(--store-accent); box-shadow: var(--shadow); }
.round-btn:hover { background: var(--store-primary); color: var(--white); }
.round-btn-line { border: 1px solid var(--line); box-shadow: none; }
.circle-arrow { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--muted); flex: none; transition: background .2s, color .2s; }
.circle-arrow .icon { width: 17px; height: 17px; }
.circle-arrow-light { background: var(--white); color: var(--store-text); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; color: var(--muted); font-size: 14px; }
.link-btn:hover, .link-btn[aria-pressed="true"] { color: var(--store-primary-dark); }
.link-btn[aria-pressed="true"] .icon { fill: currentColor; }
.field { height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--white); color: var(--store-text); min-width: 0; }
textarea.field { height: auto; padding: 10px 14px; resize: vertical; width: 100%; }
.field:focus { border-color: var(--store-primary); outline: none; }

/* ------------------------------------------------------------------ الرأس */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 24px; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand-name { font-weight: 800; font-size: 21px; color: var(--store-text); }
.main-nav { margin-inline-start: 12px; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; }
.main-nav > ul > li > a, .main-nav .has-drop > button {
	position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border: 0; background: none;
	font-weight: 500; font-size: 15px; color: var(--store-text); border-radius: 10px;
}
.main-nav .has-drop > button .icon { width: 16px; height: 16px; }
.main-nav > ul > li > a:hover, .main-nav .has-drop > button:hover { color: var(--store-primary-dark); }
.main-nav a.is-current { color: var(--store-primary-dark); font-weight: 700; }
.main-nav a.is-current::after { content: ""; position: absolute; bottom: 2px; inset-inline-start: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--store-primary); box-shadow: 9px 0 0 var(--store-primary), -9px 0 0 var(--store-primary); transform: translateX(50%); }
.has-drop { position: relative; }
.drop {
	position: absolute; top: calc(100% + 6px); inset-inline-start: 0; min-width: 220px; padding: 8px; background: var(--white);
	border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.drop ul { list-style: none; margin: 0; }
.drop a { display: block; padding: 8px 12px; border-radius: 9px; font-size: 14.5px; }
.drop a:hover { background: var(--soft); color: var(--store-primary-dark); }
.has-drop:hover .drop, .has-drop.open .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.count-badge { position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--store-primary); color: var(--white); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.header-cta { margin-inline-start: 8px; }
.menu-toggle { display: none; }
.header-search { display: none; border-top: 1px solid var(--line); }
.search-open .header-search { display: block; }
.hs-in { display: flex; gap: 10px; padding-block: 12px; }
.hs-in .field { flex: 1; }

/* الدرج */
.drawer-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(20, 16, 12, .45); opacity: 0; visibility: hidden; transition: .25s; }
.drawer-open .drawer-backdrop:not(.filters-backdrop), .filters-open .filters-backdrop { opacity: 1; visibility: visible; }
.drawer {
	position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 70; width: min(340px, 86vw); padding: 18px; overflow-y: auto;
	background: var(--white); transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-search { display: flex; gap: 6px; margin-bottom: 14px; }
.drawer-search .field { flex: 1; }
.drawer-nav { list-style: none; margin: 0; }
.drawer-nav > li > a, .drawer-label { display: block; padding: 10px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer-label { color: var(--muted); font-size: 13.5px; border: 0; padding-bottom: 4px; }
.drawer-cats { list-style: none; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-cats a { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--soft); font-size: 14px; }
.drawer-contact { display: grid; gap: 10px; margin-top: 18px; font-size: 14.5px; }
.drawer-contact a { display: flex; align-items: center; gap: 8px; }

/* ------------------------------------------------------------------ عناوين الأقسام */
.section { padding-block: 72px; }
.section-soft { background: var(--soft); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--store-primary); flex: none; }
.sec-title { margin: 0; font-size: 31px; font-weight: 800; }
.sec-title::after, .pb-title::after, .pdp-title::after, .box-title::after, .ah-name::after, .cat-hero-title::after {
	content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-start: 5px; border-radius: 50%; background: var(--store-primary); vertical-align: baseline;
}
.sec-head-light .sec-title, .sec-head-light .eyebrow, .eyebrow-light { color: var(--white); }
.sec-head-light .eyebrow::before, .eyebrow-light::before { background: var(--white); }

/* أعمدة زخرفيّة صغيرة بلونَي المتجر */
.deco-wrap { position: relative; }
.deco-bars { position: absolute; display: none; align-items: flex-end; gap: 4px; pointer-events: none; }
.deco-bars i { display: block; width: 10px; border-radius: 3px; }
.deco-bars i:first-child { height: 50px; background: var(--store-primary); }
.deco-bars i:last-child { height: 32px; background: var(--store-accent); }
.deco-start { top: -14px; inset-inline-start: -30px; }
.deco-end { bottom: 40px; inset-inline-end: -30px; }
.deco-end i:last-child { background: var(--white); }
.deco-story { top: -64px; inset-inline-start: 0; display: flex; }
.deco-nl { top: -20px; inset-inline-end: 40px; display: flex; }
.deco-nl i:last-child { background: var(--store-accent); }
@media (min-width: 1360px) { .deco-start, .deco-end { display: flex; } }

/* ------------------------------------------------------------------ الواجهة */
.hero { position: relative; }
.hero-frame {
	position: relative; margin-inline-end: var(--frame-gap); height: clamp(470px, 43vw, 620px);
	border-end-end-radius: 34px; overflow: hidden; background: var(--store-accent);
}
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.slide.is-active, [data-slider]:not(.slider-ready) .slide:first-child { opacity: 1; visibility: visible; }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(20, 14, 10, .78) 0%, rgba(20, 14, 10, .45) 45%, rgba(20, 14, 10, .05) 80%); }
.hero .slide-body { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-bottom: 90px; }
.slide-title { margin: 0 0 12px; max-width: 620px; color: var(--white); font-size: clamp(28px, 3.4vw, 46px); font-weight: 800; line-height: 1.3; }
.slide-text { margin: 0 0 24px; max-width: 520px; color: var(--white); font-size: 17px; }
.hero-thumbs { position: absolute; z-index: 2; top: 50%; inset-inline-end: 44px; display: flex; flex-direction: column; gap: 12px; transform: translateY(-62%); }
.hero-thumbs button { width: 176px; height: 100px; padding: 0; border: 3px solid rgba(255, 255, 255, .7); border-radius: 18px; overflow: hidden; background: var(--store-accent); opacity: .82; transition: .25s; }
.hero-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--white); transform: translateX(-8px); }
.hero-thumbs button:hover { opacity: 1; }

/* بطاقة البحث المتراكبة (تبقى سليمةً إن أُخفيت الواجهة) */
.hero-search { position: relative; z-index: 3; margin-top: 32px; }
.hero + .hero-search { margin-top: -78px; }
.search-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px 18px; box-shadow: var(--shadow-lg); }
.sc-title { margin: 0 0 10px; font-weight: 700; font-size: 16px; }
.sc-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; border: 1px solid var(--line); border-radius: 14px; }
.sc-box { padding: 10px 16px; border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.sc-box:first-child { border-inline-start: 0; }
.sc-box label { color: var(--muted); font-size: 13px; }
.sc-box input, .sc-box select { width: 100%; border: 0; padding: 2px 0; background: transparent; font-size: 17px; font-weight: 700; color: var(--store-text); outline: none; }
.sc-btn { margin: 7px; min-height: 60px; border-radius: 12px; padding: 0 30px; }

/* ------------------------------------------------------------------ التصنيفات */
.cat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.cat-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-card:hover .circle-arrow { background: var(--store-primary); color: var(--white); }
.cat-media { position: relative; display: block; aspect-ratio: 5 / 3; background: var(--store-accent); }
.cat-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-icon { position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); }
.cat-icon .icon { width: 42px; height: 42px; stroke-width: 1.5; }
.cat-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.cat-body b { display: block; font-size: 17px; }
.cat-body small { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------ شريط الثقة المتحرّك */
.marquee { overflow: hidden; background: var(--store-primary-dark); color: var(--white); padding-block: 17px; }
.mq-track { display: flex; width: max-content; animation: mq 46s linear infinite; }
.mq-list { display: flex; align-items: center; gap: 26px; margin: 0; padding-inline-end: 26px; list-style: none; flex: none; }
.mq-list li { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 19px; font-weight: 700; }
.mq-star .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.marquee:hover .mq-track { animation-play-state: paused; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .mq-track { animation: none; } .slide { transition: none; } }
[data-show-trust-bar="false"] .trust-section { display: none; }

/* ------------------------------------------------------------------ بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--bpr), minmax(0, 1fr)); gap: 24px; }
.book-card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.bc-media { position: relative; aspect-ratio: 1 / 1.08; background: linear-gradient(160deg, color-mix(in srgb, var(--store-primary) 12%, var(--white)), var(--soft) 70%); }
.bc-cover { position: absolute; inset-block: 20px; inset-inline-start: 50%; aspect-ratio: 2 / 3; transform: translateX(50%); }
.bc-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; box-shadow: 0 10px 22px rgba(34, 28, 22, .25); transition: transform .3s; }
.book-card:hover .bc-cover img { transform: scale(1.03); }
.badge { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 700; color: var(--white); background: var(--store-accent); }
.badge .icon { width: 14px; height: 14px; }
.badge-sale { background: var(--store-primary); }
.bc-wish { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--white); color: var(--store-text); box-shadow: var(--shadow); }
.bc-wish .icon { width: 18px; height: 18px; }
.bc-wish:hover, .bc-wish[aria-pressed="true"] { color: var(--store-primary); }
.bc-wish[aria-pressed="true"] .icon { fill: currentColor; }
.type-dot { position: absolute; bottom: 12px; inset-inline-start: 12px; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--white); border: 2px solid var(--white); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.type-dot .icon { width: 15px; height: 15px; }
.type-dot[data-type="print"], .type-mini[data-type="print"] { background: var(--type-print); }
.type-dot[data-type="ebook"], .type-mini[data-type="ebook"] { background: var(--type-ebook); }
.type-dot[data-type="audio"], .type-mini[data-type="audio"] { background: var(--type-audio); }
.type-dot[data-type="educational"], .type-mini[data-type="educational"] { background: var(--type-educational); }
.stock-band { position: absolute; inset-inline: 0; top: 50%; z-index: 1; transform: translateY(-50%); padding: 7px; text-align: center; font-weight: 700; font-size: 14px; color: var(--white); background: rgba(34, 28, 22, .86); }
.is-out .bc-cover img { opacity: .55; filter: grayscale(.6); }
.bc-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 14px 16px 16px; }
.rate { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.rate-chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 6px; background: var(--gold-soft); font-weight: 700; color: var(--store-text); }
.rate-chip .icon { width: 13px; height: 13px; color: var(--gold); }
.rate-count { color: var(--muted); }
.book-title { margin: 0; font-size: 17px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-title a:hover { color: var(--store-primary-dark); }
.book-author { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 14px; }
.book-author .icon { width: 15px; height: 15px; }
.bc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.bc-foot .bc-add { margin-block: -6px; }
.bc-body .book-author { line-height: 1.45; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; color: var(--store-primary-dark); font-weight: 800; font-size: 17.5px; }
.price del { color: var(--muted); font-weight: 400; font-size: 13.5px; }
.price-lg { font-size: 30px; }
.price-lg del { font-size: 17px; }
.bc-add { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--store-accent); color: var(--white); transition: background .2s; }
.bc-add:hover { background: var(--store-primary); }
.bc-add .icon { width: 19px; height: 19px; }
.bc-add:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.stars { display: inline-flex; gap: 1px; }
.stars .icon { width: 15px; height: 15px; fill: var(--gold); stroke: none; }
.stars .icon.off { fill: #DDD3C6; }
.rating { display: inline-flex; }

/* شكل البطاقة */
[data-card-style="framed"] .book-card { border: 2px solid var(--line); box-shadow: none; }
[data-card-style="framed"] .bc-media { background: var(--white); border-bottom: 2px solid var(--line); }
[data-card-style="minimal"] .book-card { background: transparent; border: 0; box-shadow: none; overflow: visible; }
[data-card-style="minimal"] .bc-media { border-radius: var(--radius); }
[data-card-style="minimal"] .bc-body { padding-inline: 2px; }
[data-card-style="minimal"] .bc-foot { border-top-style: dashed; }

/* بطاقة «شاهدتَه مؤخّرًا» */
.mini-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.mini-card { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.mc-cover { position: relative; flex: none; width: 70px; }
.mc-cover img { width: 70px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; }
.mc-cover .type-dot { width: 24px; height: 24px; bottom: -6px; inset-inline-start: -6px; }
.mc-cover .type-dot .icon { width: 12px; height: 12px; }
.mc-body { min-width: 0; display: grid; gap: 2px; }
.mc-body .book-title { font-size: 15px; -webkit-line-clamp: 1; }
.mc-body .book-author { font-size: 13px; }
.mc-body .price { font-size: 15px; }

/* ------------------------------------------------------------------ الشريط الكحليّ */
.navy-band { position: relative; background: var(--store-accent); padding-block: 80px; }
.navy-band:has(.authors-strip) { padding-bottom: 0; margin-bottom: 84px; }
.offers .container { position: relative; }
.offers-frame { position: relative; margin-bottom: 70px; }
.offers .slides { position: relative; display: grid; }
.offers .slide { position: relative; inset: auto; grid-area: 1 / 1; }
.offers .slide-img { position: relative; inset: auto; height: auto; aspect-ratio: 1300 / 520; border-radius: 24px; }
.offer-box {
	position: absolute; z-index: 1; bottom: -56px; inset-inline-start: 24%; inset-inline-end: 0;
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 24px;
	padding: 24px 30px; border: 7px solid var(--white); border-radius: 6px; background: var(--store-primary); color: var(--white);
}
.offer-box h3 { margin: 0; font-size: 24px; font-weight: 800; grid-column: 1; }
.offer-box p { margin: 0; font-size: 15px; grid-column: 1; }
.offer-box .btn { grid-column: 2; grid-row: 1 / span 2; }
.offers-tag { position: absolute; z-index: 2; top: 22px; inset-inline-start: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--store-accent); color: var(--white); font-weight: 700; font-size: 14px; }
.offers-tag .icon { width: 17px; height: 17px; }
.offers-arrows { position: absolute; z-index: 2; bottom: 24px; inset-inline-start: 24px; display: flex; gap: 8px; }
.authors-strip { padding-top: 24px; }
.author-row { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: -84px; }
.author-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); transition: transform .25s; }
.author-card:hover { transform: translateY(-4px); }
.ac-top { display: flex; align-items: center; gap: 14px; }
.ac-top img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; }
.ac-top b { display: block; font-size: 17px; }
.ac-top small { color: var(--muted); font-size: 14px; }
.ac-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ac-tag { display: inline-block; padding: 2px 10px; border: 1px solid var(--store-primary); border-radius: 6px; color: var(--store-primary-dark); font-size: 13px; font-weight: 700; background: var(--white); }
.ac-more { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; }
.ac-more .icon { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ بانران متجاوران */
.pair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.pair-card { position: relative; display: block; aspect-ratio: 900 / 420; border-radius: 20px; overflow: hidden; background: var(--store-accent); }
.pair-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pair-card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(16, 12, 10, .72), rgba(16, 12, 10, 0) 62%); }
.pair-card:hover img { transform: scale(1.04); }
.pair-cap { position: absolute; z-index: 2; top: 22px; inset-inline-start: 24px; color: var(--white); }
.pair-cap b { display: block; font-size: 23px; font-weight: 800; }
.pair-cap small { font-size: 15px; }
.pair-card .circle-arrow { position: absolute; z-index: 2; bottom: 20px; inset-inline-end: 20px; width: 44px; height: 44px; }

/* ------------------------------------------------------------------ قصّة المتجر */
.story-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.story-copy { position: relative; padding-top: 18px; }
.story-title { margin: 0 0 12px; font-size: 32px; font-weight: 800; }
.story-text { margin: 0 0 24px; color: var(--muted); font-size: 16px; }
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.type-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; background: var(--white); border-radius: 14px; box-shadow: var(--shadow); transition: transform .25s; }
.type-card:hover { transform: translateY(-3px); }
.type-card .type-dot { position: static; width: 46px; height: 46px; flex: none; border: 0; box-shadow: none; }
.type-card .type-dot .icon { width: 22px; height: 22px; }
.type-card b { display: block; font-size: 16px; }
.type-card small { color: var(--muted); font-size: 14px; line-height: 1.6; }
.story-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.story-media { position: relative; padding-bottom: 10px; }
.story-back {
	position: absolute; top: 0; inset-inline-end: 0; width: 60%; height: 80%; border-radius: 24px;
	background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .14) 0 3px, transparent 3px 26px), linear-gradient(160deg, var(--store-primary), var(--store-primary-dark));
}
.story-media img { position: relative; width: 66%; margin-top: 64px; aspect-ratio: 7 / 8; object-fit: cover; border: 6px solid var(--white); border-radius: 24px; box-shadow: var(--shadow-lg); }
.story-chip { position: absolute; z-index: 1; top: 16px; inset-inline-start: 30%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--white); border-radius: 14px; box-shadow: var(--shadow-lg); }
.story-chip > .icon { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--store-accent); color: var(--white); }
.story-chip b { display: block; font-size: 15px; }
.story-chip small { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------------ كيف تطلب */
.steps-section {
	padding-block: 64px; background-color: var(--store-primary); color: var(--white);
	background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
	background-size: 64px 64px;
}
.steps-in { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px; align-items: center; }
.steps-copy h2 { margin: 0; font-size: 30px; font-weight: 800; color: var(--white); }
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { position: relative; padding: 22px; background: var(--white); color: var(--store-text); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .12); }
.step-num { display: block; margin-bottom: 10px; font-size: 54px; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1.6px var(--store-primary); }
.step-icon { position: absolute; top: 22px; inset-inline-end: 22px; color: var(--store-accent); }
.step-icon .icon { width: 34px; height: 34px; stroke-width: 1.6; }
.step h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }
.steps-compact { padding-block: 44px; }
.steps-compact .step-num { font-size: 40px; }
[data-show-steps="false"] .steps-section { display: none; }

/* ------------------------------------------------------------------ آراء القرّاء */
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.review { padding: 26px; text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.rv-top { display: flex; align-items: center; justify-content: center; gap: 6px; }
.rv-score { font-size: 14px; }
.rv-text { margin: 12px 0 18px; font-size: 15.5px; line-height: 1.9; }
.rv-who { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; }
.rv-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--soft); color: var(--store-primary-dark); font-weight: 800; }
.rv-name { font-size: 15px; }
.rv-what { color: var(--muted); font-size: 13px; }
.rv-what::before { content: "•"; margin-inline-end: 6px; color: var(--store-primary); }
.review-flat { padding: 16px 0; text-align: start; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none; }
.review-flat .rv-top, .review-flat .rv-who { justify-content: flex-start; }
.review-flat .rv-text { margin: 8px 0 10px; }
[data-show-reviews="false"] .reviews-section { display: none; }

/* ------------------------------------------------------------------ النشرة */
.newsletter-section { padding-bottom: 72px; }
.newsletter { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 450px); gap: 28px; align-items: center; padding: 34px 40px; border-radius: 18px; background: var(--store-primary); color: var(--white); }
.nl-copy h2 { margin: 0 0 4px; font-size: 28px; font-weight: 800; color: var(--white); }
.nl-copy p { margin: 0; color: var(--white); }
.nl-field { display: flex; align-items: center; gap: 8px; padding: 6px; padding-inline-start: 18px; background: var(--white); border-radius: 999px; color: var(--muted); }
.nl-field input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--store-text); font-size: 15px; }
[data-show-newsletter="false"] .newsletter-section { display: none; }

/* ------------------------------------------------------------------ التذييل */
.site-footer { background: var(--footer); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr .9fr 1.4fr; gap: 32px; }
.footer-brand p { margin: 14px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.9; }
.footer-col h3 { position: relative; margin: 0 0 18px; padding-bottom: 10px; font-size: 17px; font-weight: 700; }
.footer-col h3::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 28px; height: 2px; background: var(--store-primary); }
.footer-col ul { list-style: none; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--muted); font-size: 14.5px; }
.footer-col a:hover { color: var(--store-primary-dark); }
.footer-contact li { display: flex; align-items: center; gap: 12px; }
.fc-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--white); color: var(--store-accent); }
.fc-icon .icon { width: 18px; height: 18px; }
.footer-contact small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.footer-contact li > span:last-child { font-size: 14.5px; }
.footer-bottom { margin-top: 44px; background: var(--footer-2); padding-block: 14px; }
.fb-in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 14px; color: var(--muted); }
.footer-social { display: flex; gap: 8px; list-style: none; margin: 0; }
.footer-social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--white); color: var(--store-text); }
.footer-social a:hover { background: var(--store-primary); color: var(--white); }
.footer-social .icon { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ رؤوس الصفحات الداخليّة */
.page-band .pb-frame { position: relative; overflow: hidden; margin-inline-end: var(--frame-gap); padding-block: 30px 36px; background: var(--soft); border-end-end-radius: 34px; }
.page-band .pb-frame::before { content: ""; position: absolute; inset-inline-end: -60px; bottom: -120px; width: 520px; height: 200px; border-radius: 50%; background: color-mix(in srgb, var(--store-primary) 14%, transparent); box-shadow: -260px 40px 0 color-mix(in srgb, var(--store-primary) 8%, transparent); pointer-events: none; }
.page-band .container { position: relative; }
.pb-title { margin: 6px 0 0; font-size: 32px; font-weight: 800; }
.pb-lead { margin: 4px 0 0; color: var(--muted); }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; list-style: none; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; opacity: .7; }
.breadcrumb a:hover { color: var(--store-primary-dark); }
.breadcrumb [aria-current] { color: var(--store-text); font-weight: 600; }

/* رأس التصنيف بصورةٍ في الإطار المستدير */
.cat-hero-frame { position: relative; display: flex; align-items: flex-end; min-height: 300px; margin-inline-end: var(--frame-gap); overflow: hidden; border-end-end-radius: 34px; background: var(--store-accent); }
.cat-hero-frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-hero-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(20, 14, 10, .82), rgba(20, 14, 10, .4)); }
.cat-hero-in { position: relative; z-index: 1; padding-block: 56px 44px; color: var(--white); }
.cat-hero .breadcrumb, .cat-hero .breadcrumb [aria-current] { color: var(--white); }
.cat-hero-title { margin: 8px 0 4px; font-size: 40px; font-weight: 800; color: var(--white); }
.cat-hero-lead { margin: 0; max-width: 560px; color: var(--white); }

/* ------------------------------------------------------------------ التصنيف */
.strip-section { padding-block: 32px 0; }
.sub-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sub-card { display: flex; align-items: center; gap: 12px; padding: 10px; padding-inline-end: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; transition: box-shadow .2s; }
.sub-card:hover { box-shadow: var(--shadow-lg); }
.sub-card img { width: 84px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.sub-card b { display: block; font-size: 15px; }
.sub-card small { color: var(--muted); font-size: 13px; }
.sub-card .circle-arrow { margin-inline-start: auto; width: 32px; height: 32px; }
.listing-section { padding-top: 32px; }
.listing { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.filters { padding: 6px 18px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; }
.filters-head h2 { margin: 0; font-size: 18px; }
.filters-head .icon-btn { display: none; }
.filter-box { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.filter-box h3 { margin: 14px 0 8px; font-size: 15px; }
.filter-box ul { list-style: none; margin: 0; display: grid; gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14.5px; cursor: pointer; }
.check input { accent-color: var(--store-primary); width: 16px; height: 16px; }
.type-mini { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range .field { width: 100%; height: 40px; }
.filter-apply { padding-top: 16px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; padding: 10px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.toolbar p { margin: 0; color: var(--muted); }
.toolbar b { color: var(--store-text); }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.toolbar .field { height: 40px; }
.filters-toggle { display: none; }
.view-toggle { display: flex; gap: 4px; }
.view-toggle button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--muted); }
.view-toggle button[aria-pressed="true"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--white); }
.listing .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.listing .book-grid.is-list { grid-template-columns: minmax(0, 1fr); }
.is-list .book-card { flex-direction: row; }
.is-list .bc-media { width: 210px; flex: none; }
.is-list .bc-body { padding: 20px 24px; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 6px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); font-weight: 700; }
.pagination a:hover { border-color: var(--store-primary); color: var(--store-primary-dark); }
.pagination [aria-current] { background: var(--store-primary); border-color: var(--store-primary); color: var(--white); }
.pagination .gap { border: 0; background: none; }
.pagination .icon { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ صفحة الكتاب */
.pdp-section { padding-top: 40px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "head side" "gallery side" "boxes side"; gap: 24px 36px; align-items: start; }
.pdp-head { grid-area: head; }
.gallery { grid-area: gallery; }
.buy-box { grid-area: side; position: sticky; top: 96px; }
.pdp-boxes { grid-area: boxes; display: flex; flex-direction: column; gap: 20px; }
.pdp-type { display: inline-flex; align-items: center; gap: 8px; padding: 4px; padding-inline-end: 14px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 700; }
.pdp-type .type-dot { position: static; width: 28px; height: 28px; border: 0; box-shadow: none; }
.pdp-type .type-dot .icon { width: 14px; height: 14px; }
.pdp-title { margin: 12px 0 8px; font-size: 36px; font-weight: 800; }
.pdp-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; color: var(--muted); }
.pdp-sub .book-author { font-size: 15px; }
.pdp-sub a { color: var(--store-primary-dark); font-weight: 700; }
.pdp-rating { display: inline-flex; align-items: center; gap: 6px; }
.pdp-rating b { color: var(--store-text); }
.pdp-rating a { font-weight: 500; color: var(--muted); }
.gallery { padding: 34px; border-radius: 22px; background: linear-gradient(160deg, color-mix(in srgb, var(--store-primary) 14%, var(--white)), var(--soft) 70%); }
.gallery-main { position: relative; width: min(300px, 72%); margin: 0 auto; }
.gallery-main img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 18px 36px rgba(34, 28, 22, .28); }
.gallery-main .type-dot { top: 12px; bottom: auto; width: 38px; height: 38px; }
.gallery-main .type-dot .icon { width: 19px; height: 19px; }
.thumbs { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.thumbs button { width: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; opacity: .75; }
.thumbs button[aria-pressed="true"] { border-color: var(--store-primary); opacity: 1; }
.thumbs img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.buy-box { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); }
.bb-price { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bb-price .badge { position: static; }
.bb-lead { margin: 12px 0 16px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.pdp-options { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.opt { display: flex; flex-direction: column; gap: 6px; }
.opt-label { color: var(--muted); font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; background: var(--soft); font-size: 14px; font-weight: 700; }
.chip .icon { width: 17px; height: 17px; color: var(--store-primary-dark); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.qty button { width: 38px; height: 38px; border: 0; background: none; font-size: 18px; border-radius: 50%; }
.qty button:hover { background: var(--soft); }
.qty input { width: 44px; height: 38px; border: 0; text-align: center; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-buttons { display: grid; gap: 10px; }
.bb-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.stock { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; font-size: 14px; }
.stock .icon { width: 18px; height: 18px; color: var(--store-primary-dark); }
.pdp-meta { margin: 14px 0 0; }
.pdp-meta div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.pdp-meta dt { color: var(--muted); }
.pdp-meta dd { margin: 0; font-weight: 700; text-align: end; }
.sample-box { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px; border-radius: 14px; background: var(--soft); }
.sample-play { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; background: var(--store-primary); color: var(--white); }
.sample-info b { display: block; font-size: 15px; }
.sample-info span { color: var(--muted); font-size: 13px; }
.wave { display: flex; align-items: center; gap: 3px; flex: 1; min-width: 0; overflow: hidden; justify-content: flex-end; }
.wave span { width: 3px; flex: none; border-radius: 2px; background: color-mix(in srgb, var(--store-primary) 55%, var(--white)); }
.edu-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.edu-feats div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; background: var(--soft); text-align: center; }
.edu-feats small { color: var(--muted); font-size: 12.5px; }
.edu-feats b { font-size: 13.5px; }
.feat-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--white); color: var(--store-primary-dark); }
.pd-box { padding: 24px 28px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.box-title { margin: 0 0 14px; font-size: 21px; font-weight: 800; }
.box-sub { margin: 18px 0 8px; font-size: 16px; }
.prose p { margin: 0 0 10px; line-height: 2; }
.check-list { list-style: none; margin: 0; display: grid; gap: 6px; }
.check-list li { display: flex; align-items: center; gap: 8px; }
.check-list .icon { width: 18px; height: 18px; color: var(--store-primary-dark); }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.spec-grid div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.spec-grid dt { color: var(--muted); }
.spec-grid dd { margin: 0; font-weight: 700; text-align: end; }
.reviews-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; margin-bottom: 14px; }
.reviews-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.reviews-summary strong { font-size: 44px; font-weight: 800; line-height: 1; }
.reviews-summary small { display: block; color: var(--muted); font-size: 13px; }
.rating-bars { list-style: none; margin: 0; display: grid; gap: 6px; }
.rating-bars li { display: grid; grid-template-columns: 56px minmax(0, 1fr) 38px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); }
.review-form { padding: 18px; border-radius: 14px; background: var(--soft); }
.review-form h3 { margin: 0 0 2px; font-size: 16px; }
.review-form p { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; }
.review-form .btn { margin-top: 10px; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; margin: 0 0 8px; padding: 0; border: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #D6CCBF; }
.star-input label .icon { width: 24px; height: 24px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary); border-radius: 4px; }

/* ------------------------------------------------------------------ المؤلّف */
.author-band { padding-top: 30px; background: var(--store-accent); color: var(--white); }
.author-band .breadcrumb, .author-band .breadcrumb [aria-current] { color: var(--white); }
.author-hero { position: relative; z-index: 1; display: flex; align-items: center; gap: 30px; margin-top: 20px; margin-bottom: -76px; padding: 28px; background: var(--white); color: var(--store-text); border-radius: 22px; box-shadow: var(--shadow-lg); }
.author-hero > img { width: 168px; height: 168px; flex: none; border-radius: 50%; object-fit: cover; border: 6px solid var(--soft); }
.ah-name { margin: 0; font-size: 32px; font-weight: 800; }
.ah-role { margin: 0 0 8px; color: var(--muted); }
.ah-bio p { margin: 0 0 10px; line-height: 2; }
.ah-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ah-rate { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.ah-rate b { color: var(--store-text); }
.author-band + .section { padding-top: 150px; }

/* ------------------------------------------------------------------ السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; }
.cart-items { display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.ci-cover { position: relative; display: block; }
.ci-cover img { width: 84px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 7px; }
.ci-cover .type-dot { width: 24px; height: 24px; bottom: -6px; inset-inline-start: -6px; }
.ci-cover .type-dot .icon { width: 12px; height: 12px; }
.ci-info { display: grid; gap: 2px; min-width: 0; }
.ci-type { color: var(--muted); font-size: 12.5px; }
.ci-info h3 { margin: 0; font-size: 17px; }
.ci-info .price { font-size: 15px; }
.ci-side { display: flex; align-items: center; gap: 16px; }
.ci-total { min-width: 96px; text-align: end; font-size: 16px; }
.cart-under { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.empty-cart { padding: 40px; text-align: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.empty-cart .feat-icon { margin: 0 auto 10px; background: var(--soft); }
.summary { position: sticky; top: 96px; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.coupon { display: flex; gap: 8px; }
.coupon .field { flex: 1; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 6px; padding: 8px 12px; border-radius: 10px; background: var(--soft); font-size: 13.5px; }
.coupon-applied button { border: 0; background: none; color: var(--store-primary-dark); font-weight: 700; padding: 0; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.summary-total { border: 0; font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.note .icon { width: 17px; height: 17px; }

/* ------------------------------------------------------------------ 404 */
.nf { position: relative; overflow: hidden; padding-block: 70px 150px; text-align: center; background: var(--store-bg); }
.nf-dunes { position: absolute; inset-inline: 0; bottom: 0; height: 180px; pointer-events: none; }
.nf-dunes i { position: absolute; display: block; border-radius: 50%; }
.nf-dunes i:nth-child(1) { inset-inline-start: -12%; bottom: -150px; width: 70%; height: 260px; background: color-mix(in srgb, var(--store-primary) 22%, var(--white)); }
.nf-dunes i:nth-child(2) { inset-inline-end: -10%; bottom: -170px; width: 75%; height: 280px; background: color-mix(in srgb, var(--store-primary) 40%, var(--white)); }
.nf-dunes i:nth-child(3) { inset-inline-start: 22%; bottom: -200px; width: 60%; height: 260px; background: var(--store-primary); }
.nf-in { position: relative; z-index: 1; }
.nf-code { margin: 0; font-size: clamp(110px, 17vw, 200px); font-weight: 800; line-height: 1; color: var(--store-primary-dark); letter-spacing: 4px; }
.nf h1 { margin: 6px 0 8px; font-size: 30px; font-weight: 800; }
.nf-text { margin: 0 auto; max-width: 520px; color: var(--muted); }
.nf-search { display: flex; gap: 8px; max-width: 520px; margin: 24px auto 16px; }
.nf-search .field { flex: 1; height: 50px; border-radius: 999px; }
.nf-search .btn { min-height: 50px; }

/* ------------------------------------------------------------------ components.html */
.kit-stack { display: grid; gap: 28px; }
.kit-block { padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.kit-title { margin: 0 0 14px; font-size: 18px; }
.kit-note { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.kit-row .type-dot { position: static; }
.kit-badges .badge { position: static; }
.kit-dark { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: var(--store-accent); }
.kit-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.kit-navy { padding: 18px; border-radius: 14px; background: var(--store-accent); }
.author-row-kit { grid-template-columns: minmax(0, 1fr); margin-bottom: 0; }
.mini-row-kit { grid-template-columns: minmax(0, 1fr); }
.review-grid-kit { grid-template-columns: minmax(0, 440px); }
.kit-gap { margin-top: 18px; }
.kit-on-navy { margin: 8px 0 0; color: var(--white); font-size: 14px; }
.kit-block .active-filters { margin: 0 0 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.swatch { display: grid; gap: 6px; font-size: 13px; }
.swatch span { display: block; width: 120px; height: 46px; border-radius: 10px; border: 1px solid var(--line); }

/* ------------------------------------------------------------------ العروض المتوسّطة والصغيرة */
@media (max-width: 1240px) {
	.main-nav { display: none; }
	.menu-toggle { display: inline-grid; }
}
@media (max-width: 1100px) {
	.cat-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 220px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
	.cat-card { scroll-snap-align: start; }
	.story-grid, .steps-in { grid-template-columns: minmax(0, 1fr); }
	.story-media { max-width: 560px; }
	.footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.footer-brand { grid-column: 1 / -1; }
	.footer-brand p { max-width: 560px; }
	body[data-books-per-row="5"], body[data-books-per-row="6"] { --bpr: 4; }
	.pdp { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1000px) {
	body[data-books-per-row] { --bpr: 3; }
	.listing { grid-template-columns: minmax(0, 1fr); }
	.filters { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 70; width: min(340px, 88vw); overflow-y: auto; border-radius: 0; transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s; }
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-head .icon-btn, .filters-toggle { display: inline-flex; }
	.pdp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "gallery" "side" "boxes"; }
	.buy-box { position: static; }
	.cart-layout { grid-template-columns: minmax(0, 1fr); }
	.summary { position: static; }
}
@media (max-width: 900px) {
	.section { padding-block: 56px; }
	.hero-thumbs { top: auto; bottom: 96px; transform: none; flex-direction: row; inset-inline-end: 16px; }
	.hero-thumbs button { width: 64px; height: 44px; border-radius: 10px; border-width: 2px; }
	.hero-thumbs button[aria-current="true"] { transform: translateY(-4px); }
	.sc-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.sc-wide { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
	.sc-box:nth-child(2) { border-inline-start: 0; }
	.sc-btn { grid-column: 1 / -1; min-height: 50px; }
	.offers-frame { margin-bottom: 0; }
	.offers .slide-img { aspect-ratio: 16 / 9; }
	.offer-box { position: relative; inset: auto; margin: -40px 14px 0; grid-template-columns: minmax(0, 1fr); }
	.offer-box .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
	.offers-arrows { top: 14px; bottom: auto; inset-inline-start: auto; inset-inline-end: 14px; }
	.offers-arrows .round-btn { width: 38px; height: 38px; }
	.offers-tag { top: 14px; inset-inline-start: 14px; }
	.navy-band { padding-block: 56px; }
	.author-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pair-grid { grid-template-columns: minmax(0, 1fr); }
	.review-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
	.mini-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.newsletter { grid-template-columns: minmax(0, 1fr); padding: 28px; }
	.sub-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 250px; overflow-x: auto; padding-bottom: 8px; }
	.reviews-layout { grid-template-columns: minmax(0, 1fr); }
	.kit-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
	.container { padding-inline: 16px; }
	body { font-size: 15px; }
	.section { padding-block: 46px; }
	.header-in { gap: 10px; min-height: 64px; }
	.brand img { width: 36px; height: 36px; }
	.brand-name { font-size: 18px; }
	.hide-sm, .header-cta { display: none; }
	.header-actions { gap: 0; }
	.sec-head { flex-wrap: wrap; align-items: flex-start; margin-bottom: 22px; }
	.sec-title { font-size: 24px; }
	.hero-frame { height: 500px; border-end-end-radius: 26px; }
	.hero .slide-body { justify-content: flex-start; padding-top: 48px; }
	.hero .slide::after { background: linear-gradient(to bottom, rgba(20, 14, 10, .82) 0%, rgba(20, 14, 10, .5) 55%, rgba(20, 14, 10, .2)); }
	.slide-text { font-size: 15.5px; }
	.hero + .hero-search { margin-top: -64px; }
	.sc-fields { grid-template-columns: minmax(0, 1fr); }
	.sc-box { border-inline-start: 0 !important; border-bottom: 1px solid var(--line); }
	body[data-books-per-row] { --bpr: 2; }
	.book-grid, .listing .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.bc-cover { inset-block: 14px; }
	.bc-body { padding: 10px 10px 12px; gap: 4px; }
	.book-title { font-size: 15px; }
	.book-author { font-size: 13px; }
	.price { font-size: 15px; }
	.bc-add { width: 34px; height: 34px; }
	.bc-add .icon { width: 16px; height: 16px; }
	.badge { top: 8px; inset-inline-start: 8px; font-size: 11.5px; padding: 2px 7px; }
	.bc-wish { top: 6px; inset-inline-end: 6px; width: 32px; height: 32px; }
	.type-dot { bottom: 8px; inset-inline-start: 8px; width: 26px; height: 26px; }
	.mq-list li { font-size: 16px; }
	.is-list .book-card { flex-direction: column; }
	.is-list .bc-media { width: auto; }
	.author-row, .mini-row, .type-grid, .steps-grid { grid-template-columns: minmax(0, 1fr); }
	.steps-copy h2, .story-title { font-size: 25px; }
	.story-media img { width: 82%; }
	.story-chip { inset-inline-start: auto; inset-inline-end: 8px; }
	.pair-cap b { font-size: 19px; }
	.offer-box { padding: 18px 20px; border-width: 5px; }
	.offer-box h3 { font-size: 20px; }
	.nl-copy h2 { font-size: 23px; }
	.newsletter { padding: 24px 20px; }
	.footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.footer-contact { grid-column: 1 / -1; }
	.fb-in { justify-content: center; text-align: center; }
	.pb-title, .ah-name { font-size: 26px; }
	.cat-hero-title { font-size: 30px; }
	.cat-hero-frame { min-height: 240px; }
	.pdp-title { font-size: 27px; }
	.gallery { padding: 24px; }
	.pd-box { padding: 20px; }
	.spec-grid { grid-template-columns: minmax(0, 1fr); }
	.price-lg { font-size: 26px; }
	.author-hero { flex-direction: column; text-align: center; padding: 22px; }
	.author-hero > img { width: 130px; height: 130px; }
	.ah-foot { justify-content: center; }
	.cart-item { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; }
	.ci-cover img { width: 70px; }
	.ci-side { grid-column: 1 / -1; justify-content: space-between; }
	.ci-total { min-width: 0; }
	.toolbar-actions { flex-wrap: wrap; }
	.nf-search { flex-direction: column; }
	.nf h1 { font-size: 24px; }
	.swatch span { width: 96px; }
}

/* ==== ميزات المنصّة (الملحق 8) ==== */
/* المدوّنة: بطاقة المقال وصفحتا blog.html وpost.html */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.post-card { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: none; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.post-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 20px 20px; padding-top: 14px; }
.post-date { font-size: .82rem; color: var(--muted); font-weight: 500; }
.post-title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.5; color: var(--store-text); }
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--store-primary-dark); }
.post-excerpt { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.post-more { margin-top: 4px; font-size: .88rem; font-weight: 700; color: var(--store-primary-dark); text-decoration: none; }
.post-more:hover { text-decoration: underline; }
.blog-section { padding: 8px 0 56px; }
.post-grid-page { row-gap: 36px; }
.post-page { padding: 8px 0 24px; }
.post-article { max-width: 760px; margin-inline: auto; }
.post-header { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
.post-back { font-size: .88rem; font-weight: 700; color: var(--store-primary-dark); text-decoration: none; }
.post-back::before { content: "→ "; }
.post-page-title { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.4; font-weight: 800; color: var(--store-text); }
.post-figure { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--line); }
.post-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-content { font-size: 1.02rem; line-height: 2; color: var(--store-text); }
.post-content p { margin: 0 0 1.1em; }
.blog-related { padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 991px) {
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid > .post-card:nth-child(3):last-child { display: none; }
}
@media (max-width: 600px) {
	.post-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.post-grid > .post-card:nth-child(3):last-child { display: flex; }
}

.post-grid--stamp .post-media { border-radius: var(--radius) var(--radius) 0 0; }
.post-stamp { position: absolute; top: 14px; inset-inline-start: 14px; padding: 6px 10px; border-radius: 9px; background: var(--white); color: var(--store-text); font-size: 13.5px; font-weight: 800; box-shadow: var(--shadow); }
.post-body { padding-top: 18px; }
.post-more { display: inline-flex; align-items: center; gap: 10px; color: var(--store-text); }
.post-more .circle-arrow { width: 34px; height: 34px; }
.post-more:hover { text-decoration: none; color: var(--store-primary-dark); }
.blog-hero { margin-bottom: 40px; }
.post-crumbs { padding-top: 28px; margin-bottom: 18px; }
.post-page-title { font-size: clamp(27px, 3.4vw, 38px); }
.blog-section { padding-top: 0; }
.blog-related { padding-top: 48px; }

/* الأسئلة الشائعة: لوحةٌ فاتحة دافئة، في طرفها بطاقاتٌ مروحيّة وفي الآخر الأسئلة */
.faq-panel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; padding: 48px; border-radius: 34px; background: color-mix(in srgb, var(--store-primary) 9%, var(--white)); }
.faq-fan { position: relative; height: 380px; }
.fan-card { position: absolute; top: 50%; left: 50%; width: 190px; height: 270px; margin: -135px 0 0 -95px; display: grid; place-items: center; border-radius: 20px; border: 6px solid var(--white); box-shadow: var(--shadow-lg); }
.fan-card .icon { width: 64px; height: 64px; color: var(--white); fill: none; stroke: currentColor; stroke-width: 1.4; }
.fan-card.f1 { background: var(--store-accent); transform: translateX(-90px) rotate(-12deg); }
.fan-card.f2 { background: var(--store-primary-dark); transform: translateX(90px) rotate(12deg); }
.fan-card.f3 { background: var(--store-primary); z-index: 1; }
.faq-main .sec-titles { margin-bottom: 22px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; cursor: pointer; font-weight: 700; font-size: 16.5px; list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); transition: background .2s, color .2s; }
.faq-ico .icon { width: 18px; height: 18px; transition: transform .25s; }
.faq-item[open] .faq-ico { background: var(--store-primary); color: var(--white); }
.faq-item[open] .faq-ico .icon { transform: rotate(180deg); }
.faq-a { padding: 0 20px 18px; color: var(--muted); font-size: 15px; line-height: 1.85; }
@media (max-width: 991px) {
	.faq-panel { grid-template-columns: minmax(0, 1fr); padding: 32px 24px; gap: 24px; }
	.faq-fan { height: 240px; }
	.fan-card { width: 120px; height: 170px; margin: -85px 0 0 -60px; }
	.fan-card.f1 { transform: translateX(-62px) rotate(-12deg); }
	.fan-card.f2 { transform: translateX(62px) rotate(12deg); }
}
@media (max-width: 600px) { .faq-panel { padding: 24px 16px; border-radius: 24px; } .faq-fan { height: 200px; } }

/* تطبيق المتجر في التذييل */
.footer-apps { margin-top: 18px; }
.footer-apps-title { margin: 0 0 10px; font-weight: 700; font-size: 14.5px; }

/* أزرار متاجر التطبيقات: شاراتٌ نصّيّة مرسومة، بلا شعاراتٍ منسوخة */
.app-badge { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 16px 6px 14px; border-radius: 12px; background: var(--store-accent); color: var(--white); text-decoration: none; line-height: 1.15; font-weight: 700; font-size: 14px; direction: rtl; }
.app-badge .icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.app-badge small { display: block; font-size: 11px; font-weight: 500; opacity: .85; }
.app-badge:hover { opacity: .9; }
.app-badges { display: flex; flex-wrap: wrap; gap: 10px; }

/* ==== الارتقاء إلى مستوى المتجر الاحترافيّ ==== */
/* النظرة السريعة: تطفو تحت المفضّلة فوق الغلاف ولا تحجز مكانًا؛ تظهر عند التحويم في الحاسوب ودائمًا في اللمس */
.bc-quick { position: absolute; top: 54px; inset-inline-end: 10px; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--white); color: var(--store-text); box-shadow: var(--shadow); transition: opacity .2s, transform .2s, color .2s; }
.bc-quick .icon { width: 18px; height: 18px; }
.bc-quick:hover { color: var(--store-primary); }
@media (hover: hover) and (pointer: fine) {
	.bc-quick { opacity: 0; transform: translateY(-6px); }
	.book-card:hover .bc-quick, .book-card:focus-within .bc-quick { opacity: 1; transform: none; }
}

/* تبويبات صفّ الكتب (القاعدة 16): كبسولاتٌ تحت العنوان، ويختفي الشريط إن بقي مصدرٌ واحد */
.row-tabs { display: flex; gap: 8px; margin: -12px 0 26px; overflow-x: auto; scrollbar-width: none; }
.row-tabs::-webkit-scrollbar { display: none; }
.row-tab { flex: none; min-height: 40px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--store-text); font-weight: 700; font-size: 14.5px; transition: background .2s, color .2s, border-color .2s; }
.row-tab:hover { border-color: var(--store-primary); }
.row-tab[aria-selected="true"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--white); }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* صفّان كاملان لأيّ عددٍ في الصفّ: 12 بطاقة، ويُخفى ما يزيد على صفّين */
.book-grid--rows > :nth-child(n+9) { display: none; }
body[data-books-per-row="3"] .book-grid--rows > :nth-child(n+7) { display: none; }
body[data-books-per-row="5"] .book-grid--rows > :nth-child(-n+10), body[data-books-per-row="6"] .book-grid--rows > * { display: flex; }

/* صفّ اقتراحاتٍ بأربعة كتب: أربعة أعمدة، ثمّ ثلاثة، ثمّ اثنان في صفّين */
.book-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* الصفّ الأفقيّ: بعدد الكتب في الصفّ، ويُمرَّر باللمس أو بالسهمين */
.sec-tools { display: flex; align-items: center; gap: 8px; }
.sec-tools .btn { margin-inline-start: 6px; }
.round-btn:disabled { opacity: .4; cursor: default; }
.round-btn:disabled:hover { background: var(--white); color: var(--store-accent); }
.carousel { margin: -8px -10px -22px; }
.carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--bpr) - 1) * 24px) / var(--bpr)); gap: 24px; padding: 8px 10px 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 10px; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }
.section-new + .section:not(.section-soft) { padding-top: 16px; }
.works-count { margin-inline-end: 6px; color: var(--muted); font-size: 14.5px; }
.works-count b { color: var(--store-text); }

/* عرض الأسبوع: إطارٌ كحليّ مستدير الركن كالواجهة، فيه بطاقةٌ بيضاء لكتابٍ واحد فوق كثبان */
.deal-frame { display: grid; grid-template-columns: minmax(296px, .62fr) minmax(0, 1.75fr); gap: 32px; align-items: center; padding: 44px; border-radius: 24px; border-end-end-radius: 70px; background: var(--store-accent); }
.deal-title { color: var(--white); }
.deal-head .eyebrow { margin-bottom: 8px; }
.countdown { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.countdown[hidden] { display: none; }
.cd-label { flex-basis: 100%; color: var(--white); font-size: 14.5px; }
.cd-unit { display: grid; justify-items: center; min-width: 66px; padding: 8px 6px; border-radius: 14px; background: var(--white); }
.cd-unit b { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--store-accent); font-variant-numeric: tabular-nums; }
.cd-unit small { color: var(--muted); font-size: 12.5px; }
.deal-book { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); overflow: hidden; border-radius: 20px; background: var(--white); box-shadow: 0 18px 40px rgba(0, 0, 0, .22); }
.deal-media { position: relative; display: grid; place-items: center; padding: 30px 26px 40px; overflow: hidden; background: linear-gradient(170deg, color-mix(in srgb, var(--store-primary) 16%, var(--white)), var(--soft) 75%); }
.deal-dunes i { position: absolute; display: block; border-radius: 50%; }
.deal-dunes i:nth-child(1) { inset-inline-start: -30%; bottom: -60px; width: 110%; height: 120px; background: color-mix(in srgb, var(--store-primary) 28%, var(--white)); }
.deal-dunes i:nth-child(2) { inset-inline-end: -30%; bottom: -74px; width: 110%; height: 130px; background: color-mix(in srgb, var(--store-primary) 48%, var(--white)); }
.deal-dunes i:nth-child(3) { inset-inline-start: 10%; bottom: -96px; width: 90%; height: 130px; background: var(--store-primary); }
.deal-cover { position: relative; z-index: 1; width: 100%; max-width: 180px; }
.deal-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 16px 30px rgba(34, 28, 22, .3); }
.deal-media .type-dot { top: 14px; bottom: auto; }
.deal-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 28px 30px; }
.deal-body .badge { position: static; }
.deal-name { margin: 2px 0 0; font-size: 27px; font-weight: 800; }
.deal-name a:hover { color: var(--store-primary-dark); }
.deal-body .pdp-rating { font-size: 14px; }
.deal-desc p { margin: 0 0 6px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.deal-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 4px; }
.deal-buy .round-btn { border: 1px solid var(--line); box-shadow: none; }
.deal-buy .round-btn[aria-pressed="true"] { color: var(--store-primary); }
.deal-buy .round-btn[aria-pressed="true"] .icon { fill: currentColor; }

/* تقييم المتجر بجانب عنوان الآراء */
.store-rate { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.store-rate b { color: var(--store-text); font-size: 16px; }

/* اختيار النسخة في صفحة الكتاب (book.formats): يُخفى إن لم تكن للعنوان إلّا صيغةٌ واحدة */
.formats-box { display: grid; gap: 6px; margin-bottom: 16px; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.format-opt { position: relative; display: grid; justify-items: start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); transition: border-color .2s; }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt.is-current { border: 2px solid var(--store-accent); padding: 9px 11px; background: var(--soft); }
.format-opt .type-dot { position: absolute; top: 8px; bottom: auto; inset-inline-start: auto; inset-inline-end: 8px; width: 22px; height: 22px; border: 0; box-shadow: none; }
.format-opt .type-dot .icon { width: 12px; height: 12px; }
.format-name { font-weight: 700; font-size: 14px; }
.format-price { color: var(--store-primary-dark); font-weight: 800; font-size: 14.5px; }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ *)) { display: none; }

/* التوصيل والدفع والاسترجاع: صندوقٌ مدمج في صندوق الشراء */
.bb-info { list-style: none; margin: 14px 0 0; padding: 4px 14px; display: grid; border-radius: 12px; background: var(--soft); }
.bb-info li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.bb-info li + li { border-top: 1px dashed var(--line); }
.bb-info .icon { width: 19px; height: 19px; margin-top: 1px; color: var(--store-primary-dark); }
.bb-info b { display: block; color: var(--store-text); font-size: 14px; }

/* التصفيات المختارة في صفحة التصنيف */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; }
.af-label { color: var(--muted); font-size: 14px; }
.active-filters .chip { min-height: 34px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 13.5px; }
.active-filters .chip .icon { width: 14px; height: 14px; color: var(--muted); }
.active-filters .chip:hover { border-color: var(--store-primary); }
.chips-clear { color: var(--store-primary-dark); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* صفوفٌ تُمرَّر أفقيًّا في الشاشات الضيّقة بدل أعمدةٍ طويلة */
@media (max-width: 1100px) {
	body[data-books-per-row="5"] .book-grid--rows > :nth-child(n+9), body[data-books-per-row="6"] .book-grid--rows > :nth-child(n+9) { display: none; }
}
@media (max-width: 1240px) {
	.deal-frame { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 34px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
	.story-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 1000px) {
	body[data-books-per-row] .book-grid--rows > :nth-child(n+7) { display: none; }
	.book-grid--four { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.book-grid--four > :nth-child(n+4) { display: none; }
}
@media (max-width: 900px) {
	.review-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 20px) / 2.15); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
	.review-grid > * { scroll-snap-align: start; }
	.pair-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.story-media { margin-inline: auto; width: 100%; max-width: 460px; }
}
@media (max-width: 991px) {
	.faq-fan { display: none; }
}
@media (max-width: 640px) {
	/* الواجهة: الصورة فوق النصّ لا خلفه */
	.hero-frame { height: auto; }
	.hero .slides { position: relative; display: grid; }
	.hero .slide { position: relative; inset: auto; grid-area: 1 / 1; display: flex; flex-direction: column; }
	.hero .slide-img { position: relative; inset: auto; height: auto; aspect-ratio: 2 / 1; }
	.hero .slide::after { display: none; }
	.hero .slide-body { height: auto; justify-content: flex-start; padding-top: 18px; padding-bottom: 76px; }
	.slide-title { font-size: 25px; margin-bottom: 8px; }
	.slide-text { margin-bottom: 16px; }
	.hero-thumbs { top: 12px; bottom: auto; inset-inline-end: 12px; }
	.hero + .hero-search { margin-top: -60px; }
	.sc-title { display: none; }
	.search-card { padding: 12px 12px 14px; }
	.sc-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.sc-box { padding: 7px 12px; border-bottom: 1px solid var(--line); }
	.sc-box:nth-child(3) { border-inline-start: 1px solid var(--line) !important; }
	.sc-box input, .sc-box select { font-size: 15.5px; }
	.sc-btn { margin: 8px; min-height: 46px; }
	.section { padding-block: 40px; }
	.marquee { padding-block: 12px; }
	.cat-row { grid-auto-columns: 168px; gap: 12px; }
	.cat-body { padding: 10px 12px; }
	.cat-body b { font-size: 15.5px; }
	.cat-body .circle-arrow { width: 30px; height: 30px; }
	.row-tabs { margin: -8px -16px 20px; padding-inline: 16px; }
	.row-tab { min-height: 40px; padding: 0 15px; font-size: 14px; }
	body[data-books-per-row] .book-grid--rows > :nth-child(n+5) { display: none; }
	.book-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.book-grid--four > :nth-child(n+4) { display: flex; }
	.bc-wish, .bc-quick { width: 40px; height: 40px; }
	.bc-quick { top: 52px; inset-inline-end: 6px; }
	.bc-add { width: 40px; height: 40px; }
	.carousel { margin-inline: -16px; }
	.carousel-track { grid-auto-columns: calc((100% - 12px) / 2.15); gap: 12px; padding-inline: 16px; scroll-padding-inline: 16px; }
	.sec-tools .round-btn { display: none; }
	.sec-tools .btn { margin: 0; }
	.author-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 0 16px 10px; scroll-padding-inline: 16px; }
	.author-card { scroll-snap-align: start; }
	.steps-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 0 16px 10px; scroll-padding-inline: 16px; }
	.step { scroll-snap-align: start; padding: 18px; }
	.step-num { font-size: 42px; }
	.review-grid, .mini-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 0 16px 10px; scroll-padding-inline: 16px; }
	.review-grid > *, .mini-row > * { scroll-snap-align: start; }
	.review { padding: 20px; }
	.type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.type-card { flex-direction: column; gap: 8px; padding: 12px; }
	.type-card .type-dot { width: 38px; height: 38px; }
	.type-card small { font-size: 13px; }
	.story-media img { width: 74%; margin-top: 44px; }
	.pair-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.pair-card { aspect-ratio: 900 / 360; }
	.deal-frame { padding: 22px 16px 16px; border-end-end-radius: 44px; }
	.cd-unit { min-width: 58px; }
	.cd-unit b { font-size: 22px; }
	.deal-book { grid-template-columns: minmax(0, 1fr); }
	.deal-media { padding: 22px 20px 34px; }
	.deal-cover { max-width: 140px; }
	.deal-body { padding: 18px 18px 22px; }
	.deal-name { font-size: 23px; }
	.store-rate { padding: 6px 12px; }
	.footer-social a { width: 40px; height: 40px; }
	.active-filters { margin-top: -6px; }
}
@media (max-width: 600px) {
	.post-grid:not(.post-grid-page) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 0 16px 10px; scroll-padding-inline: 16px; }
	.post-grid:not(.post-grid-page) > * { scroll-snap-align: start; }
}

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