/* =====================================================================
   مرفأ (marfa) — قالب متجر كتب لمنصّة «ناشر»
   مأخوذ عن الرئيسيّة السادسة من «Viatour»: واجهةٌ فاتحة بخطوطٍ طبوغرافيّة
   ورسمٍ مسطّح داخل كتلةٍ مستديرة وصندوق بحثٍ أبيض، وبطاقاتٌ مؤطَّرة بحشوة،
   وشريطٌ بلون المتجر ببطاقاتٍ بيضاء متدرّجة، وتذييلٌ كحليّ.
   ===================================================================== */

:root {
	/* ألوان المتجر: يختارها الناشر (القاعدة 4) */
	--store-primary: #2F7D4F;
	--store-primary-dark: #23603C;
	--store-accent: #05073C;
	--store-bg: #FFFFFF;
	--store-text: #05073C;

	/* محايدات ومشتقّات */
	--on-primary: #FFFFFF;            /* الأبيض على الأخضر التجريبيّ 4.9؛ إن اختار الناشر لونًا فاتحًا فليغمّقه */
	--on-accent: #FFFFFF;
	--primary-ink: var(--store-primary-dark);   /* نصٌّ ملوّن على الفاتح */
	--tint: color-mix(in srgb, var(--store-primary) 6%, #FFFFFF);
	--tint-2: color-mix(in srgb, var(--store-primary) 12%, #FFFFFF);
	--tint-line: color-mix(in srgb, var(--store-primary) 22%, #FFFFFF);
	--gray: #F5F5F5;
	--soft: #FBFBFB;
	--muted: #5F6170;
	--line: #DDDDDD;
	--white: #FFFFFF;
	--star: #F5A623;
	--shadow: 0 10px 30px rgba(5, 7, 60, .08);
	--shadow-sm: 0 4px 14px rgba(5, 7, 60, .08);
	--radius: 12px;
	--radius-lg: 18px;
	--gap: 22px;
	--per-row: 4;
	--font: "Tajawal", system-ui, sans-serif;
}

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

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

.container { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: 20px; }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.muted { color: var(--muted); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }
.flip { transform: scaleX(-1); }

/* ---------------------------------------------------------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 24px; border-radius: 8px;
	border: 1.5px solid transparent; font-weight: 700; font-size: 15px;
	transition: background .2s, color .2s, border-color .2s;
	white-space: nowrap;
}
.btn-primary { background: var(--store-primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-dark { background: var(--store-accent); color: var(--on-accent); }
.btn-dark:hover { background: color-mix(in srgb, var(--store-accent) 80%, #FFFFFF); }
.btn-outline { background: var(--white); color: var(--primary-ink); border-color: var(--store-primary); }
.btn-outline:hover { background: var(--tint); }
.btn-white { background: var(--white); color: var(--primary-ink); }
.btn-white:hover { background: var(--tint); }
.btn-light { background: var(--white); color: var(--store-text); border-color: var(--line); }
.btn-light:hover { border-color: var(--store-text); }
.btn-pill { border-radius: 999px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--white); color: var(--store-text);
	transition: border-color .2s, background .2s; position: relative;
}
.icon-btn:hover { border-color: var(--store-text); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn[aria-pressed="true"] { color: #C0392B; }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 15px; color: var(--store-text); white-space: nowrap; }
.see-all:hover { color: var(--primary-ink); }

/* ---------------------------------------------------------------- عنوان القسم والأشرطة */
.section { padding-block: 70px; }
.section-flush-top { padding-top: 10px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
.sec-title { font-size: clamp(24px, 2.3vw, 30px); font-weight: 700; }
.sec-sub { color: var(--muted); margin-top: 6px; font-size: 15px; }
.sec-head.center { justify-content: center; text-align: center; }
.band-tint { background: var(--tint); }
.band-gray { background: var(--gray); }
.band-soft { background: var(--soft); }

/* ---------------------------------------------------------------- التقييم والسعر ودائرة النوع */
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: #D9D9DE; }
.rating-lg .stars .icon { width: 18px; height: 18px; }
.rating-lg { font-size: 15px; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-weight: 700; font-size: 17px; color: var(--store-text); }
.price small { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.price del { font-weight: 400; font-size: 13px; color: var(--muted); }
.price-lg { font-size: 30px; }
.price-lg del { font-size: 17px; }
.type-dot {
	display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
	color: #FFFFFF; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); flex: none;
}
.type-dot .icon { width: 17px; height: 17px; stroke-width: 2; }
.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-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; font-weight: 700; }
.badge-sale { background: var(--store-primary); color: var(--on-primary); }
.badge-new { background: var(--store-accent); color: var(--on-accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--store-text); font-size: 13.5px; font-weight: 500; }
.pill-green { background: var(--store-primary); border-color: var(--store-primary); color: var(--on-primary); }
.pill-white { background: var(--white); border-color: transparent; }

/* ---------------------------------------------------------------- الرأس */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--white); transition: box-shadow .2s; }
.site-header.is-stuck { box-shadow: 0 6px 20px rgba(5, 7, 60, .07); }
.hdr { display: flex; align-items: center; gap: 22px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 42px; height: 42px; }
.brand-name { font-weight: 800; font-size: 22px; color: var(--store-text); }
.hdr-search { display: flex; align-items: center; gap: 4px; flex: 1 1 240px; max-width: 320px; }
.hdr-search button { border: 0; background: none; padding: 6px; display: grid; color: var(--store-text); }
.hdr-search input { flex: 1; min-width: 0; height: 42px; border: 0; background: transparent; font-size: 15px; border-radius: 8px; padding: 0 6px; }
.hdr-search input::placeholder { color: var(--muted); }
.hdr-search input:focus { background: var(--gray); outline: none; }
.hdr-nav { margin-inline-start: auto; }
.hdr-nav > ul { display: flex; align-items: center; gap: 2px; }
.hdr-nav a, .hdr-nav .drop-btn {
	display: inline-flex; align-items: center; gap: 5px; height: 42px; padding: 0 12px; border-radius: 8px;
	border: 0; background: none; font-size: 15px; font-weight: 500;
}
.hdr-nav a:hover, .hdr-nav .drop-btn:hover { background: var(--tint); }
.has-drop { position: relative; }
.drop-btn .icon { width: 16px; height: 16px; transition: transform .2s; }
.has-drop.open .drop-btn .icon { transform: rotate(180deg); }
.drop {
	position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 230px; padding: 10px;
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-drop:hover .drop, .has-drop.open .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: flex; height: 40px; padding: 0 12px; border-radius: 8px; width: 100%; }
.hdr-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.hdr-actions .icon-btn { border-color: transparent; }
.hdr-actions .icon-btn:hover { background: var(--tint); }
.hdr-link { font-weight: 500; padding: 0 10px; }
.hdr-link:hover { color: var(--primary-ink); }
.count {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
	background: var(--store-accent); color: var(--on-accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}
.cart-pill { min-height: 44px; padding: 0 18px; gap: 8px; }
.cart-pill .cart-num { background: var(--white); color: var(--store-text); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; padding: 0 6px; }
.menu-btn { border-color: transparent; }
.search-toggle { display: none; }
.m-search { display: none; padding: 0 20px 14px; }
.m-search .field-wrap { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(5, 7, 60, .45); opacity: 0; visibility: hidden; transition: .25s; z-index: 60; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(360px, 88vw); background: var(--white); z-index: 61;
	transform: translateX(100%); transition: transform .3s; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px;
	visibility: hidden;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-nav > li > a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-sub { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.drawer-sub a { padding: 6px 12px; border-radius: 999px; background: var(--tint); font-size: 14px; }
.drawer-card { background: var(--tint); border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; }
.drawer-card small { display: block; color: var(--muted); }

/* ---------------------------------------------------------------- الخطوط الطبوغرافيّة */
.contour { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.contour path { fill: none; stroke: var(--store-primary); stroke-opacity: .16; stroke-width: 1.4; }
body[data-contour-lines="false"] .contour, body[data-contour-lines="false"] .news-lines { display: none; }

/* ---------------------------------------------------------------- الواجهة */
.hero-wrap { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--tint) 0%, var(--tint) 70%, var(--white) 100%); padding: 34px 0 60px; }
.hero-shell { position: relative; }
.hero { position: relative; }
.slides { display: grid; }
.slide {
	grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center;
	opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s;
}
.slide:first-child, .slider-ready .slide.is-active { opacity: 1; visibility: visible; }
.slider-ready .slide:not(.is-active) { opacity: 0; visibility: hidden; }
.slide-body { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding-bottom: 130px; }
.slide-body h2 { font-size: clamp(34px, 4.3vw, 62px); font-weight: 800; line-height: 1.15; max-width: 600px; }
.slide-body h2::after { content: ""; display: block; width: 110px; height: 8px; border-radius: 8px; background: var(--store-primary); margin-top: 20px; }
.slide-body p { font-size: 16px; max-width: 470px; color: var(--muted); }
.slide-art {
	position: relative; aspect-ratio: 9 / 7; overflow: hidden; background: var(--tint-2);
	border-radius: 50% 50% 32px 50% / 46% 46% 32px 46%;
}
.slide-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-dots { position: absolute; z-index: 2; bottom: 18px; inset-inline-end: 0; width: 51%; display: flex; justify-content: center; gap: 6px; }
.hero-dots button, .track-dots button {
	width: 9px; height: 9px; border-radius: 999px; border: 2px solid var(--white); padding: 0; background: rgba(5, 7, 60, .35); transition: width .25s, background .25s;
}
.hero-dots button[aria-current="true"] { width: 28px; background: var(--store-text); }
.hero-dots:empty { display: none; }

.hero-search {
	position: relative; z-index: 3; margin-top: -104px; width: min(660px, 49%);
	background: var(--white); border-radius: 999px; box-shadow: 0 16px 40px rgba(5, 7, 60, .12);
	padding: 10px; padding-inline-start: 18px; display: flex; align-items: center; gap: 4px;
}
.hs-field { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.hs-field + .hs-field { border-inline-start: 1px solid var(--line); }
.hs-ico { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.hs-ico .icon { width: 18px; height: 18px; }
.hs-field label { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.hs-field input, .hs-field select { width: 100%; border: 0; background: transparent; padding: 2px 0; font-size: 13.5px; color: var(--muted); outline: none; appearance: none; }
.hs-field select { cursor: pointer; }
.hs-field .grow { min-width: 0; flex: 1; }
.hs-go { width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--store-primary); color: var(--on-primary); display: grid; place-items: center; flex: none; }
.hs-go:hover { background: var(--store-primary-dark); }
.hero-fallback { display: none; }
/* إن أخفى الناشر السلايدر: يبقى صندوق البحث أوّل ما في الصفحة، بعنوانٍ قصير */
.hero-shell:not(:has(.hero)) { text-align: center; padding-block: 30px 10px; }
.hero-shell:not(:has(.hero)) .hero-fallback { display: block; margin-bottom: 28px; }
.hero-shell:not(:has(.hero)) .hero-fallback h2 { font-size: clamp(30px, 4vw, 50px); font-weight: 800; }
.hero-shell:not(:has(.hero)) .hero-fallback p { color: var(--muted); margin-top: 8px; }
.hero-shell:not(:has(.hero)) .hero-search { margin: 0 auto; width: min(860px, 100%); text-align: start; }

/* ---------------------------------------------------------------- لماذا نحن (شريط الثقة) */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.why-ico { color: var(--store-primary); margin-bottom: 20px; }
.why-ico .icon { width: 50px; height: 50px; stroke-width: 1.3; }
.why-item h3 { font-size: 18px; font-weight: 500; margin-bottom: 10px; }
.why-item p { color: var(--muted); font-size: 15px; }
body[data-show-trust-bar="false"] .why { display: none; }

/* ---------------------------------------------------------------- بطاقات التصنيف بالصور */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.cat-card { position: relative; display: block; aspect-ratio: 420 / 260; border-radius: var(--radius); overflow: hidden; background: #2B3561; }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-card:hover img { transform: scale(1.05); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: rgba(5, 7, 60, .48); transition: background .3s; }
.cat-card:hover::after { background: rgba(5, 7, 60, .58); }
.cc-body { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #FFFFFF; text-align: center; padding: 10px; }
.cc-body h3 { font-size: 18px; font-weight: 700; color: #FFFFFF; }
.cc-body > span { font-size: 14px; color: #FFFFFF; }

/* ---------------------------------------------------------------- بطاقات الأيقونة على الشريط الفاتح */
.quick-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.quick-card { background: var(--white); border-radius: var(--radius); padding: 26px 14px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: box-shadow .25s, transform .25s; }
.quick-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.qc-ico { width: 76px; height: 76px; border-radius: 50%; background: var(--tint-2); display: grid; place-items: center; margin-bottom: 14px; }
.qc-ico img { width: 46px; height: 46px; object-fit: contain; }
.quick-card h3 { font-size: 16.5px; font-weight: 500; }
.quick-card p { font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- المسارات الأفقيّة */
.track-wrap { position: relative; }
.track { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; padding: 2px 1px 6px; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.track-dots { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.track-dots:empty { display: none; }
.track-arrow { position: absolute; top: 44%; z-index: 3; box-shadow: var(--shadow-sm); border-color: transparent; }
.track-arrow[data-dir="prev"] { inset-inline-start: -24px; }
.track-arrow[data-dir="next"] { inset-inline-end: -24px; }
.track-arrow[disabled] { opacity: .45; cursor: default; }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: var(--gap); }
.bcard {
	position: relative; display: flex; flex-direction: column; background: var(--white);
	border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; transition: box-shadow .25s, border-color .25s;
}
.bcard:hover { box-shadow: var(--shadow); border-color: transparent; }
.bcard-media { position: relative; }
.bcard-cover { display: block; border-radius: 9px; overflow: hidden; aspect-ratio: 2 / 3; background: var(--gray); }
.bcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bcard:hover .bcard-cover img { transform: scale(1.04); }
.bcard .type-dot { position: absolute; top: 10px; inset-inline-start: 10px; }
.bcard-badges { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bcard .heart {
	position: absolute; bottom: -18px; inset-inline-end: 14px; width: 38px; height: 38px; border: 0;
	box-shadow: 0 3px 10px rgba(5, 7, 60, .16); z-index: 2;
}
.bcard .heart .icon { width: 17px; height: 17px; }
.stock-band { position: absolute; inset-inline: 0; bottom: 34%; background: rgba(5, 7, 60, .86); color: #FFFFFF; text-align: center; font-weight: 700; font-size: 14px; padding: 7px 0; }
.bcard.is-out .bcard-cover img { filter: grayscale(.7); opacity: .8; }
.bcard-body { padding: 18px 8px 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bcard-author { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.bcard-author .icon { width: 14px; height: 14px; }
.bcard-title { font-size: 16px; font-weight: 500; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-title a:hover { color: var(--primary-ink); }
.bcard-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cart-mini { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--store-text); display: grid; place-items: center; flex: none; transition: .2s; }
.cart-mini:hover { background: var(--store-primary); border-color: var(--store-primary); color: var(--on-primary); }
.cart-mini[disabled] { background: var(--gray); color: var(--muted); cursor: not-allowed; }
.cart-mini .icon { width: 18px; height: 18px; }
body[data-card-style="plain"] .bcard { border-color: transparent; padding: 0; }
body[data-card-style="plain"] .bcard:hover { box-shadow: none; }
body[data-card-style="plain"] .bcard-foot { border-top: 0; padding-top: 6px; }
body[data-card-style="soft"] .bcard { border-color: transparent; box-shadow: var(--shadow-sm); }
.track .bcard { flex: 0 0 calc((100% - (var(--per-row) - 1) * var(--gap)) / var(--per-row)); }
.band-gray .bcard { background: var(--white); }
.bcard-desc { display: none; }

/* ---------------------------------------------------------------- الشريط الملوّن ذو البطاقات المتدرّجة */
.band {
	position: relative; overflow: hidden; background: var(--store-primary); color: var(--on-primary);
	display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 40px; align-items: center;
	padding: 90px max(20px, calc((100% - 1320px) / 2));
}
.band:not(:has([data-region])) { display: none; }
.band:not(:has(.band-copy)), .band:not(:has(.band-cards)) { grid-template-columns: 1fr; }
.band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; pointer-events: none; }
.band-text, .band-cards { position: relative; z-index: 1; }
.band-text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; max-width: 520px; }
.band-text h2 { font-size: clamp(30px, 3.3vw, 46px); font-weight: 800; line-height: 1.2; color: var(--on-primary); }
.band-text p { font-size: 16px; color: var(--on-primary); }
.band-text .btn { margin-top: 12px; }
.spot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 250px)); gap: 22px; justify-content: center; }
.spot-card {
	background: var(--white); color: var(--store-text); border-radius: 14px; padding: 24px 20px 22px; text-align: center;
	display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 18px 40px rgba(5, 7, 60, .16);
}
.spot-card:nth-child(1) { grid-column: 1; grid-row: 1; }
.spot-card:nth-child(2) { grid-column: 1; grid-row: 2; }
.spot-card:nth-child(3) { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.sp-cover { position: relative; width: 92px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: visible; margin-bottom: 12px; }
.sp-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; box-shadow: 0 8px 18px rgba(5, 7, 60, .2); }
.sp-cover .type-dot { position: absolute; top: -10px; inset-inline-start: -14px; width: 28px; height: 28px; }
.sp-cover .type-dot .icon { width: 15px; height: 15px; }
.spot-card h3 { font-size: 19px; font-weight: 800; color: var(--primary-ink); line-height: 1.35; }
.spot-card p { font-size: 14px; color: var(--muted); }
.spot-card .price { font-size: 16px; margin-top: 4px; }

/* ---------------------------------------------------------------- آراء القرّاء */
.reviews { text-align: center; }
.rv-stage { max-width: 820px; margin-inline: auto; }
.rv-mark { display: inline-grid; color: var(--store-primary); margin-bottom: 18px; }
.rv-mark .icon { width: 64px; height: 64px; }
.rv-list { display: grid; }
.rv-item { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; padding-inline: 10px; }
.rv-item:first-child, .rv-ready .rv-item.is-active { opacity: 1; visibility: visible; }
.rv-ready .rv-item:not(.is-active) { opacity: 0; visibility: hidden; }
.rv-item .rating { justify-content: center; margin-bottom: 16px; }
.rv-item blockquote { margin: 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.9; font-weight: 500; }
.rv-who { margin-top: 26px; }
.rv-who b { display: block; font-weight: 700; }
.rv-who small { color: var(--muted); font-size: 14px; }
.rv-picks { display: flex; justify-content: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.rv-picks:empty { display: none; }
.rv-picks button {
	width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--tint-2); color: var(--store-text);
	font-weight: 800; font-size: 19px; display: grid; place-items: center; transition: box-shadow .25s, transform .25s;
}
.rv-picks button[aria-current="true"] { box-shadow: 0 0 0 4px var(--soft), 0 0 0 6px var(--store-primary); transform: scale(1.08); }
body[data-show-reviews="false"] .reviews, body[data-show-reviews="false"] .pdp-reviews { display: none; }

/* ---------------------------------------------------------------- بانرات العروض */
.offer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.offer { position: relative; display: block; aspect-ratio: 2 / 1; border-radius: var(--radius); overflow: hidden; background: #2B3561; }
.offer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.offer:hover img { transform: scale(1.04); }
.offer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(5, 7, 60, .74) 0%, rgba(5, 7, 60, .42) 48%, rgba(5, 7, 60, 0) 78%); }
.offer-text { position: absolute; z-index: 1; inset-block: 0; inset-inline-start: 0; width: 62%; padding: 22px 26px; display: flex; flex-direction: column; justify-content: center; gap: 4px; color: #FFFFFF; }
.offer-text b { font-size: clamp(20px, 1.9vw, 26px); font-weight: 800; line-height: 1.25; }
.offer-text > span { font-size: 14.5px; }
.offer-text .offer-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-weight: 700; font-size: 14px; border-bottom: 2px solid currentColor; align-self: flex-start; }

/* ---------------------------------------------------------------- شاهدتَه مؤخّرًا */
.section-recent { padding-block: 50px; }
.mini-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.mini-card { display: flex; flex-direction: column; gap: 8px; }
.mini-card .mc-cover { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 2 / 3; }
.mini-card img { width: 100%; height: 100%; object-fit: cover; }
.mini-card .type-dot { position: absolute; top: 8px; inset-inline-start: 8px; width: 26px; height: 26px; }
.mini-card .type-dot .icon { width: 14px; height: 14px; }
.mini-card h3 { font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.mini-card .price { font-size: 14.5px; }

/* ---------------------------------------------------------------- المؤلّفون */
.authors-sec { padding-block: 40px 70px; text-align: center; }
.authors-kicker { color: var(--muted); font-size: 15px; margin-bottom: 30px; }
.author-row { display: flex; justify-content: space-between; gap: 24px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.author-row::-webkit-scrollbar { display: none; }
.author-dot { flex: 1 0 120px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.author-dot img { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; transition: transform .3s, box-shadow .3s; }
.author-dot:hover img { transform: translateY(-3px); box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--store-primary); }
.author-dot b { font-weight: 700; font-size: 15.5px; }
.author-dot small { color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- النشرة */
.news-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; min-height: 380px; }
.news-text { padding-block: 60px; }
.news-text h2 { font-size: clamp(28px, 3vw, 42px); font-weight: 800; line-height: 1.3; max-width: 560px; }
.news-text p { margin-top: 14px; max-width: 500px; color: var(--muted); }
.news-form { display: flex; gap: 8px; margin-top: 30px; max-width: 470px; background: var(--white); border-radius: var(--radius); padding: 7px; box-shadow: var(--shadow-sm); }
.news-form input { flex: 1; min-width: 0; height: 48px; border: 0; padding: 0 14px; background: transparent; outline: none; }
.news-form input::placeholder { color: var(--muted); }
.news-art { position: relative; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; }
.news-art img { position: relative; width: 100%; max-width: 440px; }
.news-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.news-lines path { fill: none; stroke: var(--store-primary); stroke-width: 3; stroke-opacity: .55; }
body[data-show-newsletter="false"] .news-band { display: none; }

/* ---------------------------------------------------------------- التذييل الكحليّ */
.site-footer { background: var(--store-accent); color: #FFFFFF; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 36px; }
.foot-call { display: flex; align-items: center; gap: 16px; font-size: 19px; font-weight: 500; flex-wrap: wrap; }
.foot-call .icon { width: 36px; height: 36px; stroke-width: 1.4; }
.foot-call a { font-weight: 700; }
.foot-social { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.foot-social span { margin-inline-end: 10px; }
.foot-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.foot-social a:hover { background: rgba(255, 255, 255, .12); }
.foot-social .icon { width: 18px; height: 18px; }
.foot-rule { border-top: 1px solid rgba(255, 255, 255, .16); }
.foot-cols { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 36px; padding-block: 48px 40px; }
.foot-cols h3 { font-size: 18px; font-weight: 500; margin-bottom: 20px; color: #FFFFFF; }
.foot-cols li { margin-bottom: 12px; font-size: 14.5px; }
.foot-cols li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; max-width: 340px; }
.foot-contact .icon { width: 18px; height: 18px; margin-top: 3px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; padding-block: 22px; }
.to-top {
	position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 30; width: 48px; height: 48px; border-radius: 50%;
	background: var(--store-primary); border: 0; box-shadow: var(--shadow); color: var(--on-primary); display: grid; place-items: center;
	opacity: 0; visibility: hidden; transition: .25s;
}
.to-top.show { opacity: 1; visibility: visible; }

/* ---------------------------------------------------------------- الصفحات الداخليّة */
.page-head { padding-block: 26px 10px; }
.page-head-slim { padding-bottom: 20px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: #9A9AA6; }
.breadcrumb a:hover { color: var(--store-text); }
.page-title { font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; margin-top: 14px; }
.page-sub { color: var(--muted); margin-top: 4px; }

/* ---------------------------------------------------------------- صفحة التصنيف */
.listing { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 80px; }
.side { display: flex; flex-direction: column; gap: 16px; }
.cat-box { background: var(--store-primary); color: var(--on-primary); border-radius: var(--radius); padding: 24px; }
.cat-box h1 { font-size: 28px; font-weight: 800; color: var(--on-primary); }
.cat-box > p { font-size: 14.5px; margin-top: 2px; color: var(--on-primary); }
.cat-box ul { margin-top: 16px; }
.cat-box li a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .22); font-weight: 500; color: var(--on-primary); }
.cat-box li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cat-box .n { min-width: 34px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 12.5px; background: rgba(0, 0, 0, .22); color: #FFFFFF; padding: 0 8px; }
.filters { display: flex; flex-direction: column; gap: 16px; }
.f-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.f-group summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-weight: 700; cursor: pointer; }
.f-group summary::-webkit-details-marker { display: none; }
.f-group summary .icon { transition: transform .2s; width: 18px; height: 18px; }
.f-group[open] summary .icon { transform: rotate(180deg); }
.f-body { padding: 0 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.f-body label { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.f-body input[type="checkbox"], .f-body input[type="radio"] { accent-color: var(--store-primary); width: 17px; height: 17px; flex: none; }
.f-body .n { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.f-types .type-dot { width: 26px; height: 26px; box-shadow: none; }
.f-types .type-dot .icon { width: 14px; height: 14px; }
.price-range { display: flex; gap: 10px; align-items: center; }
.price-range input { width: 100%; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.range-bar { position: relative; height: 4px; background: var(--line); border-radius: 4px; margin: 8px 4px; }
.range-bar span { position: absolute; inset-inline: 15% 30%; top: 0; bottom: 0; background: var(--store-primary); border-radius: 4px; }
.range-bar span::before, .range-bar span::after { content: ""; position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 3px solid var(--store-primary); transform: translateY(-50%); }
.range-bar span::before { inset-inline-start: -8px; }
.range-bar span::after { inset-inline-end: -8px; }
.filters-head { display: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.toolbar .count-text { color: var(--muted); }
.toolbar .count-text b { color: var(--store-text); }
.tool-end { display: flex; align-items: center; gap: 10px; }
.sort-label { color: var(--muted); font-size: 14.5px; }
.select { height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; background: var(--white); min-width: 180px; }
.filters-toggle { display: none; }
.listing .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination-start { justify-content: flex-start; margin-top: 0; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; font-weight: 500; padding: 0 6px; }
.pagination a:hover { background: var(--tint); }
.pagination [aria-current="page"] { background: var(--store-primary); color: var(--on-primary); font-weight: 700; }
.pagination .pg-arrow { border: 1px solid var(--line); }

/* ---------------------------------------------------------------- صفحة الكتاب */
.pdp-top { padding-block: 24px 28px; }
.pdp-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.pdp-titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.pdp-title { font-size: clamp(28px, 3.3vw, 42px); font-weight: 800; margin-top: 12px; }
.pdp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 10px; font-size: 15px; }
.pdp-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.pdp-meta a { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.wish-link { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); padding: 8px 16px; font-weight: 500; }
.wish-link[aria-pressed="true"] .icon { fill: #C0392B; color: #C0392B; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 40px; align-items: start; padding-bottom: 50px; }
.gallery { position: relative; display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: end; background: var(--tint); border-radius: 22px; padding: 40px; }
.g-front { position: relative; justify-self: center; width: 100%; max-width: 290px; }
.g-front img, .g-back img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 22px 44px rgba(5, 7, 60, .22); }
.g-front .type-dot { position: absolute; top: -14px; inset-inline-start: -14px; width: 42px; height: 42px; z-index: 1; }
.g-front .type-dot .icon { width: 21px; height: 21px; }
.g-back { justify-self: center; width: 100%; max-width: 170px; text-align: center; }
.g-back small { display: block; margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.fact { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fact .f-ico { width: 50px; height: 50px; border-radius: 50%; background: var(--tint-2); color: var(--primary-ink); display: grid; place-items: center; margin-bottom: 8px; }
.fact small { color: var(--muted); font-size: 13px; }
.fact b { font-weight: 700; font-size: 15px; }
.pdp-sec { padding: 32px 0; border-bottom: 1px solid var(--line); }
.pdp-sec:last-child { border-bottom: 0; }
.pdp-sec h2 { font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.prose { color: #2E3047; }
.prose p + p { margin-top: 12px; }
.isbn-row { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 16px; font-size: 14.5px; color: var(--muted); }
.timeline { display: flex; flex-direction: column; }
.timeline li { position: relative; padding-inline-start: 48px; padding-bottom: 20px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 15px; top: 32px; bottom: -2px; border-inline-start: 2px dashed var(--tint-line); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; inset-inline-start: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--tint-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.timeline li:first-child .tl-dot, .timeline li:last-child .tl-dot { background: var(--store-primary); color: var(--on-primary); }
.timeline b { display: block; font-weight: 700; }
.timeline p { color: var(--muted); font-size: 14.5px; }
.buy-box { position: sticky; top: 100px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); background: var(--white); display: flex; flex-direction: column; gap: 16px; }
.bb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bb-label { color: var(--muted); font-size: 14px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14.5px; color: #1F6B47; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.bb-type { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--gray); font-size: 14.5px; }
.bb-type .type-dot { width: 30px; height: 30px; box-shadow: none; }
.bb-qty { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 500; }
.bb-actions { display: grid; gap: 10px; }
.perks { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.perks li { display: flex; gap: 10px; align-items: center; }
.perks .icon { color: var(--primary-ink); }
.sample-bar { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--tint); }
.sample-bar .play { width: 42px; height: 42px; border-radius: 50%; background: var(--store-primary); color: var(--on-primary); border: 0; display: grid; place-items: center; flex: none; }
.sample-bar .wave-bars { flex: 1; height: 26px; display: flex; align-items: center; gap: 3px; }
.sample-bar .wave-bars i { flex: 1; background: color-mix(in srgb, var(--store-primary) 55%, #FFFFFF); border-radius: 2px; }
.sample-bar small { color: var(--muted); font-size: 13px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; height: 42px; }
.qty button { width: 38px; height: 40px; border: 0; background: none; display: grid; place-items: center; font-size: 18px; }
.qty input { width: 38px; text-align: center; border: 0; background: transparent; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* الآراء في صفحة الكتاب */
.pdp-reviews .rv-summary { display: grid; grid-template-columns: 200px 1fr; gap: 30px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.rv-score { text-align: center; }
.rv-score strong { display: block; font-size: 52px; font-weight: 800; line-height: 1; }
.rv-score .rating { justify-content: center; margin-top: 8px; }
.rv-score p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.rv-bars li { display: grid; grid-template-columns: 70px 1fr 40px; gap: 12px; align-items: center; font-size: 14px; margin-bottom: 6px; }
.rv-bars .bar { height: 7px; border-radius: 9px; background: var(--gray); overflow: hidden; }
.rv-bars .bar span { display: block; height: 100%; background: var(--store-primary); border-radius: 9px; }
.rv-items { margin-top: 26px; display: grid; gap: 24px; }
.rv-card { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.rv-card:last-child { border-bottom: 0; }
.rv-av { width: 52px; height: 52px; border-radius: 50%; background: var(--tint-2); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.rv-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.rv-head small { color: var(--muted); }
.rv-card p { margin-top: 8px; color: #2E3047; }
.rv-form { margin-top: 26px; background: var(--tint); border-radius: var(--radius-lg); padding: 24px; display: grid; gap: 14px; }
.rv-form h3 { font-size: 19px; }
.rv-form p { color: var(--muted); font-size: 14px; }
.star-input { border: 0; padding: 0; margin: 0; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #C9C9D1; }
.star-input label .icon { width: 26px; height: 26px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 3px solid var(--store-primary); border-radius: 4px; }
.field { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--white); resize: vertical; }
.field:focus { outline: none; border-color: var(--store-primary); }
.rv-form .btn { justify-self: start; }

/* ---------------------------------------------------------------- صفحة المؤلّف */
.author-hero { position: relative; overflow: hidden; background: var(--tint); padding: 28px 0 60px; }
.author-hero .container { position: relative; }
.ah-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; align-items: center; margin-top: 30px; }
.ah-photo img { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 8px var(--white), 0 0 0 10px var(--store-primary); }
.eyebrow { color: var(--primary-ink); font-weight: 700; }
.author-hero h1 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 800; margin-top: 4px; }
.ah-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.author-hero .bio { margin-top: 18px; max-width: 760px; color: #2E3047; }
.author-hero .bio p + p { margin-top: 10px; }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; padding-block: 14px 70px; }
.cart-box { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 6px 26px 10px; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; gap: 10px; }
.cart-head h2 { font-size: 20px; }
.link-btn { border: 0; background: none; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; font-weight: 500; padding: 6px; }
.link-btn:hover { color: var(--store-text); }
.cart-cols, .cart-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 120px 124px 110px 44px; gap: 16px; align-items: center; }
.cart-cols { padding: 12px 0; border-block: 1px solid var(--line); font-size: 14px; color: var(--muted); font-weight: 500; }
.cart-cols span:first-child { grid-column: 1 / 3; }
.cart-row { padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-thumb { border-radius: 8px; overflow: hidden; aspect-ratio: 2 / 3; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info h3 { font-size: 16px; font-weight: 700; }
.cart-info p { color: var(--muted); font-size: 14px; }
.cart-type { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 6px; }
.cart-type .type-dot { width: 22px; height: 22px; box-shadow: none; }
.cart-type .type-dot .icon { width: 12px; height: 12px; }
.cart-price { font-size: 15px; flex-direction: column; gap: 0; }
.cart-total { font-weight: 700; }
.summary { position: sticky; top: 100px; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--white); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.summary h2 { font-size: 20px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; background: var(--white); }
.coupon .btn { min-height: 48px; padding: 0 18px; }
.coupon-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--tint); border: 1px dashed var(--store-primary); border-radius: 999px; padding: 4px 14px 4px 6px; font-size: 13.5px; align-self: flex-start; }
.coupon-chip button { border: 0; background: var(--white); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.coupon-chip button .icon { width: 14px; height: 14px; }
.sum-rows { display: grid; gap: 10px; padding: 14px 0; border-block: 1px solid var(--line); }
.sum-rows div { display: flex; justify-content: space-between; font-size: 15px; }
.sum-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; }
.secure { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); justify-content: center; }
.center-link { justify-content: center; }
.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty .icon { width: 60px; height: 60px; color: var(--primary-ink); stroke-width: 1.2; }
.cart-empty h2 { margin: 12px 0 6px; }
.cart-empty p { color: var(--muted); margin-bottom: 18px; }

/* ---------------------------------------------------------------- 404 */
.nf-wrap { background: linear-gradient(180deg, var(--tint), var(--white)); }
.nf { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; padding-block: 50px 60px; }
.nf-art { border-radius: 50% 50% 32px 50% / 46% 46% 32px 46%; overflow: hidden; background: #FDE9D6; }
.nf-art svg { width: 100%; height: auto; display: block; }
.nf-code { font-size: clamp(90px, 13vw, 180px); font-weight: 800; line-height: 1; color: var(--store-text); }
.nf-code span { color: var(--primary-ink); }
.nf h1 { font-size: clamp(24px, 2.6vw, 34px); margin-top: 10px; }
.nf p { color: var(--muted); margin-top: 10px; max-width: 480px; }
.nf-search { display: flex; gap: 10px; margin-top: 24px; max-width: 480px; }
.nf-search input { flex: 1; min-width: 0; height: 52px; border: 1px solid var(--line); border-radius: 8px; padding: 0 16px; background: var(--white); }
.nf-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- صفحة المكوّنات */
.kit-sec { padding: 40px 0; border-bottom: 1px solid var(--line); }
.kit-sec > .container > h2 { font-size: 22px; margin-bottom: 8px; }
.kit-sec > .container > p { color: var(--muted); margin-bottom: 22px; }
.kit-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.kit-gap { margin-top: 18px; }
.kit-top { align-items: flex-start; }
.kit-type { display: inline-flex; align-items: center; gap: 8px; }
.kit-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.kit-cards > div > small { display: block; color: var(--muted); margin-bottom: 8px; font-size: 13px; }
.kit-search { background: var(--tint); border-radius: var(--radius-lg); padding: 30px; }
.kit-search .hero-search { margin: 0; width: min(760px, 100%); }
.kit-cat { width: min(340px, 100%); grid-template-columns: 1fr; }
.kit-quick { padding: 24px; border-radius: var(--radius-lg); }
.kit-quick .quick-grid { grid-template-columns: repeat(2, 170px); }
.kit-band { padding-bottom: 0; border-bottom: 0; }
.kit-band > .container { margin-bottom: 22px; }

/* ---------------------------------------------------------------- الحركة */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- العروض */
@media (max-width: 1240px) {
	.hdr-search { display: none; }
	.search-toggle { display: inline-grid; }
	.search-open .m-search { display: block; }
	.hero-search { width: min(620px, 56%); }
}
@media (max-width: 1100px) {
	.book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.track .bcard { flex-basis: calc((100% - 2 * var(--gap)) / 3); }
	.slide-body { padding-bottom: 0; }
	.hero-search { margin-top: 30px; width: 100%; }
	.hero-dots { bottom: 14px; }
	.quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.band { grid-template-columns: 1fr; padding-block: 64px; }
	.band-text { max-width: 640px; }
	.pdp { grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; }
	.listing { grid-template-columns: 260px minmax(0, 1fr); }
	.listing .book-grid { 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; }
	.foot-cols { grid-template-columns: 1fr 1fr; }
	.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.track-arrow[data-dir="prev"] { inset-inline-start: -10px; }
	.track-arrow[data-dir="next"] { inset-inline-end: -10px; }
	.cart-cols { display: none; }
	.cart-row { grid-template-columns: 76px minmax(0, 1fr) auto auto 40px; }
	.cart-row .cart-price { display: none; }
	.offer-text { width: 74%; padding: 18px; }
}
@media (max-width: 900px) {
	.hdr-nav, .cart-pill .label, .hdr-actions .hide-md { display: none; }
	.hdr { gap: 6px; min-height: 66px; }
	.menu-btn { order: -1; }
	.brand { margin-inline-end: auto; }
	.brand img { width: 36px; height: 36px; }
	.brand-name { font-size: 19px; }
	.cart-pill { padding: 0 12px; }
	.why-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
	.offer-grid { grid-template-columns: 1fr 1fr; }
	.offer-grid > :last-child { grid-column: 1 / -1; aspect-ratio: 3 / 1; }
	.news-grid { grid-template-columns: 1fr; gap: 0; }
	.news-text { padding-bottom: 20px; }
	.news-art img { max-width: 340px; }
	.pdp { display: flex; flex-direction: column; gap: 0; }
	.pdp-main { display: contents; }
	.pdp-main > * { order: 2; }
	.pdp-main > .gallery { order: 0; }
	.buy-box { position: static; order: 1; margin-top: 24px; }
	.listing { grid-template-columns: minmax(0, 1fr); }
	.filters {
		position: fixed; inset-block: 0; inset-inline-start: 0; width: min(360px, 90vw); z-index: 61; background: var(--white);
		padding: 20px; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head { display: flex; justify-content: space-between; align-items: center; }
	.filters-toggle { display: inline-flex; }
	.cat-box ul { display: flex; flex-wrap: wrap; gap: 8px; }
	.cat-box li a { border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; padding: 5px 6px 5px 14px; }
	.listing .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cart-layout { grid-template-columns: minmax(0, 1fr); }
	.summary { position: static; }
	.ah-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 24px; }
	.ah-stats { justify-content: center; }
	.nf { grid-template-columns: 1fr; }
	.nf-art { max-width: 520px; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.section { padding-block: 50px; }
	.hero-wrap { padding: 20px 0 40px; }
	.slide { grid-template-columns: 1fr; gap: 26px; }
	.slide-body h2::after { width: 80px; height: 6px; margin-top: 14px; }
	.hero-dots { width: 100%; }
	.hero-search { flex-direction: column; align-items: stretch; border-radius: 20px; padding: 8px; gap: 0; }
	.hs-field { padding: 10px 8px; }
	.hs-field + .hs-field { border-inline-start: 0; border-top: 1px solid var(--line); }
	.hs-go { width: 100%; height: 50px; border-radius: 12px; margin-top: 6px; }
	.book-grid, .listing .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); --gap: 14px; }
	.track { --gap: 14px; }
	.track .bcard { flex-basis: calc((100% - var(--gap)) / 2); }
	.track-arrow { display: none; }
	.bcard { padding: 6px; }
	.bcard-body { padding: 16px 4px 2px; }
	.bcard-title { font-size: 15px; }
	.price { font-size: 15.5px; }
	.price-lg { font-size: 26px; }
	.cat-grid { --gap: 12px; }
	.cc-body h3 { font-size: 16px; }
	.band { padding-block: 54px; }
	.spot-card { padding: 18px 12px; }
	.spot-card h3 { font-size: 16px; }
	.offer-grid { grid-template-columns: 1fr; }
	.offer-grid > :last-child { aspect-ratio: 2 / 1; }
	.author-row { justify-content: flex-start; }
	.author-dot { flex: 0 0 104px; }
	.author-dot img { width: 88px; height: 88px; }
	.news-form { flex-direction: column; }
	.news-form input { flex: none; width: 100%; }
	.foot-cols { grid-template-columns: 1fr; gap: 26px; }
	.foot-call { font-size: 16px; }
	.gallery { padding: 24px; gap: 14px; }
	.pdp-reviews .rv-summary { grid-template-columns: 1fr; }
	.mini-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.mini-row > :nth-child(n+4) { display: none; }
	.cart-box { padding: 6px 16px; }
	.cart-row { position: relative; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "t i i" "t q s"; gap: 10px 14px; }
	.cart-row .cart-info { grid-area: i; padding-inline-end: 40px; }
	.cart-row .cart-thumb { grid-area: t; }
	.cart-row .qty { grid-area: q; justify-self: start; }
	.cart-row .cart-total { grid-area: s; }
	.cart-row .rm { position: absolute; top: 14px; inset-inline-end: -8px; }
	.nf-search { flex-direction: column; }
	.sec-head { align-items: center; }
	.tool-end .sort-label { display: none; }
	.select { min-width: 150px; }
	.to-top { bottom: 16px; inset-inline-end: 16px; }
	.kit-quick .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
	.why-grid { grid-template-columns: 1fr; }
	.facts { grid-template-columns: 1fr 1fr; }
	.hdr-actions { gap: 0; }
	.hdr-actions .icon-btn { width: 40px; height: 40px; }
	.listing .book-grid, .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.toolbar { gap: 10px; }
}

/* ================= ميزات المنصّة المعتمدة (SPEC، الملحق 8) ================= */

/* المدوّنة */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.pcard { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); transition: box-shadow .25s, border-color .25s; }
.band-gray .pcard { border-color: transparent; }
.pcard:hover { box-shadow: var(--shadow); }
.pcard-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint-2); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard:hover .pcard-media img { transform: scale(1.04); }
.pcard-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; }
.pcard-meta { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.pcard-meta .icon { width: 15px; height: 15px; }
.pcard h3 { font-size: 18px; font-weight: 700; line-height: 1.45; }
.pcard h3 a:hover { color: var(--primary-ink); }
.pcard-text { font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-head { margin-bottom: 30px; }
.blog-head .page-title { margin-top: 0; }
.blog-head p { margin-top: 6px; }
.post-grid + .pagination { margin-top: 40px; }
.post { max-width: 880px; padding-bottom: 60px; }
.post-head .page-title { margin-top: 0; line-height: 1.35; }
.post-head .pcard-meta { margin: 10px 0 24px; }
.post-hero { margin: 0; overflow: hidden; border-radius: var(--radius-lg); background: var(--tint-2); }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-body { padding-top: 32px; font-size: 18px; line-height: 1.95; }
.post-body p + p { margin-top: 18px; }

/* تطبيق المتجر في التذييل */
.foot-apps { margin-top: 26px; }
.foot-apps h3 { margin-bottom: 14px !important; }
.app-links { display: flex; flex-wrap: wrap; gap: 10px; }
.app-badge { display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 16px 0 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .25); transition: background .2s; }
.app-badge:hover { background: rgba(255, 255, 255, .16); }
.app-badge .icon { width: 22px; height: 22px; }
.app-badge span { display: grid; line-height: 1.15; }
.app-badge small { font-size: 11px; color: rgba(255, 255, 255, .85); }
.app-badge b { font-size: 15px; }

@media (max-width: 900px) {
	.post-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.post-grid::-webkit-scrollbar { display: none; }
	.post-grid > .pcard { flex: 0 0 min(78%, 360px); scroll-snap-align: start; }
	.blog-head + .post-grid { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
	.blog-head + .post-grid > .pcard { flex: none; }
}
@media (max-width: 600px) {
	.blog-head + .post-grid { grid-template-columns: 1fr; }
	.post-body { font-size: 16px; padding-top: 24px; }
}

/* ================= الإصدار الثاني: رفوف الأسبوع، وعرض الأسبوع، والنظرة السريعة، والهاتف ================= */

/* النظرة السريعة: تطفو على حافّة الغلاف بجانب المفضّلة، تظهر عند التحويم في الحاسوب ودائمًا في أجهزة اللمس، ولا تحجز مكانًا */
.bcard .qv {
	position: absolute; bottom: -18px; inset-inline-end: 60px; width: 38px; height: 38px; border: 0; z-index: 2;
	box-shadow: 0 3px 10px rgba(5, 7, 60, .16); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s, background .2s;
}
.bcard .qv .icon { width: 17px; height: 17px; }
.bcard:hover .qv, .bcard:focus-within .qv { opacity: 1; transform: none; }
.bcard .qv:hover { background: var(--tint); }
@media (hover: none) { .bcard .qv { opacity: 1; transform: none; } }
body[data-card-style="plain"] .bcard .qv { inset-inline-end: 58px; }

/* أعمدة صفّ الكتب ممتلئة دائمًا: لا صفّ أخير نصف فارغ بأيّ عددٍ في الصفّ */
.row-fit > :nth-child(n+5) { display: none; }
body[data-books-per-row="3"] .row-fit > :nth-child(n+4) { display: none; }
body[data-books-per-row="5"] .row-fit > :nth-child(5) { display: flex; }
.picks-grid > :nth-child(n+9) { display: none; }
body[data-books-per-row="3"] .picks-grid > :nth-child(9) { display: flex; }
body[data-books-per-row="5"] .picks-grid > :nth-child(n+9) { display: flex; }

.quick-sec .quick-card { border: 1px solid var(--line); }
.quick-sec .quick-card:hover { border-color: transparent; }
.featured + .deal { padding-top: 0; }

/* رفوف الأسبوع: تبويباتٌ كبسوليّة كوسوم صفحة الجولة في المرجع (القاعدة 16) */
.row-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: -14px 0 28px; }
.row-tab {
	display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 999px;
	border: 1px solid var(--line); background: var(--white); color: var(--store-text); font-weight: 500; font-size: 15px; transition: background .2s, border-color .2s, color .2s;
}
.row-tab:hover { border-color: var(--store-text); }
.row-tab[aria-selected="true"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--on-accent); }
.row-tab img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* عرض الأسبوع: كتابٌ واحد على كتلةٍ مستديرة كرسم الواجهة، وعدّادٌ بدوائر بيضاء */
.deal-panel {
	position: relative; overflow: hidden; background: var(--tint); border-radius: 28px; padding: 46px 56px;
	display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-areas: "art head" "art text" "art timer"; column-gap: 56px; row-gap: 18px; align-items: start;
}
.deal-panel > :not(.contour) { position: relative; z-index: 1; }
.deal-items, .deal-book { display: contents; }
.deal-head { grid-area: head; align-self: end; }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-ink); font-weight: 700; margin-bottom: 6px; }
.deal-art {
	grid-area: art; align-self: center; position: relative; display: grid; place-items: center; padding: 34px 20px;
	background: var(--tint-2); border-radius: 50% 50% 32px 50% / 46% 46% 32px 46%;
}
.deal-cover { display: block; width: min(230px, 70%); }
.deal-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 22px 44px rgba(5, 7, 60, .24); transition: transform .4s; }
.deal-cover:hover img { transform: translateY(-4px) rotate(-1deg); }
.deal-art .type-dot { position: absolute; top: 26px; inset-inline-start: 22%; width: 40px; height: 40px; }
.deal-art .type-dot .icon { width: 20px; height: 20px; }
.deal-badge { position: absolute; top: 30px; inset-inline-end: 18%; }
.deal-text { grid-area: text; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.deal-text h3 { font-size: clamp(26px, 2.6vw, 38px); font-weight: 800; line-height: 1.2; }
.deal-text h3 a:hover { color: var(--primary-ink); }
.deal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; color: var(--muted); }
.deal-desc { color: #2E3047; max-width: 600px; }
.deal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.countdown { grid-area: timer; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 18px; border-top: 1px dashed var(--tint-line); }
.countdown[hidden] { display: none; }
.cd-label { font-weight: 700; margin-inline-end: 6px; }
.cd-unit {
	width: 68px; height: 68px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm);
	display: grid; place-content: center; text-align: center; line-height: 1.1;
}
.cd-unit b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: var(--muted); }

/* بطاقات الشريط الملوّن: زرّ سلّةٍ صغير بإطارٍ أخضر، ظاهرٌ دائمًا */
.spot-add {
	display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; min-height: 40px; padding: 0 16px; border-radius: 999px;
	border: 1.5px solid var(--store-primary); background: var(--white); color: var(--primary-ink); font-weight: 700; font-size: 14px; transition: background .2s, color .2s;
}
.spot-add .icon { width: 17px; height: 17px; }
.spot-add:hover { background: var(--store-primary); color: var(--on-primary); }

/* صفحة التصنيف: عوامل التصفية المختارة، وتبديل الشبكة والقائمة */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 22px; }
.af-label { color: var(--muted); font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 8px 0 14px; border-radius: 999px; border: 1px solid var(--tint-line); background: var(--tint); font-size: 14px; font-weight: 500; }
.chip .icon { width: 14px; height: 14px; }
.chip:hover { border-color: var(--store-primary); }
.chip-clear { border: 0; background: none; color: var(--primary-ink); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; padding: 6px; }
.view-toggle { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.view-toggle .icon-btn { width: 38px; height: 38px; border: 0; }
.view-toggle .icon-btn[aria-pressed="true"] { background: var(--store-accent); color: var(--on-accent); }
.view-toggle .icon-btn[aria-pressed="true"] .icon { fill: none; }
.listing .book-grid.is-list { grid-template-columns: minmax(0, 1fr); }
.book-grid.is-list .bcard { flex-direction: row; gap: 22px; align-items: stretch; }
.book-grid.is-list .bcard-media { width: 150px; flex: none; }
.book-grid.is-list .bcard-body { padding: 10px 4px 6px; }
.book-grid.is-list .bcard-foot { justify-content: flex-start; flex-direction: row-reverse; }

/* صفحة الكتاب: اختيار الصيغة، وجدول تفاصيل النشر */
.formats-box { display: grid; gap: 8px; }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ [data-preview-copy])) { display: none; }
.formats-label { color: var(--muted); font-size: 14px; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.format-opt {
	display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1.5px solid var(--line); border-radius: var(--radius);
	text-align: center; background: var(--white); transition: border-color .2s;
}
.format-opt:hover { border-color: var(--store-text); }
.format-opt.is-current { border-color: var(--store-primary); background: var(--tint); }
.format-opt .type-dot { width: 26px; height: 26px; box-shadow: none; margin-bottom: 2px; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-name { font-weight: 700; font-size: 14px; }
.format-price { font-size: 13px; color: var(--muted); }
.spec-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 18px; border-top: 1px solid var(--line); }
.spec-list div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-list dt { color: var(--muted); }
.spec-list dd { margin: 0; font-weight: 700; text-align: end; }

/* صفحة المؤلّف: أعماله في مسارٍ أفقيّ بسهمين، فلا يبقى صفٌّ أخير نصف فارغ */
.works .track-dots { margin-top: 22px; }

@media (max-width: 1100px) {
	.hdr { gap: 12px; }
	.hdr-nav a, .hdr-nav .drop-btn { padding: 0 9px; }
	.hdr-actions .hdr-link, .cart-pill .label { display: none; }
	body .row-fit > :nth-child(n+4), body[data-books-per-row] .row-fit > :nth-child(n+4) { display: none; }
	body .picks-grid > :nth-child(9), body[data-books-per-row] .picks-grid > :nth-child(9) { display: flex; }
	body .picks-grid > :nth-child(10), body[data-books-per-row] .picks-grid > :nth-child(10) { display: none; }
	.deal-panel { padding: 38px; column-gap: 36px; }
	.cat-grid { --gap: 14px; }
	.spot-grid { grid-template-columns: repeat(3, minmax(0, 230px)); }
	.spot-card:nth-child(n) { grid-column: auto; grid-row: auto; align-self: stretch; }
	.cd-unit { width: 60px; height: 60px; }
}
@media (max-width: 900px) {
	.deal-panel { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "art" "text" "timer"; }
	.deal-head { align-self: start; }
	.deal-art { max-width: 420px; width: 100%; justify-self: center; }
}
@media (max-width: 767px) {
	/* شريط الثقة: صفٌّ واحد يُمرَّر بكبسولاتٍ صغيرة */
	.why { padding-block: 18px 6px; }
	.why .sec-head { display: none; }
	.why-grid { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px 6px; scroll-snap-type: x proximity; }
	.why-grid::-webkit-scrollbar { display: none; }
	.why-item { flex: none; display: flex; align-items: center; gap: 8px; background: var(--tint); border-radius: 999px; padding: 8px 16px 8px 12px; scroll-snap-align: start; }
	.why-ico { margin: 0; display: grid; }
	.why-ico .icon { width: 24px; height: 24px; stroke-width: 1.6; }
	.why-item h3 { font-size: 14.5px; margin: 0; white-space: nowrap; }
	.why-item p { display: none; }
	/* البحث في الواجهة: خانة الكلمة وزرٌّ دائريّ في صفٍّ واحد */
	.hero-search { flex-direction: row; align-items: center; border-radius: 999px; padding: 6px; padding-inline-start: 10px; }
	.hero-search .hs-field:nth-child(n+2) { display: none; }
	.hs-field { padding: 4px; }
	.hs-go { width: 50px; height: 50px; border-radius: 50%; margin-top: 0; }
	.hero-shell:not(:has(.hero)) .hero-search .hs-field:nth-child(n+2) { display: none; }
	/* التصنيفات بالصور والأقسام السريعة: مساراتٌ أفقيّة تُمرَّر */
	.section-flush-top { padding-top: 26px; }
	.cat-grid, .quick-grid { display: flex; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; margin-inline: -20px; padding: 2px 20px 6px; }
	.cat-grid::-webkit-scrollbar, .quick-grid::-webkit-scrollbar { display: none; }
	.cat-card { flex: 0 0 62%; scroll-snap-align: start; }
	.quick-card { flex: 0 0 132px; padding: 18px 10px 16px; scroll-snap-align: start; }
	.qc-ico { width: 60px; height: 60px; margin-bottom: 10px; }
	.qc-ico img { width: 36px; height: 36px; }
	.quick-card h3 { font-size: 15px; }
	.quick-sec, .picks { padding-block: 40px; }
	.sec-head { margin-bottom: 22px; }
	/* رفوف الأسبوع: ستّة كتبٍ في عمودين، والتبويبات صفٌّ يُمرَّر */
	body .picks-grid > :nth-child(n+7), body[data-books-per-row] .picks-grid > :nth-child(n+7) { display: none; }
	body .row-fit > :nth-child(4), body[data-books-per-row] .row-fit > :nth-child(4) { display: flex; }
	.row-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -8px -20px 20px; padding: 2px 20px; }
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tab { flex: none; min-height: 40px; padding: 0 16px; font-size: 14px; }
	/* الشريط الملوّن: بطاقاته الثلاث مسارٌ أفقيّ */
	.spot-grid { display: flex; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; margin-inline: -20px; padding: 10px 20px 20px; gap: 12px; }
	.spot-grid::-webkit-scrollbar { display: none; }
	.spot-card { flex: 0 0 62%; scroll-snap-align: start; }
	.bcard .qv { inset-inline-end: 52px; width: 36px; height: 36px; }
	.bcard-foot .price small { display: none; }
	.deal-panel { padding: 26px 18px; border-radius: 22px; row-gap: 14px; }
	.deal-art { padding: 20px 14px; }
	.deal-cover { width: 40%; }
	.deal-actions .btn { flex: 1 1 auto; }
	.countdown { gap: 8px; }
	.cd-label { flex: 0 0 100%; }
	.cd-unit { width: 58px; height: 58px; }
	.cd-unit b { font-size: 19px; }
	.spec-list { grid-template-columns: minmax(0, 1fr); }
	.tool-end { gap: 6px; }
	.book-grid.is-list .bcard-media { width: 104px; }
	.book-grid.is-list .bcard { gap: 12px; }
}

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