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

:root {
	--store-primary: #909477;
	--store-primary-dark: #5E6248;
	--store-accent: #333A2F;
	--store-bg: #FFFFFF;
	--store-text: #232323;

	/* مشتقّات ومحايدات */
	--warm: color-mix(in srgb, var(--store-primary) 8%, #fff);
	--soft: color-mix(in srgb, var(--store-primary) 18%, #fff);
	--box: #F3F3EF;
	--ghost: color-mix(in srgb, var(--store-primary) 15%, transparent);
	--line: #E4E4DE;
	--muted: #666666;
	--sale: #C42020;
	--gold: #E2A400;
	--foot-text: #D5D8CB;

	--radius: 14px;
	--radius-sm: 8px;
	--gap: 22px;
	--per: 4;
	--shadow: 0 10px 30px rgba(35, 35, 35, .08);
	--font: "Tajawal", system-ui, sans-serif;
}

body[data-corners="sharp"] { --radius: 0px; --radius-sm: 0px; }
body[data-books-per-row="3"] { --per: 3; }
body[data-books-per-row="5"] { --per: 5; }
body[data-books-per-row="6"] { --per: 6; }

/* ---------------------------------------------------------------- الأساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.7;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: normal; color: var(--store-primary-dark); }
:focus-visible { outline: 2px solid var(--store-primary-dark); outline-offset: 2px; }

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

.container { width: 100%; max-width: 1296px; margin-inline: auto; padding-inline: 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--store-accent); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

.warm { background: var(--warm); }
.section { padding: 64px 0; position: relative; }
.section-tight { padding: 36px 0; }

/* الكلمات والأرقام الضخمة الباهتة (زخرفة) */
.ghost {
	position: absolute;
	z-index: 0;
	font-weight: 800;
	line-height: .9;
	color: var(--ghost);
	pointer-events: none;
	user-select: none;
	white-space: nowrap;
	font-size: clamp(110px, 17vw, 260px);
	top: 50%;
	inset-inline-start: 50%;
	transform: translate(50%, -50%);
}

/* ---------------------------------------------------------------- الأزرار والحقول */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 10px 22px;
	border: 1px solid transparent; border-radius: var(--radius-sm);
	font-weight: 700; font-size: 15px; line-height: 1.2;
	transition: background .2s, color .2s, border-color .2s, transform .2s;
	white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-primary-dark); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--store-primary-dark) 82%, #000); }
.btn-dark { background: var(--store-accent); color: #fff; }
.btn-dark:hover { background: color-mix(in srgb, var(--store-accent) 80%, #000); }
.btn-outline { background: #fff; color: var(--store-text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--store-primary-dark); color: var(--store-primary-dark); }
.btn-lg { min-height: 52px; padding-inline: 28px; font-size: 16px; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--store-primary-dark); }
.link-more .icon { width: 18px; height: 18px; }

.field {
	width: 100%; min-height: 46px; padding: 10px 14px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.field:focus { outline: none; border-color: var(--store-primary-dark); box-shadow: 0 0 0 3px var(--soft); }
textarea.field { resize: vertical; }

/* ---------------------------------------------------------------- الرأس */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.hdr { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: 0; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav > ul { display: flex; gap: 4px; }
.main-nav > ul > li > a, .main-nav > ul > li > button {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 10px 14px; border: 0; background: none; font-weight: 500; font-size: 15px;
	border-radius: var(--radius-sm);
}
.main-nav > ul > li > a:hover, .main-nav > ul > li > button:hover { color: var(--store-primary-dark); }
.main-nav .icon { width: 16px; height: 16px; }
.has-drop { position: relative; }
.nav-drop {
	position: absolute; top: 100%; inset-inline-start: 0; min-width: 220px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-drop:hover .nav-drop, .has-drop:focus-within .nav-drop, .has-drop.open .nav-drop { opacity: 1; visibility: visible; transform: none; }
.drop-links a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); }
.drop-links a:hover { background: var(--warm); color: var(--store-primary-dark); }
.hdr-icons { display: flex; align-items: center; gap: 4px; flex: none; }
.hdr-btn {
	position: relative; display: inline-grid; place-items: center;
	width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent;
}
.hdr-btn:hover { background: var(--warm); }
.hdr-btn .icon { width: 22px; height: 22px; }
.hdr-btn .count {
	position: absolute; top: 2px; inset-inline-end: 0;
	min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
	background: var(--store-primary-dark); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.menu-toggle { display: none; }
.search-panel { display: none; border-top: 1px solid var(--line); background: #fff; padding: 14px 0; }
body.search-open .search-panel { display: block; }
.search-box { display: flex; gap: 10px; }
.search-box .field { flex: 1; }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 22, 18, .45); z-index: 60; opacity: 0; visibility: hidden; transition: .25s; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(320px, 86vw);
	background: #fff; padding: 18px; overflow-y: auto; transform: translateX(100%); transition: transform .3s; visibility: hidden;
}
body.drawer-open .drawer { transform: none; visibility: visible; }
body.drawer-open .drawer-backdrop, body.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-head .brand-name { font-size: 19px; }
.drawer-nav a, .drawer-cats a { display: flex; align-items: center; gap: 10px; padding: 11px 6px; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-title { font-size: 14px; color: var(--muted); margin: 18px 0 4px; }
.drawer-cats a { padding-inline-start: 14px; font-weight: 400; }
.drawer-sub { margin-top: 18px; }
.drawer-sub .icon { color: var(--store-primary-dark); }

/* ---------------------------------------------------------------- عناوين الأقسام */
.sec-head { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 30px; }
.sec-title { font-size: 34px; font-weight: 800; line-height: 1.25; }
.sec-sub { color: var(--muted); }
.sec-head .link-more { margin-top: 2px; }
.big-title { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; line-height: 1.25; }
.sub-title { font-size: 24px; font-weight: 800; margin-bottom: 14px; }

/* ---------------------------------------------------------------- الواجهة */
.hero { position: relative; overflow: hidden; }
.hero-in { position: relative; }
.slides { display: grid; }
.slide {
	grid-area: 1 / 1; position: relative;
	display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 30px;
	min-height: 600px; padding-inline-end: 120px;
	opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s;
}
.slide.is-active { opacity: 1; visibility: visible; }
.ghost-num { font-size: clamp(160px, 24vw, 340px); inset-inline-start: 46%; letter-spacing: 0; }
.slide-copy { position: relative; z-index: 2; padding: 56px 0; }
.pill {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 5px 16px 5px 5px; padding-inline: 5px 16px;
	background: #fff; border-radius: 999px; font-weight: 500; font-size: 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
}
.pill img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.pill-plain { padding-inline: 14px; }
.pill-plain .icon { width: 16px; height: 16px; color: var(--store-primary-dark); }
.slide-copy h1, .slide-copy h2 { font-size: clamp(34px, 4.6vw, 62px); font-weight: 800; line-height: 1.2; margin: 22px 0 16px; }
.slide-copy p { color: var(--muted); font-size: 17px; max-width: 520px; margin-bottom: 28px; }
.slide-art { position: relative; z-index: 1; align-self: end; display: flex; justify-content: center; padding-top: 40px; }
.arch-circle {
	position: absolute; z-index: 0; width: 78%; aspect-ratio: 1; border-radius: 50%;
	background: var(--soft); top: 6%; inset-inline-start: 50%; transform: translateX(50%);
	border: 1px solid color-mix(in srgb, var(--store-primary) 40%, transparent);
}
.arch {
	position: relative; z-index: 1; width: min(400px, 100%); aspect-ratio: 560 / 720;
	border-radius: 999px 999px 0 0; overflow: hidden; background: var(--box);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.scribble {
	position: absolute; z-index: 2; width: 110px; bottom: 120px; inset-inline-end: -10px;
	fill: none; stroke: var(--store-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.hero-thumbs {
	position: absolute; z-index: 3; top: 50%; inset-inline-end: 24px; transform: translateY(-50%);
	display: flex; flex-direction: column; gap: 14px;
}
.hero-thumbs button {
	width: 92px; height: 92px; padding: 6px; border-radius: var(--radius);
	background: #fff; border: 1px solid var(--line); transition: border-color .2s, transform .2s;
}
.hero-thumbs button img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 4px); }
.hero-thumbs button[aria-current="true"] { border: 2px solid var(--store-primary); transform: scale(1.04); }

/* ---------------------------------------------------------------- شريط الثقة */
.trust-wrap { padding: 34px 0 0; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.trust li { display: flex; align-items: center; gap: 14px; padding: 22px 18px; }
.trust li + li { border-inline-start: 1px solid var(--line); }
.trust .icon { width: 34px; height: 34px; stroke-width: 1.3; color: var(--store-primary-dark); }
.trust h3 { font-size: 16px; font-weight: 700; }
.trust p { color: var(--muted); font-size: 14px; }
body[data-show-trust-bar="false"] .trust-wrap { display: none; }

/* ---------------------------------------------------------------- التصنيفات */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.cat-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.cat-img { display: block; width: 100%; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--box); margin-bottom: 10px; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cat-card:hover .cat-img img { transform: scale(1.06); }
.cat-card h3 { font-size: 17px; font-weight: 700; }
.cat-count { color: var(--muted); font-size: 13px; }
.cat-grid-sm .cat-img { border-radius: var(--radius-sm); margin-bottom: 6px; }
.cat-grid-sm h3 { font-size: 15px; }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-row {
	display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory;
	padding-bottom: 22px; scrollbar-width: thin; scrollbar-color: var(--store-primary) var(--line);
}
.book-row::-webkit-scrollbar { height: 3px; }
.book-row::-webkit-scrollbar-track { background: var(--line); }
.book-row::-webkit-scrollbar-thumb { background: var(--store-primary); }
.book-row > .book-card { flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)); scroll-snap-align: start; }
.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px var(--gap); }
.book-grid-wide { grid-template-columns: repeat(var(--per), 1fr); }
body[data-books-per-row="5"] .listing .book-grid, body[data-books-per-row="6"] .listing .book-grid { grid-template-columns: repeat(4, 1fr); }

.book-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.book-media {
	position: relative; overflow: hidden; display: flex; flex-direction: column;
	background: var(--box); border-radius: var(--radius);
}
.book-cover { display: block; padding: 30px 16% 26px; }
.book-cover img {
	width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
	border-radius: 3px; box-shadow: 0 12px 22px rgba(35, 35, 35, .22);
	transition: transform .35s;
}
.book-card:hover .book-cover img { transform: translateY(-4px); }
.type-dot {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; flex: none;
}
.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; }
.book-media > .type-dot { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2; }
.book-badges { position: absolute; top: 14px; inset-inline-start: 50px; z-index: 2; display: flex; gap: 6px; }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 5px; font-size: 12px; font-weight: 700; color: #fff; line-height: 1.6; }
.badge-new, .badge-sale { background: var(--sale); }
.book-wish {
	position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2;
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	background: #fff; border: 0; color: var(--store-text); box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.book-wish .icon { width: 18px; height: 18px; }
.book-wish[aria-pressed="true"] { color: var(--sale); }
.book-wish[aria-pressed="true"] .icon { fill: currentColor; }
/* النظرة السريعة (quick-view): تحت المفضّلة، تطفو فوق الغلاف ولا تحجز مكانًا، والنافذة من المنصّة */
.book-quick {
	position: absolute; top: 56px; inset-inline-end: 12px; z-index: 2;
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	background: #fff; border: 0; color: var(--store-text); box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
	cursor: pointer; transition: opacity .25s, transform .25s, color .2s;
}
.book-quick .icon { width: 18px; height: 18px; }
.book-quick:hover { color: var(--store-primary-dark); }
@media (hover: hover) { .book-quick { opacity: 0; transform: translateX(-6px); } .book-card:hover .book-quick, .book-card:focus-within .book-quick { opacity: 1; transform: none; } }
/* زرّ السلّة: شريطٌ زيتونيّ في أسفل صندوق الغلاف، ظاهرٌ دائمًا (البند 7) */
.book-cta {
	position: relative; z-index: 1;
	display: flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 42px; padding: 6px 10px; border: 0; background: var(--store-primary-dark); color: #fff; font-weight: 700; font-size: 14px;
	transition: background .2s;
}
.book-cta .icon { width: 17px; height: 17px; }
.book-cta:hover { background: var(--store-accent); }
.book-cta:disabled { background: #DCDCD5; color: #45453F; cursor: not-allowed; }
.stock-band {
	position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%); z-index: 2;
	background: rgba(35, 35, 35, .86); color: #fff; text-align: center; font-weight: 700; padding: 8px;
}
.book-card.is-out .book-cover img { filter: grayscale(.7); opacity: .75; }
.book-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 14px 6px 0; }
.book-title { font-size: 16px; font-weight: 700; line-height: 1.45; }
.book-title a:hover { color: var(--store-primary-dark); }
.book-author { color: var(--muted); font-size: 14px; }
.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: #D9D9D2; }
.rating-lg .stars .icon { width: 18px; height: 18px; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; justify-content: center; gap: 4px 8px; font-weight: 800; font-size: 17px; color: var(--store-primary-dark); }
.price del { font-size: 14px; font-weight: 400; color: var(--muted); }

/* أشكال البطاقة */
body[data-card-style="framed"] .book-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 10px 16px; background: #fff; }
body[data-card-style="framed"] .book-media { border-radius: var(--radius-sm); }
body[data-card-style="minimal"] .book-media { background: transparent; overflow: visible; }
body[data-card-style="minimal"] .book-cover { padding: 0; }
body[data-card-style="minimal"] .book-media .book-cta { margin-top: 10px; border-radius: var(--radius-sm); }
body[data-card-style="minimal"] .book-cover img { border-radius: var(--radius-sm); }

/* ---------------------------------------------------------------- قسم المجموعة */
.collection-sec, .signature-sec { overflow: hidden; padding: 72px 0; }
.collection { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 34px; align-items: center; }
.col-banner { display: block; border-radius: var(--radius); overflow: hidden; background: var(--box); }
.col-banner img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.col-banner:hover img { transform: scale(1.04); }
.col-a { aspect-ratio: 420 / 600; }
.col-b { aspect-ratio: 4 / 5; align-self: start; margin-top: 30px; }
.col-copy p { color: var(--muted); font-size: 16px; margin: 16px 0 26px; }
.ghost-word { top: 45%; }

/* ---------------------------------------------------------------- مختاراتنا: الفسيفساء */
.signature { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.15fr; gap: 50px; align-items: center; }
.ghost-start { inset-inline-start: 4%; transform: translateY(-50%); }
[data-option]:empty { display: none; }
.sig-copy p { color: var(--muted); font-size: 16px; margin: 16px 0 26px; max-width: 480px; }
.mosaic { position: relative; aspect-ratio: 1.15; }
.mosaic-tile { position: absolute; }
.mosaic-tile a { position: relative; display: block; }
.mosaic-tile img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius-sm); box-shadow: 0 14px 30px rgba(35, 35, 35, .18); transition: transform .35s; }
.mosaic-tile a:hover img { transform: translateY(-5px); }
.mosaic-tile .type-dot { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1; }
.mosaic-cap {
	position: absolute; bottom: 10px; inset-inline: 10px; z-index: 1;
	display: flex; flex-direction: column; align-items: center; padding: 6px 8px; border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, .96); text-align: center;
}
.mosaic-cap .book-title { font-size: 14px; }
.mosaic-cap .price { font-size: 14px; }
.mosaic-cap .price del { font-size: 12px; }
.t1 { width: 38%; inset-inline-end: 0; top: 8%; }
.t2 { width: 28%; inset-inline-end: 41%; top: 0; }
.t3 { width: 24%; inset-inline-end: 76%; top: 26%; }
.t4 { width: 24%; inset-inline-end: 47%; top: 50%; }

/* ---------------------------------------------------------------- المؤلّفون */
.author-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.author-ph { display: block; width: 100%; max-width: 160px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #fff; margin-bottom: 12px; border: 6px solid #fff; box-shadow: var(--shadow); }
.author-ph img { width: 100%; height: 100%; object-fit: cover; }
.author-card h3 { font-size: 17px; font-weight: 700; }
.author-card > span:last-child { color: var(--muted); font-size: 14px; }
.author-card:hover h3 { color: var(--store-primary-dark); }

/* ---------------------------------------------------------------- مروحة «شاهدتَه مؤخّرًا» */
.fan { display: flex; justify-content: center; align-items: flex-end; gap: 14px; }
.fan-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; flex: 0 0 15%; }
.fan-item:nth-child(2), .fan-item:nth-child(4) { flex-basis: 19%; }
.fan-item:nth-child(3) { flex-basis: 24%; }
.fan-cover { position: relative; display: block; width: 100%; margin-bottom: 10px; }
.fan-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: 0 10px 24px rgba(35, 35, 35, .15); transition: transform .35s; }
.fan-cover:hover img { transform: translateY(-6px); }
.fan-cover .type-dot { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1; }
.fan-item .book-title { font-size: 15px; }
.fan-item .price { font-size: 15px; }

/* ---------------------------------------------------------------- النشرة */
.newsletter { padding: 60px 0 64px; text-align: center; background: var(--warm); }
.newsletter p { color: var(--muted); margin: 8px 0 22px; }
.nl-box {
	display: flex; gap: 8px; max-width: 620px; margin-inline: auto; padding: 6px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.nl-box input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 14px; }
.nl-box input:focus { outline: none; }
body[data-show-newsletter="false"] .newsletter { display: none; }

/* ---------------------------------------------------------------- التذييل */
.site-footer { background: var(--store-accent); color: var(--foot-text); padding: 56px 0 0; }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.foot-col h2 { color: #fff; font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.foot-links li + li, .foot-contact li + li { margin-top: 8px; }
.foot-links a:hover, .foot-contact a:hover, .foot-inline a:hover { color: #fff; }
.foot-contact li { display: flex; align-items: flex-start; gap: 10px; }
.foot-contact .icon { width: 18px; height: 18px; margin-top: 4px; color: var(--foot-text); }
.foot-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 36px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.foot-brand .brand-name { color: #fff; font-size: 26px; }
.foot-brand .brand img { width: 44px; height: 44px; background: #fff; border-radius: 50%; padding: 4px; }
.foot-brand p { max-width: 540px; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--radius-sm); color: #fff; }
.social a:hover { background: rgba(255, 255, 255, .1); }
.social .icon { width: 18px; height: 18px; }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 20px 0 24px; font-size: 14px; }
.foot-inline { display: flex; flex-wrap: wrap; gap: 6px 22px; }

/* ---------------------------------------------------------------- رأس الصفحات الداخليّة */
.page-band { position: relative; overflow: hidden; padding: 46px 0 50px; text-align: center; }
.page-band .container { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.page-band h1 { font-size: clamp(32px, 4vw, 50px); font-weight: 800; line-height: 1.2; }
.page-band-sm { padding: 34px 0 38px; }
.page-lead { color: var(--muted); font-size: 16px; max-width: 620px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: #9A9A92; }
.breadcrumb a:hover { color: var(--store-primary-dark); }
.breadcrumb [aria-current] { color: var(--store-text); }

/* ---------------------------------------------------------------- التصنيف */
.listing { display: grid; grid-template-columns: 270px 1fr; gap: 34px; align-items: start; }
.filters { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h2 { font-size: 20px; font-weight: 800; }
.filters-head .hdr-btn { display: none; }
.filter-box { background: var(--warm); border-radius: var(--radius); padding: 16px 18px; }
.filter-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 8px; padding: 5px 0; cursor: pointer; font-size: 14px; }
.check input { accent-color: var(--store-primary-dark); width: 16px; height: 16px; }
.check .count { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.price-range { display: flex; align-items: center; gap: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar p { color: var(--muted); }
.toolbar b { color: var(--store-text); }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.toolbar select { width: auto; min-width: 180px; }
.filters-toggle { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chips button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--warm); font-size: 14px; }
.chips .icon { width: 14px; height: 14px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 6px; border-radius: var(--radius-sm); font-weight: 700; }
.pagination a { border: 1px solid var(--line); }
.pagination a:hover { border-color: var(--store-primary-dark); color: var(--store-primary-dark); }
.pagination a[aria-current="page"] { background: var(--store-primary-dark); border-color: var(--store-primary-dark); color: #fff; }
.pagination .icon { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- صفحة الكتاب */
.pdp-band { padding: 26px 0 64px; overflow: hidden; }
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 24px; align-items: start; }
.gallery { display: flex; gap: 18px; align-items: center; }
.thumbs { display: flex; flex-direction: column; gap: 12px; flex: none; }
.thumbs button { width: 78px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.thumbs button[aria-pressed="true"] { border: 2px solid var(--store-primary); }
.thumbs img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; }
.gallery-main { position: relative; flex: 1; display: flex; justify-content: center; padding-top: 30px; }
.arch-book { width: min(400px, 100%); aspect-ratio: 4 / 5; display: grid; place-items: center; background: #fff; padding: 56px 18% 34px; }
.arch-book img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 18px 34px rgba(35, 35, 35, .25); }
.arch-book .type-dot { position: absolute; top: 46%; inset-inline-start: 18px; width: 38px; height: 38px; }
.arch-book .type-dot .icon { width: 20px; height: 20px; }
.pdp-info { display: flex; flex-direction: column; gap: 12px; }
.pdp-type { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); font-size: 14px; }
.pdp-type .type-dot { width: 26px; height: 26px; }
.pdp-type .type-dot .icon { width: 14px; height: 14px; }
.pdp-info h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; line-height: 1.2; }
.pdp-author { color: var(--muted); }
.pdp-author a { color: var(--store-primary-dark); font-weight: 700; }
.pdp-rate { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pdp-rate > a { color: var(--muted); text-decoration: underline; }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; font-size: 30px; font-weight: 800; color: var(--store-primary-dark); }
.pdp-price del { font-size: 18px; font-weight: 400; color: var(--muted); }
.pdp-price .badge { align-self: center; }
.pdp-lead { color: var(--muted); font-size: 16px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fact { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 12px 14px; background: #fff; border-radius: var(--radius-sm); }
.fact .icon { grid-row: span 2; width: 24px; height: 24px; color: var(--store-primary-dark); }
.fact small { color: var(--muted); font-size: 13px; }
.fact b { font-size: 15px; }
.stock { display: inline-flex; align-items: center; gap: 6px; color: #2C6B45; font-weight: 700; font-size: 14px; }
.stock .icon { width: 18px; height: 18px; }
.pdp-buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wish-lg { width: 52px; height: 52px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); }
.wish-lg[aria-pressed="true"] { color: var(--sale); }
.wish-lg[aria-pressed="true"] .icon { fill: currentColor; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; height: 52px; }
.qty button { width: 40px; height: 100%; border: 0; background: none; display: grid; place-items: center; }
.qty .icon { width: 16px; height: 16px; }
.qty input { width: 46px; height: 100%; border: 0; text-align: center; background: none; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-sample .btn { width: 100%; max-width: 360px; }
.pdp-perks { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pdp-perks li { display: flex; align-items: center; gap: 10px; }
.pdp-perks .icon { color: var(--store-primary-dark); }
.pdp-more { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; }
.prose p + p { margin-top: 12px; }
.prose { color: #3D3D3D; font-size: 16px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 11px 4px; border-bottom: 1px solid var(--line); text-align: start; font-size: 15px; }
.spec-table th { color: var(--muted); font-weight: 500; width: 42%; }

/* الآراء */
.reviews-layout { display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: start; }
.reviews-side { display: flex; flex-direction: column; gap: 18px; }
.reviews-summary { display: flex; align-items: center; gap: 16px; }
.reviews-summary strong { font-size: 54px; font-weight: 800; line-height: 1; }
.reviews-summary > div { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 14px; }
.rating-bars li { display: grid; grid-template-columns: 62px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.rating-bars li + li { margin-top: 6px; }
.bar { height: 6px; background: #fff; border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--store-primary); }
.review-form { background: #fff; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.review-form h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.review-form h3 .icon { color: var(--store-primary-dark); }
.review-form p { color: var(--muted); font-size: 14px; }
.star-field { border: 0; padding: 0; margin: 0; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: #D9D9D2; }
.star-input label .icon { width: 26px; height: 26px; }
.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-dark); border-radius: 4px; }
.review-list { display: flex; flex-direction: column; gap: 14px; }
.review-item { background: #fff; border-radius: var(--radius); padding: 20px 22px; }
.review-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-top > div { display: flex; flex-direction: column; line-height: 1.4; }
.review-top small { color: var(--muted); font-size: 13px; }
.review-top .rating { margin-inline-start: auto; }
.review-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--soft); color: var(--store-accent); font-weight: 800; }
.review-item p { color: #3D3D3D; }

/* ---------------------------------------------------------------- المؤلّف */
.author-band { position: relative; overflow: hidden; padding: 26px 0 60px; }
.author-band .container { position: relative; z-index: 1; }
.author-hero { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; margin-top: 20px; }
.author-art { position: relative; display: flex; justify-content: center; padding-top: 30px; }
.arch-author { width: min(340px, 100%); aspect-ratio: 4 / 5; }
.author-info { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.author-info h1 { font-size: clamp(34px, 4vw, 52px); font-weight: 800; line-height: 1.2; }
.author-count { font-size: 18px; color: var(--muted); }
.author-count em { font-weight: 800; }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 34px; align-items: start; }
.cart-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--warm); border-radius: var(--radius); overflow: hidden; }
.cart-table th { text-align: start; font-size: 14px; color: var(--muted); font-weight: 500; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: 0; }
.cart-table .price { justify-content: flex-start; font-size: 16px; }
.cart-book { display: flex; align-items: center; gap: 14px; }
.cart-thumb { flex: none; width: 70px; }
.cart-thumb img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 6px 12px rgba(35, 35, 35, .15); }
.cart-book h3 { font-size: 16px; font-weight: 700; }
.cart-book p { color: var(--muted); font-size: 14px; }
.type-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.type-label .type-dot { width: 24px; height: 24px; }
.type-label .type-dot .icon { width: 13px; height: 13px; }
.cart-table .qty { height: 42px; }
.cart-remove { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #fff; color: var(--muted); }
.cart-remove:hover { color: var(--sale); }
.cart-under { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cart-empty { text-align: center; padding: 50px 20px; background: var(--warm); border-radius: var(--radius); }
.cart-empty h2 { font-size: 24px; margin: 10px 0 6px; }
.cart-empty p { color: var(--muted); margin-bottom: 18px; }
.empty-icon { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: #fff; color: var(--store-primary-dark); }
.empty-icon .icon { width: 30px; height: 30px; }
.cart-summary { position: sticky; top: 96px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.cart-summary h2 { font-size: 20px; font-weight: 800; }
.coupon { display: flex; gap: 8px; }
.coupon .btn { flex: none; }
.coupon-on { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.coupon-on .icon { width: 16px; height: 16px; color: var(--store-primary-dark); }
.coupon-on button { margin-inline-start: auto; border: 0; background: none; color: var(--sale); font-weight: 700; text-decoration: underline; }
.sum-rows > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.sum-rows dt { color: var(--muted); }
.sum-rows .minus { color: var(--sale); }
.sum-total { border-bottom: 0 !important; font-size: 20px; font-weight: 800; }
.sum-total dt { color: var(--store-text) !important; }
.sum-total dd { color: var(--store-primary-dark); }
.sum-note { color: var(--muted); font-size: 13px; text-align: center; }

/* ---------------------------------------------------------------- 404 */
.nf { position: relative; overflow: hidden; padding: 70px 0 80px; text-align: center; }
.ghost-nf { font-size: clamp(180px, 30vw, 420px); top: 46%; }
.nf-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.nf h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; }
.nf p { color: var(--muted); max-width: 520px; font-size: 16px; }
.nf-search { width: 100%; max-width: 560px; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.nf-book { position: relative; width: 150px; height: 104px; margin-bottom: 8px; }
.nf-book span { position: absolute; bottom: 0; width: 50%; height: 100%; background: #fff; border: 4px solid var(--store-primary-dark); }
.nf-book span:first-child { inset-inline-start: 0; border-radius: 4px 14px 4px 4px; transform: skewY(-8deg); transform-origin: left bottom; }
.nf-book span:last-child { inset-inline-end: 0; border-radius: 14px 4px 4px 4px; transform: skewY(8deg); transform-origin: right bottom; }
.nf-book span::after { content: ""; position: absolute; inset: 22px 14px auto; height: 26px; background: repeating-linear-gradient(to bottom, var(--soft) 0 4px, transparent 4px 11px); }

/* ---------------------------------------------------------------- صفحة المكوّنات */
.kit-h { font-size: 22px; font-weight: 800; margin: 34px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.kit .kit-h:first-child { margin-top: 0; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.kit-row > span:not([class]) { color: var(--muted); font-size: 14px; }
.kit-gap { margin-top: 28px; max-width: 420px; grid-template-columns: repeat(2, 1fr); }

/* ==========================================================================
   العروض
   ========================================================================== */
/* ---------------------------------------------------------------- الأسئلة الشائعة (faq) */
.faq-list { max-width: 880px; margin-inline: auto; display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(35, 35, 35, .04); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font-size: 17px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); color: var(--store-accent); font-size: 20px; line-height: 1; transition: background .2s, color .2s; }
.faq-item[open] summary::after { content: "−"; background: var(--store-accent); color: #fff; }
.faq-item p { padding: 0 22px 20px; color: var(--muted); }

/* ---------------------------------------------------------------- المدوّنة (post.*) */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.post-card { display: flex; flex-direction: column; min-width: 0; }
.post-media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--box); aspect-ratio: 16 / 9; }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; flex: 1; }
.post-meta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--muted); }
.post-body .post-meta { justify-content: flex-start; }
.post-meta .icon { width: 16px; height: 16px; color: var(--store-primary-dark); }
.post-title { font-size: 19px; font-weight: 800; line-height: 1.45; }
.post-title a:hover { color: var(--store-primary-dark); }
.post-excerpt { color: var(--muted); font-size: 15px; }
.post-body .link-more { margin-top: auto; padding-top: 4px; }
.icon-flip { transform: scaleX(-1); }
.page-band .post-page-title { max-width: 860px; font-size: clamp(28px, 3.4vw, 42px); }
.article { max-width: 820px; margin-inline: auto; }
.article-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.article-body { margin-top: 26px; font-size: 17px; line-height: 1.95; }
.article-body p + p { margin-top: 16px; }
.article-back { margin-top: 24px; }

/* ==========================================================================
   الإصدار الثاني: تبويبات الصفّ، وعرض الأسبوع بعدّاد، وآراء القرّاء، واختيار الصيغة، والشبكة والقائمة
   ========================================================================== */
/* ---------------------------------------------------------------- تبويبات صفّ الكتب (القاعدة 16) */
.row-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.row-tab {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 18px;
	border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 500; font-size: 15px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .04); transition: background .2s, color .2s, border-color .2s;
}
.row-tab:hover { border-color: var(--store-primary-dark); color: var(--store-primary-dark); }
.row-tab[aria-selected="true"] { background: var(--store-primary-dark); border-color: var(--store-primary-dark); color: #fff; }
.row-tab img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* ---------------------------------------------------------------- عرض الأسبوع: كتابٌ واحد في اللوحة المقوّسة وعدّادٌ للقسم */
.deal-sec { background: var(--store-accent); color: #fff; overflow: hidden; padding: 72px 0; }
.deal-sec .ghost { color: rgba(255, 255, 255, .05); inset-inline-start: 72%; }
.deal {
	position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px;
	grid-template-areas: "head art" "info art"; align-items: center;
}
.deal-items, .deal-book { display: contents; }
.deal-head { grid-area: head; align-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.deal-head .pill { color: var(--store-text); }
.deal-sec em { color: var(--soft); }
.deal-art { --aw: min(380px, 100cqw); grid-area: art; position: relative; display: flex; justify-content: center; padding-top: 24px; container-type: inline-size; }
.deal-art .arch-circle { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
.deal-art .arch-book { background: color-mix(in srgb, var(--store-primary) 30%, #fff); width: var(--aw); padding: calc(var(--aw) * .125) calc(var(--aw) * .19) calc(var(--aw) * .075); }
.deal-art .arch-book img { transition: transform .35s; }
.deal-art .arch-book:hover img { transform: translateY(-5px); }
.deal-info { grid-area: info; align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.deal-title { font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; line-height: 1.25; }
.deal-title a:hover { color: var(--soft); }
.deal-author { color: var(--foot-text); }
.deal-author a { color: #fff; font-weight: 700; }
.deal-sec .rating, .deal-sec .rc { color: var(--foot-text); }
.deal-price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 28px; font-weight: 800; }
.deal-price del { font-size: 17px; font-weight: 400; color: var(--foot-text); }
.deal-desc { color: var(--foot-text); font-size: 16px; max-width: 520px; }
.deal-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.btn-light { background: #fff; color: var(--store-accent); }
.btn-light:hover { background: var(--soft); }
.deal-wish { width: 52px; height: 52px; border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--radius-sm); color: #fff; }
.deal-wish:hover { background: rgba(255, 255, 255, .1); }
.deal-wish[aria-pressed="true"] .icon { fill: currentColor; }

.countdown { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cd-label { font-size: 14px; color: var(--foot-text); margin-inline-end: 4px; }
.cd-unit {
	display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
	min-width: 62px; padding: 8px 6px 6px; border-radius: var(--radius); line-height: 1.1;
	background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
}
.cd-unit b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: var(--foot-text); margin-top: 3px; }
.countdown[hidden] { display: none; }

/* ---------------------------------------------------------------- آراء القرّاء في الرئيسيّة (reviews.items) */
.store-score { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: #fff; border-radius: 999px; color: var(--muted); font-size: 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, .04); }
.store-score b { color: var(--store-text); font-size: 16px; }
.review-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.review-card { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 24px 24px 20px; background: #fff; border-radius: var(--radius); }
.review-card blockquote { margin: 0; color: #3D3D3D; font-size: 16px; }
.review-who { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.review-who > span:last-child { display: flex; flex-direction: column; line-height: 1.45; }
.review-who small { color: var(--muted); font-size: 13px; }
body[data-show-reviews="false"] .home-reviews { display: none; }

/* ---------------------------------------------------------------- اختيار الصيغة (book.formats) */
.formats-box { display: flex; flex-direction: column; gap: 8px; }
.formats-label { font-size: 14px; font-weight: 700; color: var(--muted); }
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.format-opt {
	display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px;
	padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .2s;
}
.format-opt .type-dot { grid-row: span 2; width: 26px; height: 26px; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-opt b { font-size: 14px; line-height: 1.3; }
.format-opt small { font-size: 13px; color: var(--store-primary-dark); font-weight: 700; }
.format-opt:hover { border-color: var(--store-primary-dark); }
.format-opt[aria-current="page"] { border: 2px solid var(--store-primary-dark); padding: 8px 11px; }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ .format-opt)) { display: none; }

/* ---------------------------------------------------------------- الشبكة والقائمة في صفحة التصنيف */
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.view-switch button { display: grid; place-items: center; width: 42px; height: 42px; border: 0; background: none; color: var(--muted); }
.view-switch button + button { border-inline-start: 1px solid var(--line); }
.view-switch button[aria-pressed="true"] { background: var(--store-primary-dark); color: #fff; }
.view-switch .icon { width: 18px; height: 18px; }
.chips .chips-clear { border: 0; background: none; color: var(--store-primary-dark); font-weight: 700; text-decoration: underline; }
.book-grid.is-list { grid-template-columns: 1fr !important; gap: 16px; }
.book-grid.is-list .book-card { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.book-grid.is-list .book-cover { padding: 18px 16%; }
.book-grid.is-list .book-body { align-items: flex-start; text-align: start; padding: 0; }
.book-grid.is-list .price { justify-content: flex-start; }

@media (max-width: 1180px) {
	.main-nav > ul > li > a, .main-nav > ul > li > button { padding-inline: 9px; }
	.slide { padding-inline-end: 110px; }
}

@media (max-width: 1024px) {
	.main-nav { display: none; }
	.menu-toggle { display: inline-grid; }
	.hdr { gap: 8px; }
	.hdr-icons { margin-inline-start: auto; }
	.book-row > .book-card { flex-basis: calc((100% - 2 * var(--gap)) / 3); }
	body[data-books-per-row="3"] .book-row > .book-card { flex-basis: calc((100% - 2 * var(--gap)) / 3); }
	.book-grid-wide { grid-template-columns: repeat(3, 1fr); }
	.cat-grid, .author-grid { grid-template-columns: repeat(3, 1fr); }
	.slide { grid-template-columns: 1fr 1fr; min-height: 520px; padding-inline-end: 0; }
	.hero-thumbs { position: static; transform: none; flex-direction: row; justify-content: center; padding-bottom: 22px; }
	.hero-thumbs button { width: 64px; height: 64px; }
	.collection { gap: 22px; }
	.signature { gap: 30px; }
	.foot-cols { grid-template-columns: repeat(2, 1fr); }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(330px, 88vw);
		background: #fff; padding: 18px; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s;
	}
	body.filters-open .filters { transform: none; visibility: visible; }
	.filters-head .hdr-btn, .filters-toggle { display: inline-flex; }
	.pdp, .author-hero { grid-template-columns: 1fr; gap: 34px; }
	.pdp-more, .reviews-layout { grid-template-columns: 1fr; gap: 34px; }
	.cart-layout { grid-template-columns: 1fr; }
	.cart-summary { position: static; }
	.deal { column-gap: 36px; }
	.cd-label { width: 100%; }
	.review-cards { gap: 14px; }
	.review-card { padding: 20px 18px 16px; }
}

@media (max-width: 860px) {
	.collection { grid-template-columns: 1fr 1fr; }
	.col-copy { grid-column: 1 / -1; grid-row: 1; text-align: center; }
	.col-a, .col-b { margin-top: 0; aspect-ratio: 4 / 5; }
	.signature { grid-template-columns: 1fr; }
	.sig-copy { text-align: center; }
	.sig-copy p { margin-inline: auto; }
	.trust { grid-template-columns: repeat(2, 1fr); }
	.trust li:nth-child(3) { border-inline-start: 0; }
	.trust li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 1024px) {
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-grid:not(.post-grid--blog) > :nth-child(3) { display: none; }
}
@media (max-width: 767px) {
	.post-grid { grid-template-columns: 1fr; }
	.post-grid:not(.post-grid--blog) > :nth-child(3) { display: flex; }
	.faq-item summary { padding: 15px 16px; font-size: 16px; }
	.faq-item p { padding: 0 16px 16px; }
	.article-body { font-size: 16px; }
	.book-quick { top: 50px; width: 32px; height: 32px; }
	.container { padding-inline: 16px; }
	.section { padding: 46px 0; }
	.sec-title { font-size: 26px; }
	.hide-sm { display: none; }
	.brand-name { font-size: 19px; }
	.hdr { min-height: 64px; }
	.slide { grid-template-columns: 1fr; gap: 0; min-height: 0; text-align: center; }
	.slide-copy { padding: 26px 0 4px; }
	.slide-copy h1, .slide-copy h2 { margin: 16px 0 10px; }
	.slide-copy p { margin-inline: auto; font-size: 15px; margin-bottom: 20px; }
	.slide-art { padding-top: 14px; }
	.arch { width: min(232px, 66%); }
	.hero .arch-circle { width: 70%; }
	.hero-thumbs { gap: 10px; padding-bottom: 16px; }
	.hero-thumbs button { width: 50px; height: 50px; padding: 4px; }
	.scribble { width: 64px; bottom: 50px; inset-inline-end: 4px; }
	/* شريط الثقة: صفٌّ واحد يُمرَّر */
	.trust-wrap { padding-top: 18px; }
	.trust { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust::-webkit-scrollbar { display: none; }
	.trust li { flex: 0 0 74%; scroll-snap-align: start; padding: 14px 12px; gap: 10px; }
	.trust li:nth-child(n) { border-top: 0; }
	.trust li:nth-child(n+2) { border-inline-start: 1px solid var(--line); }
	.trust .icon { width: 28px; height: 28px; }
	.trust h3 { font-size: 14px; }
	.trust p { font-size: 13px; }
	.cat-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
	.cat-card h3 { font-size: 14px; }
	/* التصنيفات والمقالات والآراء: مساراتٌ أفقيّة */
	.cat-scroll, .post-scroll, .review-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--store-primary) var(--line); }
	.cat-scroll > * { flex: 0 0 29%; scroll-snap-align: start; }
	.post-scroll > * { flex: 0 0 82%; scroll-snap-align: start; }
	.post-grid.post-scroll > :nth-child(3) { display: flex; }
	.review-cards { gap: 12px; }
	.review-cards > * { flex: 0 0 84%; scroll-snap-align: start; }
	.row-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; width: calc(100% + 32px); margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: none; }
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tab { flex: none; min-height: 40px; font-size: 14px; }
	.deal-sec { padding: 50px 0; }
	.deal { grid-template-columns: 1fr; grid-template-areas: "head" "art" "info"; }
	.deal-head { align-items: center; text-align: center; margin-bottom: 0; }
	.countdown { justify-content: center; }
	.cd-label { width: 100%; text-align: center; margin: 0; }
	.cd-unit { min-width: 58px; }
	.deal-art { padding-top: 18px; }
	.deal-art { --aw: min(250px, 72cqw); }
	.deal-info { align-items: center; text-align: center; margin-top: 18px; }
	.deal-price { justify-content: center; font-size: 24px; }
	.formats { gap: 6px; }
	.format-opt { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 2px; padding: 8px 4px; }
	.format-opt[aria-current="page"] { padding: 7px 3px; }
	.format-opt .type-dot { grid-row: auto; }
	.book-grid.is-list .book-card { grid-template-columns: 112px 1fr; gap: 14px; }
	.view-switch button { width: 40px; height: 40px; }
	.book-row { --gap: 14px; }
	.book-row > .book-card, body[data-books-per-row="3"] .book-row > .book-card { flex-basis: calc((100% - var(--gap)) / 2.15); }
	.book-grid, .book-grid-wide { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
	body[data-books-per-row="5"] .listing .book-grid, body[data-books-per-row="6"] .listing .book-grid { grid-template-columns: repeat(2, 1fr); }
	.book-cover { padding: 22px 12% 18px; }
	.book-title { font-size: 15px; }
	.book-badges { inset-inline-start: 46px; top: 13px; }
	.book-wish { width: 32px; height: 32px; }
	.book-cta { min-height: 40px; font-size: 13px; gap: 6px; }
	.collection { grid-template-columns: 1fr 1fr; gap: 14px; }
	.collection-sec, .signature-sec { padding: 50px 0; }
	.mosaic { aspect-ratio: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.mosaic-tile { position: relative; width: auto; inset: auto; }
	.ghost-num { display: none; }
	.author-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
	.author-card h3 { font-size: 14px; }
	.author-card > span:last-child { font-size: 12px; }
	.fan { justify-content: flex-start; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
	.fan-item, .fan-item:nth-child(n) { flex: 0 0 38%; scroll-snap-align: start; }
	.fan-item:nth-child(3) { flex-basis: 46%; }
	.foot-cols { grid-template-columns: 1fr 1fr; gap: 26px 16px; }
	.foot-cols .foot-col:last-child { grid-column: 1 / -1; }
	.foot-bottom { flex-direction: column; text-align: center; }
	.foot-inline { justify-content: center; }
	.toolbar select { min-width: 0; }
	.gallery { flex-direction: column-reverse; }
	.thumbs { flex-direction: row; }
	.thumbs button { width: 64px; }
	.fact { padding: 10px; column-gap: 8px; }
	.fact .icon { width: 20px; height: 20px; }
	.fact b { font-size: 14px; overflow-wrap: anywhere; }
	.pdp-buy .btn { flex: 1; }
	.reviews-summary strong { font-size: 44px; }
	.review-top { flex-wrap: wrap; }
	.cart-table thead { display: none; }
	.cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
	.cart-table tr { position: relative; padding: 14px; border-bottom: 1px solid var(--line); }
	.cart-table td { padding: 6px 0; border: 0; display: flex; align-items: center; justify-content: space-between; }
	.cart-table td::before { content: attr(data-label); color: var(--muted); font-size: 14px; }
	.cart-table td:first-child { display: block; padding-inline-end: 44px; }
	.cart-table .cell-remove { position: absolute; top: 14px; inset-inline-end: 14px; width: auto; padding: 0; }
	.nl-box { flex-direction: column; background: transparent; border: 0; padding: 0; }
	.nl-box input { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); min-height: 48px; }
	.search-box { flex-direction: column; }
	.kit-gap { max-width: none; }
}

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

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