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

:root {
	--store-primary: #0F766E;
	--store-primary-dark: #115E59;
	--store-accent: #4A43C4;
	--store-bg: #FFFFFF;
	--store-text: #05073C;

	/* مشتقّات: خلفيّاتٌ فاتحة من اللون الأساسيّ، ونصٌّ ملوّن أغمق منه */
	--tint: color-mix(in srgb, var(--store-primary) 8%, #fff);
	--tint-2: color-mix(in srgb, var(--store-primary) 16%, #fff);
	--ink-primary: color-mix(in srgb, var(--store-primary-dark), #000 12%);
	--ink-accent: color-mix(in srgb, var(--store-accent), #000 12%);

	/* محايدات */
	--muted: #5F6170;
	--body-2: #3A3C4E;
	--line: #E6E6EE;
	--soft: #F5F5F8;
	--gold: #F2A91E;
	--sale: #B42318;
	--ok: #1D7A46;

	--radius: 12px;
	--hdr-h: 76px;
	--gap: 22px;
	--per: 4;
	--shadow: 0 14px 38px rgba(5, 7, 60, .08);
}

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

/* ------------------------------------------------------------------ أساس */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	font-family: "Tajawal", system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.7;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.container { width: min(100% - 40px, 1290px); margin-inline: auto; }
.muted { color: var(--muted); }

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

/* ------------------------------------------------------------------ الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 46px; padding: 0 22px; border-radius: var(--radius);
	border: 1.5px solid transparent; font-weight: 700; font-size: 15px;
	cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
	white-space: nowrap;
}
.btn-primary { background: var(--store-primary); color: #fff; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-outline { background: #fff; border-color: var(--store-text); color: var(--store-text); }
.btn-outline:hover { background: var(--store-text); color: #fff; }
.btn-accent { background: var(--store-accent); color: #fff; }
.btn-accent:hover { background: var(--ink-accent); }
.btn-light { background: var(--soft); color: var(--store-text); }
.btn-light:hover { background: var(--line); }
.btn-lg { height: 54px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.icon-btn {
	position: relative; display: inline-grid; place-items: center;
	width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent;
	cursor: pointer; transition: background .2s;
}
.icon-btn:hover { background: rgba(5, 7, 60, .06); }
.icon-btn .count {
	position: absolute; top: 0; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 999px; background: var(--store-accent); color: #fff;
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.round-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--line); background: #fff; color: var(--store-text); cursor: pointer;
	transition: background .2s, color .2s, opacity .2s;
}
.round-btn:hover { background: var(--store-text); color: #fff; }
.round-btn:disabled { opacity: .35; cursor: default; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14.5px; white-space: nowrap; }
.see-all:hover { color: var(--ink-primary); }
.see-all.center { display: flex; justify-content: center; margin-top: 4px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--sale); font-weight: 700; cursor: pointer; }

/* ------------------------------------------------------------------ الرأس */
.site-header { position: sticky; top: 0; z-index: 60; transition: background .25s, box-shadow .25s; }
.site-header.is-stuck, body.search-open .site-header { background: #fff; box-shadow: 0 6px 24px rgba(5, 7, 60, .08); }
.hdr { display: flex; align-items: center; gap: 26px; height: var(--hdr-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; white-space: nowrap; }
.brand img { width: 40px; height: 40px; }
.hdr-nav { margin-inline: auto; }
.hdr-nav > ul { display: flex; align-items: center; gap: 2px; }
.hdr-nav a, .drop-btn {
	display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 10px;
	font-size: 15px; font-weight: 500; background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.hdr-nav a:hover, .drop-btn:hover { color: var(--ink-primary); }
.drop-btn .icon { width: 16px; height: 16px; transition: transform .2s; }
.has-drop { position: relative; }
.drop {
	position: absolute; top: 100%; inset-inline-start: 0; min-width: 220px; padding: 8px;
	background: #fff; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-drop:hover .drop, .has-drop.open .drop { opacity: 1; visibility: visible; transform: none; }
.has-drop.open .drop-btn .icon { transform: rotate(180deg); }
.drop a { display: block; padding: 8px 12px; border-radius: 8px; }
.drop a:hover { background: var(--tint); }
.hdr-actions { display: flex; align-items: center; gap: 8px; }
.hdr-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.hdr-link:hover { color: var(--ink-primary); }
.cart-btn {
	display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 0;
	padding-inline: 16px 8px; border: 1.5px solid var(--store-text); border-radius: 999px;
	font-weight: 700; font-size: 14.5px; background: transparent; transition: background .2s, color .2s;
}
.cart-btn:hover { background: var(--store-text); color: #fff; }
.cart-num {
	min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
	background: var(--store-primary); color: #fff; font-size: 12.5px; line-height: 26px; text-align: center;
}
.menu-btn { display: none; }
.m-search { display: none; background: #fff; padding: 4px 0 14px; }
body.search-open .m-search { display: block; }
.m-search-in { display: flex; gap: 8px; }
.m-search input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; background: #fff; }
.m-search .btn { width: 52px; padding: 0; }

/* الدرج الجانبيّ */
.drawer-backdrop {
	position: fixed; inset: 0; z-index: 80; background: rgba(5, 7, 60, .45);
	opacity: 0; visibility: hidden; transition: .25s;
}
body.drawer-open .drawer-backdrop, body.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 90; width: min(330px, 86vw);
	background: #fff; padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
body.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head .brand { font-size: 18px; }
.drawer-head .brand img { width: 36px; height: 36px; }
.drawer-nav > li > a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-label { padding: 12px 4px 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.drawer-sub { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.drawer-sub a { padding: 5px 12px; border-radius: 999px; background: var(--tint); font-size: 14px; }
.drawer-call { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--soft); }
.drawer-call .icon { width: 30px; height: 30px; color: var(--ink-primary); }
.drawer-call small { display: block; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ أقسام عامّة */
.section { padding: 64px 0; }
.section-tight { padding: 28px 0; }
.band-tint { background: var(--tint); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-title { font-size: 28px; font-weight: 800; line-height: 1.35; }
.sec-title.center { text-align: center; }
.sec-sub { margin-top: 4px; font-size: 14.5px; color: var(--muted); }
.sec-end { display: flex; align-items: center; gap: 18px; }
.sec-arrows { display: inline-flex; gap: 8px; }
.mini-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; }

/* ------------------------------------------------------------------ نوع الكتاب والتقييم والسعر والشارات */
.type-dot {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	color: #fff; flex: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.type-dot .icon { width: 16px; height: 16px; }
.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; }

.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: #D9D9E3; }
.r-num { color: var(--store-text); font-weight: 700; }

.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-weight: 800; font-size: 16px; }
.price del { font-weight: 500; font-size: 13px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
.badge-sale { background: var(--sale); }
.badge-new { background: var(--store-accent); }
.pill {
	display: inline-flex; align-items: center; padding: 4px 14px; border-radius: 999px;
	background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700;
}
.pill-new { background: var(--store-accent); color: #fff; border-color: transparent; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; color: var(--ink-primary); margin-top: 10px; }

/* ------------------------------------------------------------------ بطاقة الكتاب */
.bcard {
	position: relative; display: flex; flex-direction: column; min-width: 0;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	transition: box-shadow .25s, transform .25s;
}
.bcard:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.bcard-stage {
	position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.06;
	background: radial-gradient(70% 60% at 50% 45%, #fff 0%, var(--tint) 75%);
}
.bcard-cover { display: block; width: 56%; }
.bcard-cover::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.bcard-cover img {
	width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 6px 6px 3px;
	box-shadow: -10px 14px 24px rgba(5, 7, 60, .2), 0 2px 4px rgba(5, 7, 60, .12);
	transition: transform .35s;
}
.bcard:hover .bcard-cover img { transform: translateY(-4px) rotate(-1deg); }
.bcard-stage > .type-dot { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; }
.bcard-badges { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.stock-band {
	position: absolute; inset-inline: 14px; bottom: 26px; z-index: 2; padding: 6px 10px; border-radius: 8px;
	background: #1F2233; color: #fff; font-size: 13px; font-weight: 700; text-align: center;
}
.bcard.is-out .bcard-cover img { filter: grayscale(.75); opacity: .7; }
.heart {
	position: absolute; bottom: -18px; inset-inline-end: 16px; z-index: 3;
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
	border: 0; background: #fff; color: var(--store-text); cursor: pointer;
	box-shadow: 0 6px 16px rgba(5, 7, 60, .14); transition: transform .2s, color .2s;
}
.heart .icon, .qv .icon { width: 18px; height: 18px; }
.qv {
	position: absolute; bottom: -18px; inset-inline-end: 62px; z-index: 3;
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
	border: 0; background: #fff; color: var(--store-text); cursor: pointer;
	box-shadow: 0 6px 16px rgba(5, 7, 60, .14); transition: opacity .2s, transform .2s;
}
.qv:hover { transform: scale(1.08); color: var(--ink-primary); }
@media (hover: hover) {
	.bcard .qv { opacity: 0; }
	.bcard:hover .qv, .bcard:focus-within .qv { opacity: 1; }
}
.heart:hover { transform: scale(1.08); }
[data-action="wishlist"][aria-pressed="true"] { color: #C8323B; }
[data-action="wishlist"][aria-pressed="true"] .icon { fill: currentColor; }
.bcard-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 22px 16px 14px; }
.bcard-author { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.bcard-author .icon { width: 14px; height: 14px; }
.bcard-title { font-size: 16px; font-weight: 700; line-height: 1.5; }
.bcard-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-title a:hover { color: var(--ink-primary); }
.bcard-desc { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line); }
.add-pill {
	display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; flex: none;
	border-radius: 999px; border: 1.5px solid var(--store-primary); background: #fff; color: var(--ink-primary);
	font-weight: 700; font-size: 13.5px; cursor: pointer; transition: background .2s, color .2s;
}
.add-pill .icon { width: 17px; height: 17px; }
.add-pill:hover { background: var(--store-primary); color: #fff; }
.add-pill:disabled { border-color: var(--line); color: var(--muted); cursor: not-allowed; background: #fff; }

body[data-card-style="shadow"] .bcard { border-color: transparent; box-shadow: 0 8px 26px rgba(5, 7, 60, .08); }
body[data-card-style="flat"] .bcard { border: 0; background: transparent; overflow: visible; }
body[data-card-style="flat"] .bcard:hover { box-shadow: none; }
body[data-card-style="flat"] .bcard-stage { border-radius: var(--radius); }
body[data-card-style="flat"] .bcard-body { padding-inline: 2px; }

/* شبكات الكتب والمسارات */
.book-grid { display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); gap: var(--gap); }
.book-grid.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.track-wrap { position: relative; }
.track {
	--n: var(--per);
	display: grid; grid-auto-flow: column; gap: var(--gap);
	grid-auto-columns: calc((100% - (var(--n) - 1) * var(--gap)) / var(--n));
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.side-arrow {
	position: absolute; top: 36%; z-index: 4; display: grid; place-items: center;
	width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--store-text);
	box-shadow: 0 8px 22px rgba(5, 7, 60, .16); cursor: pointer; transition: opacity .2s;
}
.side-arrow[data-dir="prev"] { inset-inline-start: 8px; }
.side-arrow[data-dir="next"] { inset-inline-end: 8px; }
.side-arrow:disabled { opacity: 0; pointer-events: none; }
@media (min-width: 1380px) {
	.side-arrow[data-dir="prev"] { inset-inline-start: -22px; }
	.side-arrow[data-dir="next"] { inset-inline-end: -22px; }
}

/* ------------------------------------------------------------------ الواجهة */
.hero {
	position: relative; isolation: isolate; overflow: hidden;
	margin-top: calc(-1 * var(--hdr-h)); padding: calc(var(--hdr-h) + 34px) 0 40px;
}
.hero::before {
	content: ""; position: absolute; inset: 0 0 26% 0; z-index: -1;
	background:
		radial-gradient(80% 120% at 100% 0%, color-mix(in srgb, var(--store-primary) 20%, #fff) 0%, transparent 70%),
		linear-gradient(180deg, color-mix(in srgb, var(--store-primary) 7%, #fff), color-mix(in srgb, var(--store-primary) 4%, #fff));
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.hero-copy { position: relative; z-index: 3; padding-block: 24px; }
.hero-eyebrow { font-size: 14.5px; font-weight: 500; margin-bottom: 14px; }
.hero-title { font-size: 50px; line-height: 1.32; font-weight: 800; max-width: 540px; margin-bottom: 36px; }
.brush { position: relative; display: inline-block; white-space: nowrap; }
.brush > span { position: relative; z-index: 1; }
.brush-svg {
	position: absolute; inset-inline: -6px; bottom: -4px; width: calc(100% + 12px); height: 16px;
	fill: var(--store-primary);
}
.hero-search {
	position: relative; z-index: 3; display: flex; align-items: center; gap: 4px;
	width: calc(100% + 170px); padding: 10px; background: #fff; border-radius: 18px;
	box-shadow: 0 18px 44px rgba(5, 7, 60, .12);
}
.hs-field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 4px 10px; min-width: 0; }
.hs-field + .hs-field { border-inline-start: 1px solid var(--line); }
.hs-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--soft); flex: none; }
.hs-ico .icon { width: 18px; height: 18px; }
.grow { flex: 1; min-width: 0; }
.hs-field label { display: block; font-size: 14px; font-weight: 700; line-height: 1.4; }
.hs-field input, .hs-field select {
	display: block; width: 100%; border: 0; background: transparent; padding: 0;
	font-size: 13.5px; color: var(--muted); appearance: none; cursor: pointer;
}
.hs-field input { cursor: text; }
.hs-go { height: 54px; padding: 0 28px; border-radius: 999px; }

/* الأقواس الثلاثة */
.hero-arches { position: relative; }
.arches {
	display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 620px; margin-inline-start: auto;
	grid-template-areas: "a c" "b c";
}
.arch { position: relative; display: block; overflow: hidden; background: var(--tint-2); transition: opacity .45s ease; }
.arch img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.arch:hover img { transform: scale(1.04); }
.arch:nth-child(1) { grid-area: a; aspect-ratio: 4 / 5; border-radius: 50% 50% 22px 22px / 40% 40% 22px 22px; }
.arch:nth-child(2) { grid-area: b; aspect-ratio: 4 / 3; border-radius: 22px 22px 50% 50% / 22px 22px 66.7% 66.7%; }
.arch:nth-child(3) { grid-area: c; aspect-ratio: 1 / 1.86; border-radius: 999px; margin-top: 64px; align-self: start; }
.arch:nth-child(n+4) { display: none; }
.arch-chip {
	position: absolute; z-index: 1; display: flex; flex-direction: column; padding: 6px 16px;
	border-radius: 999px; background: #fff; box-shadow: 0 6px 18px rgba(5, 7, 60, .14); line-height: 1.45; max-width: 86%;
}
.arch-chip b { font-size: 14px; }
.arch-chip small { font-size: 12px; color: var(--muted); }
.arch:nth-child(1) .arch-chip { bottom: 16px; inset-inline-start: 16px; }
.arch:nth-child(2) .arch-chip { bottom: 30%; inset-inline-start: 50%; transform: translateX(50%); white-space: nowrap; }
.arch:nth-child(3) .arch-chip { bottom: 22%; inset-inline-start: 50%; transform: translateX(50%); white-space: nowrap; }
.hero-arches.is-fading .arch { opacity: 0; }

/* إن أُخفيت الواجهة: العنوان والبحث في الوسط */
.hero-grid:not(:has(.hero-arches)) { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding-block: 30px 20px; }
.hero-grid:not(:has(.hero-arches)) .hero-title { max-width: 780px; }
.hero-grid:not(:has(.hero-arches)) .hero-search { width: min(100%, 960px); margin-inline: auto; text-align: start; }
.hero:not(:has(.hero-arches))::before { inset: 0; }

/* خيار الواجهة: نصف صورةٍ بحافّةٍ منحنية */
body[data-hero-style="curve"] .hero { min-height: 660px; padding-bottom: 60px; display: flex; align-items: center; }
body[data-hero-style="curve"] .hero::before { inset: 0; }
body[data-hero-style="curve"] .hero > .container { width: min(100% - 40px, 1290px); }
body[data-hero-style="curve"] .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body[data-hero-style="curve"] .hero-search { width: calc(100% + 90px); }
body[data-hero-style="curve"] .hero-arches {
	position: absolute; top: var(--hdr-h); bottom: 0; left: 0; width: 46%; overflow: hidden;
	border-radius: 0 180px 180px 150px / 0 50% 50% 150px;
}
body[data-hero-style="curve"] .arches { display: block; position: absolute; inset: 0; max-width: none; margin: 0; }
body[data-hero-style="curve"] .arch {
	position: absolute; inset: 0; margin: 0; aspect-ratio: auto; border-radius: 0; opacity: 0; display: block;
}
body[data-hero-style="curve"] .arch:first-child { opacity: 1; }
body[data-hero-style="curve"] .arch .arch-chip { top: auto; bottom: 36px; inset-inline-start: 36%; transform: none; }
body[data-hero-style="curve"] .hero-arches.is-fading .arch:first-child { opacity: .25; }

/* ------------------------------------------------------------------ شريط التصنيفات المتحرّك */
.tags-band { padding: 34px 0 6px; }
.tags-cap { text-align: center; font-size: 14.5px; color: var(--muted); margin-bottom: 18px; }
.marquee {
	overflow: hidden; width: min(100% - 40px, 1290px); margin-inline: auto;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 44px; }
.marquee.is-running .marquee-track { flex-wrap: nowrap; justify-content: flex-start; width: max-content; animation: marquee 46s linear infinite; }
.marquee.is-running:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(50%); } }
.tag-item { display: inline-flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 700; color: #474A5E; white-space: nowrap; }
.tag-item .icon { width: 14px; height: 14px; color: var(--store-primary); }
.tag-item:hover { color: var(--ink-primary); }

/* ------------------------------------------------------------------ بلاطات التصنيف */
.ctile-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.ctile { position: relative; display: block; aspect-ratio: 400 / 460; border-radius: var(--radius); overflow: hidden; color: #fff; }
.ctile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ctile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(5, 7, 60, .72)); }
.ctile:hover img { transform: scale(1.06); }
.ctile-body { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; padding: 10px 10px 16px; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.ctile-body b { font-size: 18px; line-height: 1.4; }
.ctile-body small { font-size: 13px; opacity: .95; }
.ctile-sm .ctile-body b { font-size: 16px; }

/* ------------------------------------------------------------------ الفسيفساء */
.mosaic {
	display: grid; gap: 20px;
	grid-template-columns: 1.5fr .95fr 1.5fr 2.05fr; grid-template-rows: 240px 240px;
	grid-template-areas: "a b b c" "d e f c";
}
.mtile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; color: #fff; }
.mtile:nth-child(1) { grid-area: a; }
.mtile:nth-child(2) { grid-area: b; }
.mtile:nth-child(3) { grid-area: c; }
.mtile:nth-child(4) { grid-area: d; }
.mtile:nth-child(5) { grid-area: e; }
.mtile:nth-child(6) { grid-area: f; }
.mtile:nth-child(n+7) { display: none; }
.mtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mtile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(5, 7, 60, .62)); }
.mtile:hover img { transform: scale(1.05); }
.mt-body { position: absolute; bottom: 18px; inset-inline-start: 20px; inset-inline-end: 20px; z-index: 1; display: flex; flex-direction: column; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.mt-body b { font-size: 19px; line-height: 1.4; }
.mt-body small { font-size: 13px; }

/* ------------------------------------------------------------------ آراء القرّاء */
.reviews { background: var(--tint); text-align: center; }
.rv-mark { display: block; width: 64px; height: 64px; margin: 22px auto 6px; color: var(--store-primary); }
.rv-mark .icon { width: 64px; height: 64px; }
.rv-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 24px; max-width: 1020px; margin-inline: auto; }
.rv-item { display: contents; }
.rv-say { grid-row: 1; grid-column: 1 / -1; max-width: 780px; margin: 0 auto 26px; opacity: 0; visibility: hidden; transition: opacity .4s; }
.rv-item.is-active .rv-say { opacity: 1; visibility: visible; }
.rv-say blockquote { margin-top: 12px; font-size: 18px; line-height: 2; font-weight: 500; }
.rv-pill {
	display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px; padding-inline-end: 22px;
	border: 0; border-radius: 999px; background: #fff; text-align: start; cursor: pointer;
	box-shadow: 0 6px 18px rgba(5, 7, 60, .06); transition: box-shadow .25s, transform .25s;
}
.rv-pill:hover { transform: translateY(-2px); }
.rv-item.is-active .rv-pill, .rv-pill.is-on { box-shadow: 0 16px 36px rgba(5, 7, 60, .16); }
.rv-ava {
	display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; flex: none;
	background: var(--store-primary); color: #fff; font-weight: 800; font-size: 18px;
}
.rv-who { min-width: 0; }
.rv-who b { display: block; font-size: 15px; line-height: 1.4; }
.rv-who small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-pill-static { cursor: default; box-shadow: none; background: var(--soft); padding: 6px; padding-inline-end: 18px; }
.rv-pill-static:hover { transform: none; }
.rv-pill-static .rv-ava { width: 38px; height: 38px; font-size: 15px; }
.kit-pills .rv-pill-static { background: #fff; box-shadow: 0 6px 18px rgba(5, 7, 60, .06); }
.kit-pills .rv-pill-static.is-on { box-shadow: 0 16px 36px rgba(5, 7, 60, .16); }

/* ------------------------------------------------------------------ شريط الثقة */
.trust { padding: 30px 0 4px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trust-item {
	display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-items: center;
	padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff;
}
.trust-ico { grid-row: 1 / 3; width: 44px; height: 44px; stroke-width: 1.4; color: var(--store-primary); }
.trust-item b { font-size: 19px; font-weight: 800; line-height: 1.35; }
.trust-item span { font-size: 13px; line-height: 1.55; color: var(--muted); }

/* ------------------------------------------------------------------ زوج البانرات */
.banner-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pbanner { position: relative; display: block; aspect-ratio: 700 / 420; border-radius: var(--radius); overflow: hidden; color: #fff; }
.pbanner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.pbanner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(5, 7, 60, .78), rgba(5, 7, 60, .1) 75%); }
.pbanner:hover img { transform: scale(1.04); }
.pb-body { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; padding: 34px; max-width: 72%; }
.pb-body small { font-size: 14px; }
.pb-body b { font-size: 26px; font-weight: 800; line-height: 1.4; }
.pb-btn {
	display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 11px 20px;
	border-radius: var(--radius); background: #fff; color: var(--store-text); font-weight: 700; font-size: 14px;
}

/* ------------------------------------------------------------------ المؤلّفون على الشريط الكحليّ */
.authors-band { background: var(--store-text); color: #fff; }
.authors-band .see-all:hover { color: #fff; text-decoration: underline; }
.authors-band .round-btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.authors-band .round-btn:hover { background: #fff; color: var(--store-text); }
.authors-band .track { --n: 3; }
.acard { min-width: 0; }
.acard-img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; }
.acard-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .5s; }
.acard-img:hover img { transform: scale(1.04); }
.acard-tag { position: absolute; top: 14px; inset-inline-start: 14px; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--store-text); font-size: 13px; font-weight: 700; }
.acard-meta { margin-top: 16px; font-size: 13px; color: rgba(255, 255, 255, .8); }
.acard h3 { font-size: 19px; line-height: 1.45; margin-top: 2px; }
.acard h3 a:hover { text-decoration: underline; }
.acard-bio { margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, .78); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ------------------------------------------------------------------ تبويبا الروابط */
.tabs { display: flex; gap: 36px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tab { position: relative; padding: 0 0 12px; border: 0; background: none; font-size: 26px; font-weight: 800; color: #6B6D80; cursor: pointer; }
.tab.is-active { color: var(--store-text); }
.tab.is-active::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--store-text); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.link-cols { columns: 4; column-gap: 32px; }
.link-cols a { display: block; padding: 5px 0; font-size: 14.5px; color: var(--body-2); break-inside: avoid; }
.link-cols a:hover { color: var(--ink-primary); text-decoration: underline; }
.links:not(:has(#panel-auth)) .tab-auth, .links:not(:has(#panel-cats)) .tab-cats { display: none; }
.links:not(:has(#panel-cats)) .tab-panel { display: block; }
.links:not(:has(.tab-panel)) { display: none; }

/* ------------------------------------------------------------------ شريط النشرة */
.news-band { position: relative; margin-top: 70px; background: var(--store-accent); color: #fff; overflow-x: clip; }
.news-lines {
	position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 46%; height: 100%;
	fill: none; stroke: color-mix(in srgb, var(--store-primary) 45%, #fff); stroke-width: 3; opacity: .55; pointer-events: none;
}
.news-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 30px; align-items: center; }
.news-text { padding: 66px 0; }
.news-text h2 { font-size: 32px; font-weight: 800; line-height: 1.35; }
.news-text p { margin-top: 10px; font-size: 15.5px; color: rgba(255, 255, 255, .9); max-width: 520px; }
.news-field { display: flex; gap: 8px; max-width: 470px; margin-top: 24px; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, .14); }
.news-field input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; padding: 0 12px; }
.news-field input::placeholder { color: rgba(255, 255, 255, .8); }
.news-field button { border: 0; border-radius: 10px; padding: 12px 26px; background: #fff; color: var(--ink-accent); font-weight: 800; cursor: pointer; }
.news-art { align-self: end; margin-top: -110px; }
.news-art img { width: min(100%, 430px); margin-inline: auto; }
.news-grid:not(:has(.news-art)) { grid-template-columns: minmax(0, 1fr); }

/* ------------------------------------------------------------------ التذييل */
.site-footer { background: #fff; padding-top: 44px; }
main > :last-child:not(.news-band) { border-bottom: 1px solid var(--line); }
.foot-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.foot-call { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 17px; font-weight: 500; }
.foot-call .icon { width: 34px; height: 34px; stroke-width: 1.5; }
.foot-call a { color: var(--ink-accent); font-weight: 700; }
.foot-social { display: flex; align-items: center; gap: 4px; }
.foot-social span { font-size: 14px; font-weight: 500; margin-inline-end: 8px; }
.foot-social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; transition: background .2s; }
.foot-social a:hover { background: var(--soft); }
.foot-social .icon { width: 18px; height: 18px; }
.foot-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 30px; padding: 36px 0; }
.foot-cols h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.foot-cols li a { display: block; padding: 4px 0; font-size: 14px; color: var(--body-2); }
.foot-cols li a:hover { color: var(--ink-primary); }
.foot-contact p { font-size: 14px; color: var(--body-2); margin-bottom: 8px; }
.foot-track { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; color: var(--ink-primary); }
.foot-news p { font-size: 14px; color: var(--body-2); }
.fnf { display: flex; margin-top: 14px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); }
.fnf input { flex: 1; min-width: 0; border: 0; padding: 0 10px; background: transparent; }
.fnf button { border: 0; background: none; padding: 8px 14px; font-weight: 800; color: var(--ink-primary); cursor: pointer; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 20px 0 28px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.to-top {
	position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 50; display: grid; place-items: center;
	width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--ink-primary);
	box-shadow: 0 8px 24px rgba(5, 7, 60, .16); cursor: pointer; opacity: 0; visibility: hidden; transition: .25s;
}
.to-top.show { opacity: 1; visibility: visible; }

/* ------------------------------------------------------------------ رأس الصفحات الداخليّة */
.page-band {
	position: relative; margin-top: calc(-1 * var(--hdr-h)); padding: calc(var(--hdr-h) + 28px) 0 44px;
	background:
		radial-gradient(80% 140% at 100% 0%, color-mix(in srgb, var(--store-primary) 18%, #fff) 0%, transparent 70%),
		linear-gradient(180deg, color-mix(in srgb, var(--store-primary) 6%, #fff), #fff);
}
.band-short { padding-bottom: 26px; }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.band-art { display: flex; align-items: flex-start; gap: 16px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: #4F5163; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: #8A8C9C; }
.breadcrumb a:hover { color: var(--ink-primary); }
.page-title { font-size: 36px; font-weight: 800; line-height: 1.35; margin: 10px 0 8px; }
.page-sub { color: #4F5163; max-width: 640px; }
.arch-frame { display: block; overflow: hidden; background: var(--tint-2); flex: none; }
.arch-frame img { width: 100%; height: 100%; object-fit: cover; }
.arch-top { width: 200px; aspect-ratio: 4 / 5; border-radius: 50% 50% 18px 18px / 40% 40% 18px 18px; }
.arch-dome { width: 200px; aspect-ratio: 4 / 3; border-radius: 18px 18px 50% 50% / 18px 18px 66.7% 66.7%; }
.arch-pill { width: 104px; aspect-ratio: 1 / 1.9; border-radius: 999px; margin-top: 44px; background: linear-gradient(180deg, var(--store-primary), var(--store-primary-dark)); }
.band-author .bio { margin-top: 14px; max-width: 680px; color: var(--body-2); }
.band-author .bio p + p { margin-top: 8px; }
.ah-stats { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------------ صفحة التصنيف */
.strip-track { --n: 6 !important; }
.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 32px; padding-top: 10px; padding-bottom: 64px; }
.filters { align-self: start; position: sticky; top: calc(var(--hdr-h) + 16px); padding: 4px 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.filters-head { display: none; }
.f-group { padding: 16px 0; border-bottom: 1px solid var(--line); }
.f-group:last-child { border-bottom: 0; }
.f-group h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.f-body label { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; cursor: pointer; }
.f-body input[type="checkbox"], .f-body input[type="radio"] { accent-color: var(--store-primary); width: 16px; height: 16px; }
.f-body .n { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); }
.f-type .type-dot { width: 24px; height: 24px; }
.f-type .type-dot .icon { width: 13px; height: 13px; }
.range-bar { position: relative; height: 4px; margin: 10px 0 14px; border-radius: 4px; background: var(--line); }
.range-bar span { position: absolute; top: 0; bottom: 0; inset-inline: 15% 30%; border-radius: 4px; background: var(--store-primary); }
.price-range { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.price-range input { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.count-text { margin-inline-end: auto; font-size: 14px; color: var(--muted); }
.count-text b { color: var(--store-text); }
.select { height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.filters-toggle { display: none; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.pagination a, .pagination span {
	display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px;
	border-radius: var(--radius); border: 1px solid var(--line); font-weight: 700; font-size: 14.5px;
}
.pagination a:hover { border-color: var(--store-text); }
.pagination [aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.pagination .dots { border: 0; min-width: 20px; }

/* ------------------------------------------------------------------ صفحة الكتاب */
.pdp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.pdp-title { font-size: 34px; font-weight: 800; line-height: 1.35; }
.pdp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 10px; font-size: 14.5px; }
.pdp-meta a { font-weight: 700; color: var(--ink-primary); }
.wish-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; font-weight: 500; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-top: 30px; padding-bottom: 50px; }
.gallery {
	position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 26px;
	padding: 38px 24px 46px; border-radius: 22px; background: var(--soft);
}
.g-arch {
	position: relative; display: grid; place-items: center; width: min(300px, 56%); aspect-ratio: 4 / 5.2;
	border-radius: 50% 50% 22px 22px / 38% 38% 22px 22px;
	background: linear-gradient(180deg, var(--tint-2), color-mix(in srgb, var(--store-primary) 32%, #fff));
}
.g-arch img { width: 62%; aspect-ratio: 2 / 3; object-fit: cover; margin-top: 12%; border-radius: 3px 6px 6px 3px; box-shadow: -12px 16px 28px rgba(5, 7, 60, .25); }
.g-arch > .type-dot { position: absolute; bottom: 16px; inset-inline-start: 16px; width: 36px; height: 36px; }
.g-arch > .type-dot .icon { width: 18px; height: 18px; }
.g-pill { display: grid; place-items: center; width: min(150px, 28%); aspect-ratio: 1 / 1.9; margin-top: 74px; border-radius: 999px; background: #fff; box-shadow: 0 10px 30px rgba(5, 7, 60, .07); }
.g-pill img { width: 62%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: -6px 8px 16px rgba(5, 7, 60, .18); }
.g-dome { position: absolute; top: 30px; inset-inline-end: 28px; display: grid; place-items: center; width: 70px; height: 54px; border-radius: 14px 14px 999px 999px; background: var(--store-primary); color: #fff; }
.g-dome .icon { width: 26px; height: 26px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 4px; }
.fact { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.f-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--tint); color: var(--ink-primary); flex: none; }
.fact small { display: block; font-size: 12.5px; color: var(--muted); }
.fact b { font-size: 14px; }
.pdp-sec { padding: 30px 0; border-bottom: 1px solid var(--line); }
.pdp-sec:last-child { border-bottom: 0; }
.pdp-sec h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.prose { color: #2A2C40; }
.prose p + p { margin-top: 12px; }
.timeline li { position: relative; display: flex; gap: 16px; padding-bottom: 20px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 17px; top: 38px; bottom: 2px; border-inline-start: 2px dashed var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.tl-dot { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--store-primary); color: #fff; font-weight: 800; flex: none; }
.timeline b { display: block; font-size: 16px; line-height: 1.5; margin-top: 4px; }
.timeline p { font-size: 14px; color: var(--muted); }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.checks li { display: flex; gap: 8px; font-size: 14.5px; }
.checks .icon { color: var(--ink-primary); margin-top: 3px; width: 18px; height: 18px; }
.rv-summary { display: flex; align-items: center; gap: 30px; padding: 20px 22px; border-radius: 16px; background: var(--soft); margin-bottom: 18px; }
.rv-score { text-align: center; }
.rv-score strong { display: block; font-size: 44px; font-weight: 800; line-height: 1.1; }
.rv-score .stars .icon { width: 17px; height: 17px; }
.rv-score p { font-size: 13.5px; margin-top: 4px; }
.rv-bars { flex: 1; display: grid; gap: 4px; }
.rv-bars li { display: grid; grid-template-columns: 62px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 13px; color: var(--body-2); }
.bar { height: 8px; border-radius: 8px; background: #E3E3EB; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); }
.rv-cards { display: grid; gap: 14px; }
.rv-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; }
.rv-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.rv-card p { color: var(--body-2); }
.rv-form { margin-top: 20px; padding: 22px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--store-primary) 40%, #fff); background: var(--tint); }
.rv-form h3 { font-size: 17px; font-weight: 800; }
.rv-form > p { font-size: 14px; color: #4F5163; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; border: 0; margin: 12px 0 6px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #C9CAD6; }
.star-input label .icon { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary); border-radius: 4px; }
.field { display: block; width: 100%; margin: 6px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; resize: vertical; }

.buy-box { position: sticky; top: calc(var(--hdr-h) + 16px); padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.bb-label { font-size: 13.5px; color: var(--muted); }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.price-lg { font-size: 28px; }
.price-lg del { font-size: 16px; }
.stock { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--ok); }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.bb-type { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 12px; border-radius: var(--radius); background: var(--soft); font-size: 14px; }
.bb-actions { display: grid; gap: 10px; margin-top: 12px; }
.bb-row { display: flex; gap: 10px; }
.bb-row .btn { flex: 1; }
.icon-btn-line { width: 54px; height: 54px; border-radius: 14px; border: 1px solid var(--line); flex: none; }
.perks { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--body-2); }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks .icon { color: var(--ink-primary); }
.sample-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; padding: 10px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--store-accent) 8%, #fff); }
.sample-bar small { font-size: 12.5px; color: var(--body-2); white-space: nowrap; }
.play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--store-accent); color: #fff; cursor: pointer; flex: none; }
.wave-bars { flex: 1; display: flex; align-items: center; gap: 3px; height: 32px; }
.wave-bars i { flex: 1; border-radius: 3px; background: color-mix(in srgb, var(--store-accent) 45%, #fff); }

/* شاهدتَه مؤخّرًا */
.mini-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mini { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.mini-cover { position: relative; width: 70px; flex: none; }
.mini-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.mini-cover .type-dot { position: absolute; top: -6px; inset-inline-start: -6px; width: 24px; height: 24px; }
.mini-cover .type-dot .icon { width: 13px; height: 13px; }
.mini h3 { font-size: 15px; line-height: 1.5; }
.mini h3 a:hover { color: var(--ink-primary); }
.mini p { font-size: 13px; color: var(--muted); }
.mini .price { font-size: 14px; }

/* ------------------------------------------------------------------ السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; padding: 30px 0 60px; }
.cart-box { padding: 6px 22px; border: 1px solid var(--line); border-radius: 18px; }
.cart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 19px; font-weight: 800; }
.cart-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto auto auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-thumb { position: relative; }
.cart-thumb img { width: 74px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.cart-thumb .type-dot { position: absolute; top: -6px; inset-inline-start: -6px; width: 24px; height: 24px; }
.cart-thumb .type-dot .icon { width: 13px; height: 13px; }
.cart-info h3 { font-size: 16px; line-height: 1.5; }
.cart-info p { font-size: 13.5px; color: var(--muted); }
.cart-info .price { font-size: 14px; }
.qty { display: flex; align-items: center; height: 42px; border: 1px solid var(--line); border-radius: var(--radius); }
.qty button { width: 36px; height: 100%; border: 0; background: none; font-size: 18px; cursor: pointer; }
.qty input { width: 40px; border: 0; background: transparent; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-total { min-width: 96px; text-align: end; font-size: 16px; }
.rm { color: var(--sale); }
.cart-empty { padding: 40px 10px; text-align: center; }
.ce-arch { display: grid; place-items: center; width: 90px; height: 112px; margin: 0 auto 14px; border-radius: 50% 50% 16px 16px / 40% 40% 16px 16px; background: var(--tint); color: var(--ink-primary); }
.ce-arch .icon { width: 40px; height: 40px; }
.cart-empty p { color: var(--muted); margin: 4px 0 16px; }
.summary { position: sticky; top: calc(var(--hdr-h) + 16px); padding: 24px; border-radius: 18px; background: var(--soft); }
.summary h2 { font-size: 19px; font-weight: 800; margin-bottom: 16px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.coupon-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 4px 6px; padding-inline-start: 14px; border-radius: 999px; border: 1px dashed var(--store-primary); background: #fff; font-size: 13px; font-weight: 700; color: var(--ink-primary); }
.coupon-chip button { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--tint); color: var(--ink-primary); cursor: pointer; }
.coupon-chip .icon { width: 14px; height: 14px; }
.sum-rows { display: grid; gap: 10px; margin-top: 18px; font-size: 14.5px; }
.sum-rows div { display: flex; justify-content: space-between; }
.sum-total { display: flex; justify-content: space-between; margin: 14px 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 19px; font-weight: 800; }
.secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 6px; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ 404 */
.band-404 { padding-bottom: 56px; text-align: center; }
.nf { display: flex; flex-direction: column; align-items: center; }
.nf-code { display: flex; align-items: center; justify-content: center; gap: 16px; direction: ltr; font-size: 150px; font-weight: 800; line-height: 1; margin-top: 10px; }
.nf-arch {
	display: grid; place-items: center; width: 124px; height: 164px; border-radius: 50% 50% 20px 20px / 38% 38% 20px 20px;
	background: #fff; color: var(--store-primary); box-shadow: var(--shadow);
}
.nf-arch svg { width: 100px; height: 100px; }
.nf h1 { font-size: 30px; font-weight: 800; line-height: 1.4; margin: 26px 0 10px; }
.nf-text { max-width: 580px; color: var(--body-2); }
.nf-search { display: flex; gap: 8px; width: min(100%, 580px); margin-top: 24px; padding: 8px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.nf-search input { flex: 1; min-width: 0; border: 0; padding: 0 14px; background: transparent; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }

/* ------------------------------------------------------------------ صفحة المكوّنات */
.kit-sec { padding: 34px 0; border-bottom: 1px solid var(--line); }
.kit-sec h2 { font-size: 20px; font-weight: 800; }
.kit-sec h2 + p { margin: 4px 0 18px; color: var(--muted); }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.kit-row + .kit-row { margin-top: 16px; }
.kit-top { align-items: flex-start; gap: 30px; }
.kit-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.kit-card > small { display: block; margin-bottom: 8px; font-weight: 700; color: var(--muted); }
.kit-title { font-size: 38px; margin-bottom: 22px; max-width: none; }
.kit-search { width: min(100%, 960px); }
.kit-arches { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.kit-arches .arch-frame { width: 160px; }
.kit-arches .arch-pill { width: 120px; margin-top: 30px; }
.kit-tiles { grid-template-columns: repeat(2, 150px); }
.kit-pills { display: grid; gap: 12px; }
.kit-tabs { border: 0; margin: 0; }
.kit-type { display: inline-flex; align-items: center; gap: 8px; }
.kit-expired { margin-top: 20px; grid-template-columns: minmax(0, 1fr); }
.kit-buy { position: static; width: min(100%, 340px); }
.kit-list { flex: 1; min-width: min(100%, 280px); }

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

/* ------------------------------------------------------------------ العروض */
@media (max-width: 1200px) {
	.hero-title { font-size: 44px; }
	.hero-search { width: calc(100% + 110px); }
	.hdr { gap: 16px; }
	.hdr-nav a, .drop-btn { padding: 8px 9px; }
}

@media (max-width: 1100px) {
	body[data-books-per-row] { --per: 3; }
	.hdr-nav { display: none; }
	.menu-btn { display: inline-grid; }
	.brand { margin-inline-end: auto; }
	.ctile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pdp { grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; }
	.strip-track { --n: 4.4 !important; }
	.mosaic { grid-template-rows: 200px 200px; }
}

@media (max-width: 991px) {
	.section { padding: 52px 0; }
	.hero { padding-top: calc(var(--hdr-h) + 18px); }
	.hero::before { inset: 0 0 34% 0; }
	.hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
	.hero-copy { padding-block: 10px 0; }
	.hero-title { font-size: 38px; max-width: none; margin-bottom: 26px; }
	.hero-search { width: 100%; flex-direction: column; align-items: stretch; padding: 8px; border-radius: 16px; }
	.hs-field { padding: 8px 6px; }
	.hs-field + .hs-field { border-inline-start: 0; border-top: 1px solid var(--line); }
	.hs-go { width: 100%; margin-top: 4px; border-radius: var(--radius); }
	.arches { max-width: 560px; margin-inline: auto; gap: 14px; }
	.arch:nth-child(3) { margin-top: 44px; }

	body[data-hero-style="curve"] .hero { min-height: 0; display: block; padding-bottom: 30px; }
	body[data-hero-style="curve"] .hero-grid { grid-template-columns: minmax(0, 1fr); }
	body[data-hero-style="curve"] .hero-search { width: 100%; }
	body[data-hero-style="curve"] .hero-arches { position: relative; top: auto; left: auto; width: 100%; height: 340px; border-radius: 26px 26px 26px 120px; }

	.mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 180px 240px 180px 240px; grid-template-areas: "a b" "c c" "d e" "f f"; gap: 14px; }
	.authors-band .track { --n: 2.2; }
	.link-cols { columns: 3; }
	.news-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.news-text { padding: 50px 0 20px; }
	.news-art { margin-top: 0; }
	.news-art img { width: min(100%, 300px); }
	.news-lines { width: 100%; }
	.foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.band-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 20px; }
	.arch-top, .arch-dome { width: 140px; }
	.arch-pill { width: 72px; margin-top: 30px; }

	.listing { grid-template-columns: minmax(0, 1fr); }
	.side-arrow { display: none; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 90; width: min(330px, 88vw);
		border-radius: 0; border: 0; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
	}
	body.filters-open .filters { transform: none; visibility: visible; }
	.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.filters-toggle { display: inline-flex; }

	.pdp { grid-template-columns: minmax(0, 1fr); }
	.pdp-main { display: contents; }
	.pdp-main > * { order: 4; }
	.gallery { order: 1; }
	.buy-box { order: 2; position: static; }
	.facts { order: 3; }
	.mini-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cart-layout { grid-template-columns: minmax(0, 1fr); }
	.summary { position: static; }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.hdr-link span { display: none; }
	.banner-pair { grid-template-columns: minmax(0, 1fr); }
	.rv-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.rv-say blockquote { font-size: 16.5px; }
	.band-art { display: none; }
	.band-grid { grid-template-columns: minmax(0, 1fr); }
	.cart-row { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "t i r" "t q s"; gap: 10px 14px; }
	.cart-thumb { grid-area: t; align-self: start; }
	.cart-thumb img { width: 64px; }
	.cart-info { grid-area: i; }
	.qty { grid-area: q; justify-self: start; }
	.cart-total { grid-area: s; min-width: 0; }
	.rm { grid-area: r; align-self: start; }
	.checks { grid-template-columns: minmax(0, 1fr); }
	.rv-summary { flex-direction: column; align-items: stretch; gap: 14px; }
}

@media (max-width: 640px) {
	:root { --gap: 14px; --hdr-h: 64px; }
	body[data-books-per-row] { --per: 2; }
	.container, .marquee { width: min(100% - 32px, 1290px); }
	.track { --n: 2.2; }
	.authors-band .track { --n: 1.25; }
	.strip-track { --n: 2.5 !important; }
	.hide-sm { display: none !important; }
	.cart-btn .label { display: none; }
	.cart-btn { padding-inline: 10px 6px; height: 40px; }
	.brand { font-size: 18px; gap: 8px; }
	.brand img { width: 34px; height: 34px; }
	.hdr { gap: 6px; }
	.hdr-actions { gap: 2px; }
	.section { padding: 44px 0; }
	.sec-title { font-size: 23px; }
	.sec-head { margin-bottom: 18px; }
	.sec-arrows { display: none; }
	.hero-title { font-size: 31px; }
	.hero-eyebrow { font-size: 13.5px; }
	.arch-chip { padding: 4px 10px; }
	.arch-chip small { display: none; }
	.arch-chip b { font-size: 12.5px; }
	.ctile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.tag-item { font-size: 17px; }
	.bcard-body { padding: 20px 11px 12px; }
	.bcard-title { font-size: 14.5px; }
	.add-pill { width: 36px; padding: 0; justify-content: center; }
	.add-pill span { display: none; }
	.price { font-size: 14.5px; }
	.price del { font-size: 12px; }
	.pb-body { padding: 22px; max-width: 86%; }
	.pb-body b { font-size: 21px; }
	.tab { font-size: 20px; }
	.tabs { gap: 24px; }
	.link-cols { columns: 2; column-gap: 18px; }
	.news-text h2 { font-size: 26px; }
	.foot-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.foot-call { font-size: 15px; }
	.page-title { font-size: 28px; }
	.pdp-title { font-size: 26px; }
	.gallery { padding: 26px 14px 30px; gap: 14px; }
	.g-dome { display: none; }
	.facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
	.fact { padding: 10px; gap: 8px; }
	.f-ico { width: 34px; height: 34px; }
	.book-grid.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mini-row { grid-template-columns: minmax(0, 1fr); }
	.cart-box { padding: 4px 14px; }
	.nf-code { font-size: 96px; gap: 10px; }
	.nf-arch { width: 80px; height: 106px; }
	.nf-arch svg { width: 64px; height: 64px; }
	.nf h1 { font-size: 23px; }
	.kit-cards { gap: 12px; }
	.kit-title { font-size: 28px; }
	.mosaic { grid-template-rows: 150px 200px 150px 200px; }
	.mt-body b { font-size: 16px; }
}

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

/* ------------------------------------------------------------------ ميزات المنصّة المعتمدة */
/* تبويبات التصنيفات في صفّ الكتب (section.tabs) */
.row-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.row-tab { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--body-2); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.row-tab:hover { border-color: var(--store-text); color: var(--store-text); }
.row-tab[aria-selected="true"] { background: var(--store-text); border-color: var(--store-text); color: #fff; }
[data-slot="section.items"] > [hidden] { display: none !important; }

/* الطلب المسبق (book.stock_status = preorder، book.release_date) */
.badge-pre { background: var(--ink-accent); }
.release-band { position: absolute; inset-inline: 14px; bottom: 26px; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--ink-accent); color: #fff; font-size: 13px; font-weight: 700; }
.release-band .icon { width: 15px; height: 15px; }
.stock[data-status="preorder"] { color: var(--ink-accent); }
.pdp-release { display: none; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--ink-accent); }
.pdp-release .icon { width: 16px; height: 16px; }
.stock[data-status="preorder"] ~ .pdp-release { display: flex; }

/* تطبيق المتجر في التذييل (store.app_links) */
.foot-apps { margin-top: 22px; }
.foot-apps h3 { margin-bottom: 10px; }
.app-links { display: flex; flex-wrap: wrap; gap: 10px; }
.app-badge { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 14px; border-radius: 10px; background: var(--store-text); color: #fff; font-weight: 800; font-size: 14.5px; line-height: 1.2; direction: ltr; transition: background .2s; }
.app-badge:hover { background: var(--ink-primary); }
.app-badge .icon { width: 22px; height: 22px; }
.app-badge span { display: grid; text-align: left; }
.app-badge small { font-size: 11px; font-weight: 500; color: #D9DAE8; }

/* المدوّنة على الشريط الكحليّ (home_latest_posts وpost_related) */
.posts-band { background: var(--store-text); color: #fff; }
.posts-band .see-all:hover { color: #fff; text-decoration: underline; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px var(--gap); }
.pcard { min-width: 0; }
.pcard-img { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard-img:hover img { transform: scale(1.04); }
.pcard-tag { position: absolute; top: 14px; inset-inline-start: 14px; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--store-text); font-size: 13px; font-weight: 700; }
.pcard-meta { display: flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 13px; color: rgba(255, 255, 255, .8); }
.pcard-meta .icon { width: 15px; height: 15px; }
.pcard h3 { font-size: 19px; line-height: 1.45; margin-top: 2px; }
.pcard h3 a:hover { text-decoration: underline; }
.pcard-text { margin-top: 4px; font-size: 14px; color: rgba(255, 255, 255, .78); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-grid-light .pcard-meta { color: var(--muted); }
.post-grid-light .pcard-text { color: var(--muted); }
.post-grid-light .pcard h3 a:hover { color: var(--ink-primary); }
/* المؤلّفون بعد المدوّنة على خلفيّةٍ فاتحة */
.authors-light { background: var(--soft); color: var(--store-text); }
.authors-light .see-all:hover { color: var(--ink-primary); text-decoration: none; }
.authors-light .round-btn { color: var(--store-text); border-color: var(--line); background: #fff; }
.authors-light .round-btn:hover { background: var(--store-text); color: #fff; }
.authors-light .acard-meta { color: var(--muted); }
.authors-light .acard-bio { color: var(--body-2); }
/* صفحة المقال */
.post-date { display: flex; align-items: center; gap: 6px; }
.post-date .icon { width: 17px; height: 17px; }
.post-wrap { max-width: 820px; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.post-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.post-text { display: grid; gap: 16px; font-size: 17.5px; line-height: 1.95; color: var(--body-2); }
.post-text p:first-child { font-size: 19px; color: var(--store-text); font-weight: 500; }
@media (max-width: 1023px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
	.post-grid { grid-template-columns: minmax(0, 1fr); }
	.post-text { font-size: 16.5px; }
}

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

/* ------------------------------------------------------------------ الإصدار الثاني: إيقاع الرئيسيّة */
.band-soft { background: var(--soft); }

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

/* صفوف الاقتراحات في الصفحات الداخليّة: أربعة كتبٍ في صفٍّ كامل، وصفّان من اثنين في الهاتف */
.book-grid.row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 767px) { .book-grid.row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* عرض الأسبوع: قوسٌ كبير بغلاف الكتاب وعدّادٌ واحد، وقائمةٌ مدمجة بجانبه */
.deal-band { background: linear-gradient(180deg, var(--tint) 0%, #fff 78%); }
.deal-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.deal { display: flex; flex-direction: column; padding: 28px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.deal-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 22px; }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 4px 12px; border-radius: 999px; background: var(--tint-2); color: var(--ink-primary); font-size: 13px; font-weight: 800; }
.deal-kicker .icon { width: 15px; height: 15px; }
.countdown { display: flex; gap: 8px; direction: rtl; }
.cd-unit { display: grid; place-items: center; min-width: 62px; padding: 8px 6px 6px; border-radius: 16px 16px 999px 999px / 16px 16px 30px 30px; background: var(--store-text); color: #fff; line-height: 1.2; }
.cd-unit b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 11.5px; color: #D9DAE8; }
.deal-items { flex: 1; display: flex; }
.deal-book { flex: 1; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.deal-art {
	position: relative; display: grid; place-items: center; aspect-ratio: 4 / 4.6;
	border-radius: 50% 50% 22px 22px / 40% 40% 22px 22px;
	background: radial-gradient(70% 60% at 50% 40%, #fff 0%, var(--tint-2) 80%);
}
.deal-cover { display: block; width: 58%; margin-top: 10%; }
.deal-cover::before { content: ""; position: absolute; inset: 0; z-index: 1; }
.deal-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 6px 6px 3px; box-shadow: -14px 18px 30px rgba(5, 7, 60, .26); transition: transform .35s; }
.deal-book:hover .deal-cover img { transform: translateY(-4px) rotate(-1.5deg); }
.deal-art > .type-dot { position: absolute; bottom: 16px; inset-inline-start: 16px; z-index: 2; width: 36px; height: 36px; }
.deal-badge { position: absolute; top: 18%; inset-inline-end: 6px; z-index: 2; font-size: 13px; padding: 5px 12px; }
.deal-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.deal-title { font-size: 26px; font-weight: 800; line-height: 1.35; }
.deal-title a:hover { color: var(--ink-primary); }
.deal-desc { color: var(--body-2); font-size: 14.5px; }
.deal-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.deal-price { margin: 2px 0 4px; }
.deal-foot .icon-btn-line { width: 46px; height: 46px; border-radius: var(--radius); }

.toplist { display: flex; flex-direction: column; padding: 26px 24px; border-radius: 24px; background: var(--store-text); color: #fff; }
.toplist .sec-title { font-size: 24px; }
.toplist .see-all:hover { color: #fff; text-decoration: underline; }
.lcard-list { display: grid; gap: 4px; counter-reset: rank; flex: 1; align-content: center; }
.lcard { position: relative; display: grid; grid-template-columns: auto 56px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .14); counter-increment: rank; }
.lcard:first-child { border-top: 0; }
.lcard::before { content: counter(rank); grid-column: 1; grid-row: 1; width: 22px; font-size: 22px; font-weight: 800; color: color-mix(in srgb, var(--store-primary) 35%, #fff); text-align: center; }
.lcard-cover { grid-column: 2; grid-row: 1; display: block; }
.lcard-cover img { width: 56px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px 5px 5px 3px; box-shadow: -6px 8px 16px rgba(0, 0, 0, .3); }
.lcard > .type-dot { position: absolute; top: 6px; inset-inline-start: 26px; width: 24px; height: 24px; z-index: 1; }
.lcard > .type-dot .icon { width: 13px; height: 13px; }
.lcard > .badge { position: absolute; bottom: 8px; inset-inline-start: 30px; z-index: 1; padding: 2px 8px; font-size: 11px; }
.lcard-body { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lcard .bcard-author { color: #C9CADA; font-size: 12.5px; }
.lcard-title { font-size: 16px; font-weight: 700; line-height: 1.45; }
.lcard-title a:hover { text-decoration: underline; }
.lcard .rating { color: #C9CADA; }
.lcard .r-num { color: #fff; }
.lcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.lcard .price del { color: #C9CADA; }
.lcard .add-pill { height: 34px; background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.lcard .add-pill:hover { background: #fff; color: var(--store-text); border-color: #fff; }

/* صفحة التصنيف: الوسوم المختارة، وتبديل الشبكة والقائمة */
.active-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 14px; padding-inline: 14px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--tint); color: var(--store-text); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.chip .icon { width: 14px; height: 14px; }
.chip:hover { border-color: var(--store-primary); }
.chips-clear { border: 0; background: none; color: var(--sale); font-size: 13.5px; font-weight: 700; cursor: pointer; text-decoration: underline; }
.view-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); }
.view-btn { display: grid; place-items: center; width: 40px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.view-btn[aria-pressed="true"] { background: var(--store-text); color: #fff; }
.book-grid.is-list { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
.book-grid.is-list .bcard { flex-direction: row; }
.book-grid.is-list .bcard-stage { width: 190px; flex: none; aspect-ratio: auto; }
.book-grid.is-list .bcard-cover { width: 60%; margin-block: 18px; }
.book-grid.is-list .heart { bottom: 12px; inset-inline-end: 12px; }
.book-grid.is-list .qv { bottom: 12px; inset-inline-end: 56px; }
.book-grid.is-list .bcard-body { padding: 18px 20px; justify-content: center; }
.book-grid.is-list .bcard-foot { margin-top: 10px; }

/* صفحات الكتاب: اختيار النسخة والكمّيّة */
.formats-box { margin: 14px 0 4px; }
.formats-label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.format-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; border: 1.5px solid var(--line); border-radius: 16px 16px 999px 999px / 16px 16px 26px 26px; text-align: center; transition: border-color .2s, background .2s; }
.format-opt:hover { border-color: var(--store-primary); }
.format-opt[aria-current="page"] { border-color: var(--store-primary); background: var(--tint); }
.format-opt .type-dot { width: 26px; height: 26px; margin-bottom: 2px; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-name { font-size: 13.5px; font-weight: 800; }
.format-price { font-size: 12.5px; color: var(--body-2); }
.buy-qty { display: flex; gap: 10px; }
.buy-qty .qty { height: 54px; flex: none; border-radius: 14px; }
.buy-qty .qty button { display: grid; place-items: center; width: 40px; color: var(--store-text); }
.buy-qty .qty .icon { width: 16px; height: 16px; }
.buy-qty .btn { flex: 1; padding-inline: 14px; }

@media (max-width: 1100px) {
	.deal-grid { grid-template-columns: minmax(0, 1fr); }
	.lcard-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
	.lcard:nth-child(2) { border-top: 0; }
	body[data-books-per-row] .two-rows > :nth-child(n+7) { display: none; }
}
@media (max-width: 1023px) {
	.posts-band .post-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - var(--gap)) / 2.15); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.posts-band .post-grid::-webkit-scrollbar { display: none; }
	.posts-band .pcard { scroll-snap-align: start; }
}
@media (max-width: 991px) {
	.trust-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 12px; }
	.trust-grid::-webkit-scrollbar { display: none; }
	.trust-item { flex: 0 0 auto; width: 290px; scroll-snap-align: start; }
}
@media (max-width: 767px) {
	.deal { padding: 20px; }
	.deal-book { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.deal-art { width: min(100%, 300px); margin-inline: auto; }
	.lcard-list { grid-template-columns: minmax(0, 1fr); }
	.lcard:nth-child(2) { border-top: 1px solid rgba(255, 255, 255, .14); }
	.book-grid.is-list .bcard-stage { width: 130px; }
	.book-grid.is-list .bcard-body { padding: 14px; }
}
@media (max-width: 640px) {
	.trust { padding-top: 22px; }
	.trust-item { width: 248px; padding: 12px 14px; column-gap: 12px; }
	.trust-ico { width: 34px; height: 34px; }
	.trust-item b { font-size: 16.5px; }
	.trust-item span { font-size: 12.5px; }
	body[data-books-per-row] .two-rows > :nth-child(n+5) { display: none; }
	.ctile-grid { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 40%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.ctile-grid::-webkit-scrollbar { display: none; }
	.ctile { scroll-snap-align: start; }
	.posts-band .post-grid { grid-auto-columns: 84%; }
	.deal-head { margin-bottom: 14px; }
	.cd-unit { min-width: 56px; }
	.cd-unit b { font-size: 19px; }
	.deal-title { font-size: 22px; }
	.deal-foot .btn { flex: 1; }
	.toplist { padding: 20px 16px; }
	.qv { inset-inline-end: 58px; width: 36px; height: 36px; }
	.heart { width: 36px; height: 36px; }
	/* الواجهة في الهاتف: الأقواس الثلاثة في صفٍّ واحد قصير، وحقلا التصنيف والنوع متجاوران */
	.hero-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.hero-search .hs-field:first-child, .hs-go { grid-column: 1 / -1; }
	.hero-search .hs-field:nth-child(3) { border-inline-start: 1px solid var(--line); }
	.hero-search .hs-ico { width: 36px; height: 36px; }
	.arches { grid-template-columns: 1fr 1fr .8fr; grid-template-areas: "a b c"; gap: 10px; align-items: start; }
	.arch:nth-child(1), .arch:nth-child(2), .arch:nth-child(3) { aspect-ratio: auto; height: 190px; margin-top: 0; }
	.arch:nth-child(2) { margin-top: 26px; height: 164px; }
	.arch:nth-child(1) .arch-chip, .arch:nth-child(2) .arch-chip, .arch:nth-child(3) .arch-chip { inset-inline: 6px; bottom: 10px; transform: none; max-width: none; white-space: normal; text-align: center; align-items: center; }
	body[data-hero-style="curve"] .hero-arches { height: 240px; }
}

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