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

:root {
	--store-primary: #8C6A47;
	--store-primary-dark: #6F5236;
	--store-accent: #C19B76;
	--store-bg: #F8F8F8;
	--store-text: #1C1C1C;

	/* محايدات */
	--dark: #1C1C1C;
	--dark-2: #262626;
	--surface: #fff;
	--muted: #6B6B6B;
	--line: #E5E5E5;
	--frame: #D3D3D3;
	--on-dark: #BDBDBD;
	--stage: color-mix(in srgb, var(--store-accent) 22%, #EDEAE6);
	--gold: #D9A21B;
	--gold-off: #D8D2CA;
	--ok: #2E6B4A;

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

	--font: "Tajawal", system-ui, sans-serif;
	--head-h: 84px;
	--hero-h: min(100vh, 860px);
	--off: 26px;          /* إزاحة الإطار */
	--per-row: 4;
	--list-cols: 3;
}

body[data-books-per-row="3"] { --per-row: 3; --list-cols: 2; }
body[data-books-per-row="4"] { --per-row: 4; --list-cols: 3; }
body[data-books-per-row="5"] { --per-row: 5; --list-cols: 4; }
body[data-hero-height="medium"] { --hero-h: 620px; }

/* خيارات الإظهار */
body[data-show-trust-bar="false"] .trust-section,
body[data-show-reviews="false"] .reviews-section,
body[data-show-connect="false"] .connect { display: none; }

/* ------------------------------------------------------------------ الأساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15.5px;
	line-height: 1.75;
	color: var(--store-text);
	background: var(--surface);
	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; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 400; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 3px; }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 30px; }
.section { padding: 88px 0; }
.tone { background: var(--store-bg); }
.dark { background: var(--dark); color: #fff; }

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

/* ------------------------------------------------------------------ الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 26px; border: 1px solid transparent; border-radius: 0;
	font-size: 14px; font-weight: 500; word-spacing: .12em; white-space: nowrap;
	cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-primary); color: #fff; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-grey { background: var(--muted); color: #fff; }
.btn-grey:hover { background: #555; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; border-color: var(--dark); color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: #fff; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--dark); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.text-btn {
	display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none;
	color: var(--store-primary-dark); font-size: 13.5px; font-weight: 700; word-spacing: .12em; cursor: pointer;
}
.text-btn .icon { width: 17px; height: 17px; }
.text-btn:hover { color: var(--dark); }
.text-btn:disabled { color: var(--muted); cursor: not-allowed; }

.sq-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
	border: 0; background: var(--store-primary); color: #fff; cursor: pointer; transition: background .2s;
}
.sq-btn:hover { background: var(--store-primary-dark); }
.sq-light { background: #fff; color: var(--dark); border: 1px solid var(--line); }
.sq-light:hover { background: var(--store-bg); }
.sq-light[aria-pressed="true"] { color: #B4443A; }
.sq-light[aria-pressed="true"] .icon { fill: currentColor; }

.icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
	border: 0; background: none; color: inherit; cursor: pointer; position: relative;
}

/* ------------------------------------------------------------------ رأس القسم */
.kicker {
	display: inline-block; font-size: 13px; font-weight: 500; word-spacing: .35em;
	color: var(--store-primary-dark); margin-bottom: 10px;
}
.dark .kicker, .page-top .kicker, .site-footer .kicker { color: var(--store-accent); }
.sec-head { text-align: center; margin-bottom: 52px; }
.sec-title { font-size: 40px; font-weight: 300; color: var(--store-text); }
.dark .sec-title { color: #fff; }
.sec-rule { display: block; width: 46px; height: 1px; background: #C9C9C9; margin: 18px auto 0; }
.dark .sec-rule { background: #555; }
.sec-lead { max-width: 560px; margin: 18px auto 0; color: var(--muted); }
.sec-more { text-align: center; margin-top: 56px; }

/* ------------------------------------------------------------------ الإطار المزاح (توقيع القالب) */
.framed-media { position: relative; display: block; margin-block-start: var(--off); margin-inline-start: var(--off); }
.framed-media::before {
	content: ""; position: absolute; z-index: 0; pointer-events: none;
	inset-block: calc(var(--off) * -1) var(--off); inset-inline: calc(var(--off) * -1) var(--off);
	border: 1px solid var(--frame);
}
.framed-media > * { position: relative; z-index: 1; }
.framed-media img { width: 100%; }

/* ------------------------------------------------------------------ الرأس */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--dark); color: #fff; transition: background-color .25s, box-shadow .25s; }
/* فوق الغلاف العلويّ: شفّافٌ يعلو الصورة، ويبقى مثبّتًا ويصير داكنًا عند التمرير */
body:has(.over-top) .site-header { margin-bottom: calc(-1 * var(--head-h)); background: transparent; }
body.search-open:has(.over-top) .site-header { margin-bottom: calc(-1 * var(--head-h) - 58px); }
body:has(.over-top) .site-header.is-stuck { background: var(--dark); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.header-bar {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
	height: var(--head-h); padding-inline: 30px; max-width: 1440px; margin-inline: auto;
}
.hb-start { justify-self: start; }
.hb-end { justify-self: end; display: flex; align-items: center; gap: 6px; }
.menu-btn {
	display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; border: 0; background: none;
	color: #fff; font-size: 14px; font-weight: 500; cursor: pointer;
}
.brand {
	display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px;
	border: 1px solid rgba(255, 255, 255, .55); color: #fff;
}
.brand img { width: 34px; height: 34px; }
.brand-name { font-size: 19px; font-weight: 700; white-space: nowrap; }
.mini-count {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 17px; height: 17px; padding: 0 4px;
	display: grid; place-items: center; border-radius: 9px; background: #fff; color: var(--dark);
	font-size: 11px; font-weight: 700; line-height: 1;
}
.cart-btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; margin-inline-start: 8px;
	background: var(--store-primary); color: #fff; font-size: 14px; font-weight: 500; transition: background .2s;
}
.cart-btn:hover { background: var(--store-primary-dark); }
.cart-btn .icon { width: 18px; height: 18px; }
.cart-count {
	min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center;
	background: #fff; color: var(--dark); font-size: 12px; font-weight: 700; line-height: 1;
}
.header-search { display: none; gap: 8px; max-width: 640px; margin: 0 auto; padding: 0 30px 18px; }
.search-open .header-search { display: flex; }
.header-search input {
	flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .4);
	background: rgba(0, 0, 0, .55); color: #fff;
}
.header-search input::placeholder { color: #CFCFCF; }

/* الدرج */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.drawer {
	position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 100; width: min(360px, 88vw);
	background: var(--dark); color: #fff; padding: 22px 28px 30px; overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .35s ease, visibility .35s;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.drawer-head .brand { padding: 5px 12px; }
.drawer-head .brand img { width: 30px; height: 30px; }
.drawer-search { display: flex; border: 1px solid #444; margin-bottom: 20px; }
.drawer-search input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 0; background: transparent; color: #fff; }
.drawer-search input::placeholder { color: #A9A9A9; }
.drawer-nav { list-style: none; margin: 0 0 22px; padding: 0; }
.drawer-nav a { display: block; padding: 11px 0; border-bottom: 1px solid #333; font-size: 17px; font-weight: 300; }
.drawer-nav a:hover { color: var(--store-accent); }
.drawer-label { font-size: 13px; color: var(--store-accent); word-spacing: .3em; margin-bottom: 10px; }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.drawer-cats a { padding: 5px 12px; border: 1px solid #444; font-size: 14px; }
.drawer-cats a:hover { border-color: var(--store-accent); }
.drawer-contact { display: grid; gap: 10px; color: var(--on-dark); font-size: 14px; }
.drawer-contact a { display: flex; align-items: center; gap: 10px; }
.drawer-contact .icon { color: var(--store-accent); width: 18px; height: 18px; }

/* ------------------------------------------------------------------ الواجهة */
.hero { position: relative; height: var(--hero-h); min-height: 540px; background: var(--dark); overflow: hidden; color: #fff; }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.slides:not(.js-on) .slide:first-child, .slide.is-active { opacity: 1; visibility: visible; }
.slide-img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .42) 40%, rgba(0, 0, 0, .6)); }
.slide-copy {
	position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; padding: var(--head-h) 30px 60px; max-width: 900px; margin-inline: auto;
}
.slide-kicker { font-size: 14px; font-weight: 500; word-spacing: .4em; color: #fff; margin-bottom: 14px; }
.slide-title { font-size: 66px; font-weight: 300; line-height: 1.2; color: #fff; }
.slide-text { max-width: 560px; margin: 18px 0 30px; color: #E8E8E8; font-size: 16.5px; }
.slider-arrows { position: absolute; z-index: 2; inset-block-end: 40px; inset-inline-end: 40px; display: flex; }
.scroll-down { position: absolute; z-index: 2; bottom: 34px; left: 50%; transform: translateX(-50%); color: #fff; animation: bob 2.4s ease-in-out infinite; }
.scroll-down .icon { width: 26px; height: 26px; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* شريط البحث تحت الواجهة */
.finder-wrap { background: #fff; border-bottom: 1px solid var(--line); }
.finder { display: grid; grid-template-columns: 2fr 1fr 1fr auto; border-inline: 1px solid var(--line); }
.finder-cell { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 22px 30px; border-inline-start: 1px solid var(--line); min-width: 0; }
.finder-cell:first-child { border-inline-start: 0; }
.finder-cell label { font-size: 12.5px; color: var(--muted); word-spacing: .25em; }
.finder-cell input, .finder-cell select {
	width: 100%; border: 0; padding: 0; background: transparent; font-size: 21px; font-weight: 300; color: var(--store-text); outline-offset: 6px;
}
.finder-cell input::placeholder { color: #8A8A8A; }
.finder-go { align-items: center; }

/* ------------------------------------------------------------------ عن المتجر */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.about-title { font-size: 44px; font-weight: 300; margin-bottom: 22px; }
.about-lead { font-weight: 700; font-size: 17px; margin-bottom: 16px; }
.about-copy > p[data-slot] { color: var(--muted); margin-bottom: 30px; }

/* ------------------------------------------------------------------ التصنيفات المميّزة */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.cat-card { position: relative; display: block; padding-block-start: var(--off); padding-inline-start: var(--off); }
.cat-card::before {
	content: ""; position: absolute; inset-block: 0 70px; inset-inline: 0 var(--off);
	border: 1px solid var(--frame); pointer-events: none;
}
.cat-media, .cat-box { position: relative; display: block; }
.cat-media { overflow: hidden; aspect-ratio: 1; }
.cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.cat-card:hover .cat-media img { transform: scale(1.04); }
.cat-box { background: var(--store-bg); padding: 26px 28px 24px; }
.tone .cat-box { background: #fff; }
.cat-box h3 { font-size: 26px; font-weight: 300; margin-bottom: 8px; }
.cat-text { display: block; color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.cat-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--muted); }
.more-link { color: var(--store-primary-dark); font-weight: 700; word-spacing: .12em; }

/* ------------------------------------------------------------------ المزايا (شريط الثقة) */
.trust-section { padding: 46px 0; }
.adv-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.adv { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding-inline: 22px; border-inline-start: 1px solid #3A3A3A; }
.adv:first-child { border-inline-start: 0; padding-inline-start: 0; }
.adv-icon { color: var(--store-accent); flex: none; }
.adv-icon .icon { width: 30px; height: 30px; stroke-width: 1.2; }
.adv h3 { font-size: 16.5px; font-weight: 500; color: #fff; margin-bottom: 4px; }
.adv p { color: #A9A9A9; font-size: 13.5px; line-height: 1.65; }

/* ------------------------------------------------------------------ كتابٌ في الضوء */
.spot { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; padding: var(--off) var(--off) 30px; }
.spot::before { content: ""; position: absolute; inset: 0 var(--off); border: 1px solid var(--frame); pointer-events: none; }
.sp-item { display: contents; }
.sp-feature {
	grid-column: 1 / -1; grid-row: 1; display: none; grid-template-columns: 1.1fr 1fr;
	margin-inline: calc(var(--off) * -1); margin-bottom: 30px; background: #fff; position: relative;
}
.spot:not(.has-pick) .sp-item:first-child .sp-feature, .sp-item.is-active .sp-feature { display: grid; }
.sp-stage { position: relative; display: grid; place-items: center; padding: 56px 40px; background: var(--stage); min-height: 440px; }
.sp-cover { position: relative; display: block; width: 230px; box-shadow: 0 22px 40px rgba(0, 0, 0, .28); }
.sp-cover .type-dot { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; }
.sp-stage .badges { top: 22px; inset-inline-start: 22px; }
.sp-info { padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.sp-title { font-size: 34px; font-weight: 300; margin-bottom: 10px; }
.sp-rate { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sp-price { margin-bottom: 14px; }
.sp-price .price { font-size: 24px; }
.sp-desc { color: var(--muted); margin-bottom: 28px; }
.sp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-thumb {
	grid-row: 2; display: flex; align-items: center; gap: 16px; padding: 0; border: 0; background: none;
	text-align: start; cursor: pointer; color: var(--muted); font-size: 15px; font-weight: 700; line-height: 1.4;
}
.sp-thumb img { width: 58px; flex: none; opacity: .55; transition: opacity .25s; }
.sp-thumb[aria-pressed="true"] { color: var(--store-text); }
.sp-thumb[aria-pressed="true"] img, .sp-thumb:hover img { opacity: 1; }

/* تبويبات «كتابٌ في الضوء» (section.tabs، القاعدة 16) */
.sp-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 26px; margin: -24px 0 34px; }
.sp-tab { padding: 4px 0; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--store-primary-dark); font-size: 13.5px; font-weight: 700; word-spacing: .2em; cursor: pointer; transition: color .2s, border-color .2s; }
.sp-tab:hover { color: var(--dark); }
.sp-tab[aria-selected="true"] { color: var(--dark); border-bottom-color: currentColor; }

/* ------------------------------------------------------------------ الآراء في الشريط الذهبيّ */
.reviews-band { background: var(--store-accent); color: var(--dark); padding: 76px 0 64px; text-align: center; }
.rv-slides { display: grid; max-width: 820px; margin: 0 auto; }
.rv-slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.rv-slides:not(.js-on) .rv-slide:first-child, .rv-slide.is-active { opacity: 1; visibility: visible; }
.rv-stars { display: inline-flex; padding: 6px 12px; background: var(--dark); margin-bottom: 22px; }
.rv-text { margin: 0 0 20px; font-size: 25px; font-weight: 300; line-height: 1.7; color: var(--dark); }
.rv-who { font-size: 14px; font-weight: 700; word-spacing: .25em; color: var(--dark); }
.rv-dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.rv-dots button { width: 14px; height: 14px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.rv-dots button::before { content: ""; position: absolute; inset: 6px 0; background: rgba(28, 28, 28, .45); transition: background .2s; }
.rv-dots button[aria-current="true"] { width: 36px; }
.rv-dots button[aria-current="true"]::before { background: var(--dark); }

/* ------------------------------------------------------------------ النجوم والسعر والنوع والشارات */
.rating { display: inline-flex; vertical-align: middle; }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: var(--gold-off); }
.rv-stars .stars .off { color: #555; }
.rate-count { font-size: 13px; color: var(--muted); }
.price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--store-primary); }
.price del { color: var(--muted); font-weight: 400; font-size: .85em; }
.type-dot {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	color: #fff; box-shadow: 0 0 0 2px #fff; vertical-align: middle;
}
.type-dot .icon { width: 16px; height: 16px; }
.type-dot[data-type="print"] { background: var(--type-print); }
.type-dot[data-type="ebook"] { background: var(--type-ebook); }
.type-dot[data-type="audio"] { background: var(--type-audio); }
.type-dot[data-type="educational"] { background: var(--type-edu); }
.badges { position: absolute; z-index: 2; top: 0; inset-inline-start: 0; display: flex; flex-direction: column; }
.badge { display: flex; align-items: center; justify-content: center; white-space: nowrap; min-width: 52px; height: 46px; padding: 0 8px; font-size: 13.5px; font-weight: 700; line-height: 1; }
.badge-sale { background: var(--store-primary); color: #fff; }
.badge-new { background: var(--dark); color: #fff; height: 30px; }
.stock-band {
	position: absolute; z-index: 2; inset-inline: 0; top: 50%; transform: translateY(-50%);
	padding: 8px; background: #5E5E5E; color: #fff; text-align: center; font-size: 14px; font-weight: 700;
}

/* ------------------------------------------------------------------ بطاقة الكتاب */
.book-row { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 34px 30px; }
.book-card { position: relative; display: flex; flex-direction: column; padding-bottom: 22px; }
.book-card::before {
	content: ""; position: absolute; z-index: 0; inset-block: 32% 0; inset-inline: 22px;
	border: 1px solid var(--frame); pointer-events: none;
}
.bc-media { position: relative; z-index: 1; }
.bc-media::after {
	content: ""; position: absolute; z-index: 1; inset-block: 32% -1px; inset-inline: 22px;
	border: 1px solid rgba(255, 255, 255, .55); border-bottom: 0; pointer-events: none;
}
.bc-cover { display: block; overflow: hidden; background: var(--stage); }
.bc-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .6s ease; }
.book-card:hover .bc-cover img { transform: scale(1.03); }
.bc-media .type-dot { position: absolute; z-index: 2; inset-block-end: 12px; inset-inline-start: 12px; }
/* المفضّلة والنظرة السريعة تطفوان فوق الغلاف ولا تحجزان مكانًا */
.bc-tools { position: absolute; z-index: 3; top: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 6px; }
.bc-wish, .bc-quick {
	width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0;
	background: #fff; color: var(--dark); cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .14);
	opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s, color .2s;
}
.bc-quick { transition-delay: .04s; }
.bc-wish .icon, .bc-quick .icon { width: 18px; height: 18px; }
.bc-wish:hover, .bc-quick:hover { color: var(--store-primary-dark); }
.book-card:hover .bc-wish, .book-card:hover .bc-quick, .book-card:focus-within .bc-wish, .book-card:focus-within .bc-quick, .bc-wish[aria-pressed="true"] { opacity: 1; transform: none; }
.bc-wish[aria-pressed="true"] { color: #B4443A; }
.bc-wish[aria-pressed="true"] .icon { fill: currentColor; }
@media (hover: none) { .bc-wish, .bc-quick { opacity: 1; transform: none; } }
.is-out .bc-cover img { filter: grayscale(.8); opacity: .7; }
.bc-box { position: relative; z-index: 1; flex: 1; color: var(--store-text); display: flex; flex-direction: column; align-items: flex-start; margin-inline: 0; padding: 20px 24px 22px; background: #fff; }
.bc-author { font-size: 13px; font-weight: 500; color: var(--store-primary-dark); margin-bottom: 4px; }
.bc-title { font-size: 18.5px; font-weight: 500; line-height: 1.4; margin-bottom: 6px; }
.bc-title a:hover { color: var(--store-primary-dark); }
.bc-rate { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
/* صفّ السعر يُدفع إلى الأسفل لتتساوى الصفوف (البند 7)، وتحته زرّ السلّة الأصليّ: رابطٌ نصّيّ بأيقونة الحقيبة ظاهرٌ دائمًا */
.bc-buy { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: auto; }
.bc-buy .price { font-size: 16px; }
.bc-box .text-btn { min-height: 40px; margin-top: 2px; margin-bottom: -10px; }
/* شكل البطاقة */
body[data-card-style="boxed"] .book-card { padding-bottom: 0; border: 1px solid var(--line); background: #fff; }
body[data-card-style="boxed"] .book-card::before,
body[data-card-style="boxed"] .bc-media::after,
body[data-card-style="minimal"] .book-card::before,
body[data-card-style="minimal"] .bc-media::after { display: none; }
body[data-card-style="minimal"] .book-card { padding-bottom: 0; }
body[data-card-style="minimal"] .bc-box { background: transparent; padding-inline: 0; }
/* على الخلفيّة البيضاء يبقى الصندوق ظاهرًا بحدّ رفيع */
.section:not(.tone) .book-card .bc-box { box-shadow: inset 0 0 0 1px var(--line); }
body[data-card-style="minimal"] .section:not(.tone) .book-card .bc-box { box-shadow: none; }

/* صفٌّ واحد: ما زاد على عدد الكتب في الصفّ يُخفى، فلا يبقى صفٌّ ناقص */
@media (min-width: 641px) {
	body[data-books-per-row="3"] .one-row > :nth-child(n + 4),
	body[data-books-per-row="4"] .one-row > :nth-child(n + 5),
	body[data-books-per-row="5"] .one-row > :nth-child(n + 6) { display: none; }
}

/* ------------------------------------------------------------------ وصل حديثًا (دوّارٌ أفقيّ) */
.sec-head-split { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; text-align: start; margin-bottom: 40px; padding-bottom: 22px; border-bottom: 1px solid var(--frame); }
.sec-head-split .kicker { margin-bottom: 6px; }
.car-nav { display: flex; align-items: center; gap: 6px; }
.car-nav .text-btn { margin-inline-end: 16px; }
.car-nav .sq-btn:disabled { opacity: .4; cursor: default; }
.carousel-track {
	--gap: 30px; display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory;
	scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 2px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { flex: 0 0 calc((100% - var(--gap) * (var(--per-row) - 1)) / var(--per-row)); scroll-snap-align: start; }

/* أعمال المؤلّف: صفٌّ يُمرَّر أفقيًّا، فلا ينتهي بصفٍّ ناقص مهما كان عددها */
.works-grid.carousel-track > * { flex-basis: calc((100% - var(--gap) * 3) / 4); }

/* ------------------------------------------------------------------ عروض لفترةٍ محدودة */
.deal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 56px; align-items: center; }
.deal-info .sec-rule { margin: 18px 0 0; }
.deal-sub { color: var(--on-dark); margin: 18px 0 26px; }
.countdown { display: flex; gap: 8px; margin-bottom: 30px; }
.countdown[hidden] { display: none; }
.cd-unit { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 10px 6px 8px; border: 1px solid #4A4036; line-height: 1.2; }
.cd-unit b { font-size: 30px; font-weight: 300; color: #fff; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: var(--store-accent); margin-top: 4px; }
.deal-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.deal .book-card::before { border-color: #4A4036; }

/* ------------------------------------------------------------------ المؤلّفون */
.author-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 30px; }
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.author-ring { display: block; width: 100%; max-width: 160px; padding: 7px; border: 1px solid var(--store-primary); border-radius: 50%; margin-bottom: 16px; transition: padding .3s; }
.author-ring img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; width: 100%; }
.author-card:hover .author-ring { padding: 3px; }
.author-card b { font-size: 17px; font-weight: 500; }
.author-card small { font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------------ تابعنا والنشرة */
.connect { background: #fff; border-top: 1px solid var(--line); }
.section:not(.tone):not(.dark) + .connect { background: var(--store-bg); }
.connect .newsletter input { background: #fff; }
.connect-grid { display: grid; grid-template-columns: 1fr 1fr; }
.connect-col { padding: 60px 40px; text-align: center; }
.connect-col + .connect-col { border-inline-start: 1px solid var(--line); }
.connect h2 { font-size: 26px; font-weight: 300; margin-bottom: 6px; }
.connect p { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.social { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 10px; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); color: var(--dark); transition: background .2s, color .2s; }
.social a:hover { background: var(--store-primary); color: #fff; border-color: var(--store-primary); }
.newsletter { display: flex; max-width: 420px; margin: 0 auto; }
.newsletter input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 1px solid var(--line); border-inline-end: 0; background: var(--store-bg); }
.nl-btn { width: 56px; border: 0; background: var(--store-primary); color: #fff; display: grid; place-items: center; cursor: pointer; }
.nl-btn:hover { background: var(--store-primary-dark); }

/* ------------------------------------------------------------------ التذييل */
.site-footer { background: var(--dark); color: var(--on-dark); padding: 72px 0 0; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer-col h3 { font-size: 17px; font-weight: 500; color: #fff; margin-bottom: 20px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--store-accent); transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-contact b { color: #fff; font-weight: 500; }
.footer-bottom { border-top: 1px solid #333; padding: 24px 0; text-align: center; color: #A3A3A3; font-size: 13.5px; }

/* ------------------------------------------------------------------ رأس الصفحات الداخليّة */
.page-top { position: relative; background: var(--dark); color: #fff; text-align: center; padding: calc(var(--head-h) + 56px) 0 60px; overflow: hidden; }
.pt-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-top.has-img::after, .nf-hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.pt-inner { position: relative; z-index: 1; }
.pt-title { font-size: 48px; font-weight: 300; color: #fff; line-height: 1.25; }
.pt-lead { color: #DADADA; margin-top: 10px; }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 18px 0 0; padding: 0; font-size: 13.5px; color: #DADADA; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: #8E8E8E; }
.breadcrumb a:hover { color: var(--store-accent); }

/* ------------------------------------------------------------------ صفحة التصنيف */
.sub-section { padding: 46px 0 50px; background: #fff; }
.sub-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.sub-card { --off: 12px; position: relative; display: flex; align-items: center; gap: 18px; padding-block-start: var(--off); padding-inline-start: var(--off); }
.sub-media { position: relative; flex: none; width: 92px; }
.sub-media::before { content: ""; position: absolute; inset-block: calc(var(--off) * -1) var(--off); inset-inline: calc(var(--off) * -1) var(--off); border: 1px solid var(--frame); }
.sub-media img { position: relative; width: 100%; aspect-ratio: 1; object-fit: cover; }
.sub-name { display: block; font-size: 17px; font-weight: 500; }
.sub-card small { display: block; color: var(--muted); font-size: 13px; }
.sub-text { display: flex; flex-direction: column; line-height: 1.5; }
.sub-card:hover .sub-name { color: var(--store-primary-dark); }

.listing-main { min-width: 0; }
.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start; }
.filters { background: #fff; border: 1px solid var(--line); padding: 26px 24px; }
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.filters-head h2 { font-size: 20px; font-weight: 400; }
.filters-head .icon-btn { display: none; }
.filter-box { padding: 18px 0; border-bottom: 1px solid var(--line); }
.filter-box:last-of-type { border-bottom: 0; margin-bottom: 8px; }
.filter-box h3 { font-size: 13px; font-weight: 700; word-spacing: .3em; color: var(--store-primary-dark); margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--store-primary); margin: 0; }
.check .stars { margin-inline-end: 4px; }
.price-range { display: flex; align-items: center; gap: 8px; }
.field { height: 42px; padding: 0 12px; border: 1px solid var(--line); background: #fff; border-radius: 0; min-width: 0; }
.price-range .field { width: 100%; }
textarea.field { height: auto; padding: 12px; width: 100%; resize: vertical; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); }
.toolbar-plain { background: var(--store-bg); }
.toolbar p { color: var(--muted); font-size: 14.5px; }
.toolbar b { color: var(--store-text); }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.filters-toggle { display: none; }
.view-switch { display: inline-flex; border: 1px solid var(--line); }
.view-switch button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; background: #fff; color: var(--muted); cursor: pointer; }
.view-switch button + button { border-inline-start: 1px solid var(--line); }
.view-switch button[aria-pressed="true"] { background: var(--dark); color: #fff; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -14px 0 28px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--frame); background: #fff; font-size: 13.5px; }
.chip .icon { width: 14px; height: 14px; color: var(--muted); }
.chip:hover { border-color: var(--store-primary); }
.chip-clear { font-size: 13.5px; font-weight: 700; color: var(--store-primary-dark); text-decoration: underline; text-underline-offset: 3px; }
/* عرض القائمة: الغلاف بجانب البيانات */
.listing-grid.is-list { grid-template-columns: 1fr; gap: 18px; }
.listing-grid.is-list .book-card { flex-direction: row; padding-bottom: 0; background: #fff; border: 1px solid var(--line); }
.listing-grid.is-list .book-card::before, .listing-grid.is-list .bc-media::after { display: none; }
.listing-grid.is-list .bc-media { flex: 0 0 150px; }
.listing-grid.is-list .bc-box { padding: 22px 26px; box-shadow: none; }
.listing-grid.is-list .bc-buy { max-width: 340px; }
.listing-grid { display: grid; grid-template-columns: repeat(var(--list-cols), minmax(0, 1fr)); gap: 34px 26px; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 52px; }
.pagination a, .pagination span {
	display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 6px;
	border: 1px solid var(--line); background: #fff; font-size: 14.5px;
}
.pagination a:hover { border-color: var(--store-primary); color: var(--store-primary-dark); }
.pagination [aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.pagination .gap { border-color: transparent; background: transparent; }
.pagination .icon { width: 18px; height: 18px; }
.filters-backdrop { display: none; }

/* ------------------------------------------------------------------ صفحات الكتاب */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 70px; align-items: start; }
@media (min-width: 861px) { .pdp .gallery { position: sticky; top: calc(var(--head-h) + 24px); } }
.gallery-main .gm-stage { position: relative; display: grid; place-items: center; padding: 56px 40px; background: var(--stage); }
.gm-stage img { width: min(300px, 100%); box-shadow: 0 24px 44px rgba(0, 0, 0, .3); }
.gm-stage .type-dot { position: absolute; inset-block-end: 22px; inset-inline-start: 22px; width: 36px; height: 36px; }
.thumbs { display: flex; gap: 12px; margin-top: 20px; margin-inline-start: var(--off); }
.thumbs button { width: 66px; padding: 0; border: 1px solid var(--line); background: #fff; cursor: pointer; opacity: .6; }
.thumbs button[aria-pressed="true"] { opacity: 1; border-color: var(--store-primary); }
.buy-box { background: #fff; padding: 42px 44px; border: 1px solid var(--line); }
.pdp-type { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.pdp-type .type-dot { width: 26px; height: 26px; box-shadow: none; }
.pdp-type .type-dot .icon { width: 14px; height: 14px; }
.pdp-title { font-size: 38px; font-weight: 300; margin-bottom: 8px; }
.pdp-author { color: var(--muted); margin-bottom: 10px; }
.pdp-author a { color: var(--store-primary-dark); font-weight: 700; }
.pdp-rating { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.price-lg { font-size: 28px; margin-bottom: 16px; }
.pdp-lead { color: var(--muted); margin-bottom: 22px; }
.pdp-options { display: grid; gap: 14px; padding: 20px 0; border-block: 1px solid var(--line); margin-bottom: 22px; }
.opt { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.opt-label { min-width: 110px; font-size: 14px; font-weight: 700; }
.opt-value { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); font-size: 14.5px; }
.opt-value .icon { width: 17px; height: 17px; color: var(--store-primary-dark); }
.qty { display: inline-flex; border: 1px solid var(--line); background: #fff; }
.qty button { width: 40px; height: 42px; border: 0; background: none; font-size: 18px; cursor: pointer; }
.qty button:hover { background: var(--store-bg); }
.qty input { width: 52px; height: 42px; border: 0; border-inline: 1px solid var(--line); text-align: center; -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: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pdp-buttons .sq-btn { width: 52px; height: 52px; }
.stock { display: flex; align-items: center; gap: 8px; color: var(--ok); font-size: 14px; font-weight: 500; margin-bottom: 20px; }
/* اختيار الصيغة (book.formats): يُخفى إن لم يكن للعنوان غير صيغةٍ واحدة */
.formats-box { margin-bottom: 22px; }
.formats-box:not(:has([data-repeat="format"] ~ .format-opt)) { display: none; }
.formats-label { display: block; font-size: 13px; font-weight: 700; word-spacing: .2em; color: var(--store-primary-dark); margin-bottom: 8px; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.format-opt { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; line-height: 1.35; transition: border-color .2s; }
.format-opt .type-dot { grid-row: span 2; width: 26px; height: 26px; box-shadow: none; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-name { font-size: 14px; font-weight: 500; }
.format-price { font-size: 13px; color: var(--muted); }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt[aria-current="page"] { border-color: var(--store-primary); box-shadow: inset 0 0 0 1px var(--store-primary); }
.format-opt[aria-current="page"] .format-price { color: var(--store-primary-dark); font-weight: 700; }
/* التوصيل والدفع */
.perks { list-style: none; margin: 0 0 22px; padding: 14px 16px; display: grid; gap: 8px; background: var(--store-bg); font-size: 14px; }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks .icon { width: 18px; height: 18px; color: var(--store-primary-dark); }
.stock .icon { width: 18px; height: 18px; }
.pdp-meta { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
.pdp-meta div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pdp-meta dt { font-size: 12.5px; color: var(--muted); }
.pdp-meta dd { margin: 0; font-weight: 500; }
.sample-box { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--dark); color: #fff; margin-bottom: 20px; }
.sample-play { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border: 0; background: var(--store-primary); color: #fff; cursor: pointer; }
.sample-info { display: flex; flex-direction: column; line-height: 1.4; }
.sample-info span { font-size: 13px; color: var(--on-dark); }
.wave { display: flex; align-items: center; gap: 3px; margin-inline-start: auto; }
.wave span { width: 3px; background: var(--store-accent); }

.about-book { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 70px; }
.prose h2 { font-size: 32px; font-weight: 300; margin-bottom: 18px; }
.prose p { color: #4A4A4A; margin-bottom: 14px; }
.spec { background: var(--store-bg); padding: 34px 32px; }
.spec-title { font-size: 22px; font-weight: 300; margin-bottom: 14px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { padding: 10px 0; border-bottom: 1px solid #DCDCDC; text-align: start; vertical-align: top; }
.spec-table th { width: 42%; color: var(--muted); font-weight: 400; }

.pdp-reviews { text-align: start; padding: 80px 0; }
.pr-head { text-align: center; margin-bottom: 40px; }
.pr-head .kicker { color: var(--dark); }
.pr-title { font-size: 38px; font-weight: 300; margin-bottom: 14px; }
.pr-summary { display: inline-flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 500; }
.pr-summary strong { font-size: 34px; font-weight: 300; }
.pr-summary .rv-stars { margin: 0; }
.pr-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.pr-list { display: grid; gap: 14px; }
.rv-card { background: #fff; padding: 22px 26px; }
.rv-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.rv-card .rv-stars { margin: 0; padding: 4px 9px; }
.rv-card p { margin-bottom: 6px; }
.rv-card small { color: var(--muted); font-size: 13px; }
.review-form { background: #fff; padding: 28px 28px 30px; }
.review-form h3 { font-size: 21px; font-weight: 400; margin-bottom: 4px; }
.review-form p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; border: 0; padding: 0; margin: 0 0 14px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: var(--gold-off); }
.star-input label .icon { width: 26px; height: 26px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--dark); }
.review-form textarea { margin-bottom: 14px; display: block; }

/* ------------------------------------------------------------------ صفحة المؤلّف */
.author-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 80px; align-items: center; }
.author-photo img { aspect-ratio: 1; object-fit: cover; }
.author-name { font-size: 48px; font-weight: 300; margin-bottom: 6px; }
.author-count { color: var(--store-primary-dark); font-weight: 700; margin-bottom: 18px; }
.author-bio p { color: #4A4A4A; margin-bottom: 12px; }

/* ------------------------------------------------------------------ السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: start; }
.cart-head, .cart-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) 120px 140px 120px 40px; gap: 18px; align-items: center; }
.cart-head span:first-child { grid-column: span 2; }
.cart-head { padding: 0 22px 12px; font-size: 13px; color: var(--muted); }
.cart-list { background: #fff; border: 1px solid var(--line); }
.cart-item { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.ci-cover { position: relative; display: block; }
.ci-cover img { aspect-ratio: 2 / 3; object-fit: cover; }
.ci-cover .type-dot { position: absolute; width: 24px; height: 24px; inset-block-end: -6px; inset-inline-start: -6px; }
.ci-cover .type-dot .icon { width: 13px; height: 13px; }
.ci-info h3 { font-size: 17px; font-weight: 500; }
.ci-info p { color: var(--muted); font-size: 14px; }
.ci-type { font-size: 12.5px; color: var(--store-primary-dark); font-weight: 500; }
.ci-price small, .ci-total small { display: none; font-size: 12px; color: var(--muted); }
.ci-total b { font-weight: 700; }
.ci-remove { color: var(--muted); }
.ci-remove:hover { color: #B4443A; }
.cart-under { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.empty-cart { text-align: center; background: #fff; border: 1px solid var(--line); padding: 50px 24px; }
.empty-cart .adv-icon { display: inline-block; color: var(--store-primary); margin-bottom: 10px; }
.empty-cart h2 { font-size: 26px; font-weight: 300; margin-bottom: 6px; }
.empty-cart p { color: var(--muted); margin-bottom: 20px; }
.summary { background: var(--dark); color: #fff; padding: 32px 30px; }
.summary h2 { font-size: 24px; font-weight: 300; margin-bottom: 20px; }
.coupon { display: flex; margin-bottom: 12px; }
.coupon .field { flex: 1; background: transparent; border-color: #555; color: #fff; }
.coupon .field::placeholder { color: #A9A9A9; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px; color: #CFCFCF; padding: 10px 12px; border: 1px dashed #555; margin-bottom: 14px; }
.coupon-applied button { border: 0; background: none; color: var(--store-accent); cursor: pointer; text-decoration: underline; padding: 0; font-size: 13.5px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #333; font-size: 14.5px; color: #DADADA; }
.summary-row b { color: #fff; font-weight: 500; }
.summary-total { border-bottom: 0; padding: 16px 0 22px; font-size: 18px; color: #fff; }
.summary-total span:last-child { color: var(--store-accent); font-size: 24px; font-weight: 700; }
.note { margin-top: 14px; font-size: 13px; color: #A9A9A9; text-align: center; }

/* ------------------------------------------------------------------ 404 */
.nf-hero { position: relative; overflow: hidden; background: var(--dark); color: #fff; text-align: center; padding: calc(var(--head-h) + 70px) 0 90px; }
.nf-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.nf-code { font-size: 170px; font-weight: 300; line-height: 1; color: var(--store-accent); }
.nf-title { font-size: 38px; font-weight: 300; margin: 10px 0 12px; }
.nf-text { color: #DADADA; max-width: 520px; margin-bottom: 28px; }
.nf-search { display: flex; width: min(520px, 100%); margin-bottom: 18px; }
.nf-search input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 0; background: #fff; color: var(--dark); }
.nf-search .btn { min-height: 48px; }

/* ------------------------------------------------------------------ صفحة المكوّنات */
.kit-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.kit-block { background: #fff; border: 1px solid var(--line); padding: 30px 32px; }
.kit-title { font-size: 22px; font-weight: 400; margin-bottom: 8px; }
.kit-note { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.kit-row > b { min-width: 120px; }
.kit-dark { background: var(--dark); color: #fff; padding: 22px; margin-top: 10px; }
.kit-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.kit-frame { max-width: 320px; padding: 6px 0 10px; }
.kit-block .sec-head { margin-bottom: 30px; }
.kit-reviews { background: var(--store-accent); padding: 20px; }
.swatches { display: flex; flex-wrap: wrap; gap: 16px; }
.swatch { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.swatch span { width: 120px; height: 64px; border: 1px solid var(--line); }

/* ------------------------------------------------------------------ العروض */
/* ------------------------------------------------------------------ الأخبار (latest_posts، post.*) */
.post-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 30px; }
.post-card { position: relative; display: flex; flex-direction: column; padding-bottom: 22px; }
.post-card::before { content: ""; position: absolute; z-index: 0; inset-block: 30% 0; inset-inline: 22px; border: 1px solid var(--frame); pointer-events: none; }
.pc-media { position: relative; z-index: 1; display: block; overflow: hidden; background: var(--stage); }
.pc-media::after { content: ""; position: absolute; inset-block: 12% -1px; inset-inline: 22px; border: 1px solid rgba(255, 255, 255, .55); border-bottom: 0; pointer-events: none; }
.pc-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s ease; }
.post-card:hover .pc-media img { transform: scale(1.03); }
.pc-box { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 22px 26px 24px; background: #fff; }
.pc-meta { font-size: 13px; font-weight: 500; color: var(--store-primary-dark); margin-bottom: 6px; word-spacing: .12em; }
.pc-title { font-size: 19px; font-weight: 500; line-height: 1.45; margin-bottom: 8px; }
.pc-title a:hover { color: var(--store-primary-dark); }
.pc-excerpt { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.pc-box .text-btn { margin-top: auto; }
.article { max-width: 820px; margin-inline: auto; background: #fff; padding: 26px 26px 34px; }
.article-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-body { margin: 28px 10px 0; font-size: 17px; line-height: 2; }
.article-body p + p { margin-top: 16px; }
.article-back { margin: 26px 10px 0; }

@media (max-width: 1180px) {
	.slide-title { font-size: 54px; }
	.adv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 30px; }
	.adv:nth-child(3n + 1) { border-inline-start: 0; padding-inline-start: 0; }
	.deal-grid { grid-template-columns: 1fr; gap: 36px; }
	.deal-info { display: grid; grid-template-columns: auto 1fr; column-gap: 40px; align-items: center; }
	.deal-info > :not(.countdown):not(.btn) { grid-column: 1; }
	.deal-info .countdown { grid-column: 2; grid-row: 1 / span 3; justify-self: end; margin: 0; }
	.deal-info .btn { grid-column: 2; grid-row: 4; justify-self: end; }
	.deal-sub { margin-bottom: 0; }
	.author-row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
	.cart-head { display: none; }
	.cart-item { grid-template-columns: 70px minmax(0, 1fr) auto auto; grid-template-areas: "c i i x" "c p q t"; row-gap: 10px; }
	.ci-cover { grid-area: c; } .ci-info { grid-area: i; } .ci-price { grid-area: p; } .qty { grid-area: q; }
	.ci-total { grid-area: t; text-align: end; } .ci-remove { grid-area: x; }
	.ci-price small, .ci-total small { display: block; }
	.cart-item .qty { justify-self: start; }
}

@media (max-width: 1024px) {
	body[data-books-per-row] { --per-row: 3; }
	body[data-books-per-row] .one-row > :nth-child(n + 4) { display: none; }
	.works-grid.carousel-track > * { flex-basis: calc((100% - var(--gap) * 2) / 3); }
	.section { padding: 72px 0; }
	.about-grid, .pdp, .about-book, .author-grid { gap: 50px; }
	.sp-feature { grid-template-columns: 1fr 1fr; }
	.sp-info { padding: 40px 34px; }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 100; width: min(340px, 88vw);
		overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head .icon-btn, .filters-toggle { display: inline-flex; }
	.listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cart-layout { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.sub-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
	.post-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-row.scroller > :nth-child(3) { display: none; }
}
@media (max-width: 860px) {
	:root { --off: 18px; --head-h: 72px; }
	.container { padding-inline: 24px; }
	.header-bar { padding-inline: 20px; grid-template-columns: auto auto 1fr; }
	.hb-end { justify-self: end; }
	.menu-btn { min-width: 40px; min-height: 40px; }
	.cart-word, .menu-word { display: none; }
	.finder { grid-template-columns: 1fr 1fr; }
	.finder-q { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
	.finder-cell:nth-child(2) { border-inline-start: 0; }
	.finder-go { grid-column: 1 / -1; border-inline-start: 0; border-top: 1px solid var(--line); }
	.finder-go .btn { width: 100%; }
	.about-grid, .pdp, .about-book, .author-grid { grid-template-columns: 1fr; }
	.about-media { max-width: 560px; }
	.author-grid .author-photo { max-width: 320px; }
	.cat-grid { gap: 26px; }
	.cat-box { padding: 20px; }
	.cat-box h3 { font-size: 22px; }
	.cat-text { display: none; }
	.sp-feature { grid-template-columns: 1fr; }
	.sp-stage { min-height: 0; padding: 40px; }
	.sp-cover { width: 190px; }
	.pr-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	:root { --off: 14px; --head-h: 64px; }
	body { font-size: 15px; }
	.container { padding-inline: 16px; }
	.section { padding: 56px 0; }
	.header-bar { padding-inline: 12px; gap: 6px; }
	.brand { padding: 5px 10px; gap: 7px; }
	.brand img { width: 26px; height: 26px; }
	.brand-name { font-size: 15px; }
	.hb-end { gap: 0; }
	.wish-link { display: none; }
	.cart-btn { padding: 0 10px; margin: 0; min-height: 38px; }
	.header-search { padding: 0 12px 14px; }
	body.search-open:has(.over-top) .site-header { margin-bottom: calc(-1 * var(--head-h) - 54px); }
	.hero { height: 560px; min-height: 0; }
	body[data-hero-height="medium"] .hero { height: 460px; }
	.slide-copy { padding: var(--head-h) 20px 80px; }
	.slide-title { font-size: 36px; }
	.slide-text { font-size: 15px; margin: 12px 0 22px; }
	.slider-arrows { inset-block-end: 20px; inset-inline-end: 16px; }
	.sq-btn { width: 40px; height: 40px; }
	.scroll-down { display: none; }
	/* البحث في الهاتف: خانة الكلمة وزرّها في صفٍّ واحد */
	.finder { grid-template-columns: minmax(0, 1fr) auto; border-inline: 0; }
	.finder-cell { padding: 12px 0; border-inline-start: 0; }
	.finder-q { grid-column: auto; border-bottom: 0; }
	.finder-cell:not(.finder-q):not(.finder-go) { display: none; }
	.finder-go { grid-column: auto; border-top: 0; padding-inline-start: 10px; }
	.finder-go .btn { width: auto; padding: 0 16px; }
	.finder-cell input { font-size: 17px; }
	.sec-head { margin-bottom: 34px; }
	.sec-title, .about-title, .pr-title { font-size: 30px; }
	.pt-title, .author-name { font-size: 34px; }
	.page-top { padding: calc(var(--head-h) + 34px) 0 40px; }
	.cat-card::before { inset-block-end: 60px; }
	.cat-grid.scroller > * { flex-basis: 78%; }
	.cat-box { padding: 16px 18px; }
	.cat-text { display: none; }
	.trust-section { padding: 22px 0; }
	.adv-grid.scroller { gap: 0; padding-bottom: 4px; }
	.adv-grid.scroller > * { flex: 0 0 auto; max-width: 70%; }
	.adv { flex-direction: row; align-items: center; gap: 10px; padding-inline: 16px; border-inline-start: 1px solid #3A3A3A; }
	.adv:nth-child(3n + 1) { border-inline-start: 1px solid #3A3A3A; padding-inline-start: 16px; }
	.adv:first-child { border-inline-start: 0; padding-inline-start: 0; }
	.adv-icon .icon { width: 24px; height: 24px; }
	.adv h3 { font-size: 14.5px; margin: 0; white-space: nowrap; }
	.adv p { display: none; }
	.sec-head-split { margin-bottom: 26px; padding-bottom: 16px; }
	.car-nav .sq-btn { display: none; }
	.car-nav .text-btn { margin: 0; }
	.carousel-track { --gap: 16px; padding-bottom: 8px; }
	.carousel-track > *, .works-grid.carousel-track > * { flex-basis: 62%; }
	.deal-info { display: block; }
	.deal-info .countdown, .deal-info .btn { justify-self: stretch; }
	.deal-info .countdown { margin: 0 0 22px; }
	.cd-unit { min-width: 0; flex: 1; }
	.cd-unit b { font-size: 24px; }
	.deal-row.scroller > * { flex-basis: 66%; }
	.active-filters { margin-top: -18px; }
	.listing-grid.is-list .bc-media { flex-basis: 110px; }
	.listing-grid.is-list .bc-box { padding: 14px 14px; }
	.spot { padding: var(--off) var(--off) 20px; column-gap: 10px; }
	.sp-stage { padding: 30px 20px; }
	.sp-cover { width: 150px; }
	.sp-info { padding: 26px 20px 28px; }
	.sp-title { font-size: 26px; }
	.sp-thumb { justify-content: center; }
	.sp-thumb-title { display: none; }
	.sp-thumb img { width: 100%; max-width: 60px; }
	.rv-text { font-size: 19px; }
	.reviews-band { padding: 56px 0 48px; }
	.book-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
	.book-row:not(.scroller) .bc-box, .carousel-track .bc-box, .scroller .bc-box { padding: 14px 14px 16px; }
	.book-row:not(.scroller) .bc-title { font-size: 16px; }
	.bc-buy .price { font-size: 15px; }
	/* صفوف الكتب شريطٌ يُمرَّر أفقيًّا */
	.scroller { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding-bottom: 8px; scrollbar-width: thin; }
	.scroller > * { flex: 0 0 66%; scroll-snap-align: start; }
	.author-row.scroller > * { flex-basis: 38%; }
	.post-row.scroller > * { flex-basis: 84%; }
	.post-row.scroller > :nth-child(3) { display: flex; }
	.post-row--blog { grid-template-columns: 1fr; }
	.article { padding: 14px 14px 24px; }
	.article-body { font-size: 16px; margin-inline: 4px; }
	.sp-tabs { margin-top: -14px; gap: 6px 18px; }
	.sub-row.scroller > * { flex-basis: 74%; }
	.listing-grid:not(.is-list), .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
	.listing-grid .bc-box, .works-grid .bc-box { padding: 14px 12px 16px; }
	.listing-grid .bc-title, .works-grid .bc-title { font-size: 16px; }
	.listing-grid .book-card::before, .works-grid .book-card::before, .listing-grid .bc-media::after, .works-grid .bc-media::after { inset-inline: 12px; }
	.connect-grid { grid-template-columns: 1fr; }
	.connect-col { padding: 44px 0; }
	.connect-col + .connect-col { border-inline-start: 0; border-top: 1px solid var(--line); }
	.footer-grid { grid-template-columns: 1fr; gap: 30px; }
	.buy-box { padding: 28px 20px; }
	.pdp-title { font-size: 30px; }
	.gallery-main .gm-stage { padding: 34px 20px; }
	.pdp-meta { grid-template-columns: 1fr; }
	.opt-label { min-width: 0; width: 100%; }
	.pdp-buttons .btn { flex: 1 1 100%; }
	.pdp-buttons .btn-dark { flex: 1 1 0; }
	.sample-box .wave { display: none; }
	.spec { padding: 24px 20px; }
	.rv-card { padding: 18px; }
	.review-form { padding: 22px 18px; }
	.cart-item { padding: 16px 14px; column-gap: 12px; grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "c i x" "c p p" "q q t"; }
	.summary { padding: 26px 20px; }
	.nf-code { font-size: 110px; }
	.nf-title { font-size: 28px; }
	.kit-block { padding: 22px 16px; }
	.toolbar { padding: 12px; }
	.toolbar p { width: 100%; }
	.toolbar-actions { width: 100%; }
	.toolbar-actions .field { flex: 1; min-width: 0; }
}

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

/* تبويبات صفّ الكتب (القاعدة 16): يختفي الشريط إن لم يختر الناشر غير مصدرٍ واحد */
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

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