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

:root {
	/* ألوان المتجر (قيمٌ تجريبيّة يغيّرها الناشر) */
	--store-primary: #FF8E64;
	--store-primary-dark: #A84A2A;
	--store-accent: #333333;
	--store-bg: #FFFFFF;
	--store-text: #333333;

	/* محايدات */
	--muted: #666666;
	--soft: #F5F5F5;
	--line: #E4E4E4;
	--white: #FFFFFF;
	--star: #F2A900;           /* النجوم ذهبيّة دائمًا */
	--star-off: #D6D6D6;
	--ok: #2E7D4F;
	--pink: color-mix(in srgb, var(--store-primary) 12%, #EEE4E1);   /* خلفيّة الهيرو والبانرات */
	--ring: color-mix(in srgb, var(--store-primary) 55%, #FFFFFF);
	--hero-dark: #2B2625;

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

	--r: 6px;
	--r-lg: 10px;
	--per-row: 4;
	--container: 1320px;
	--gutter: 24px;
	--shadow: 0 10px 30px rgba(51, 51, 51, .10);
}

body[data-corners="sharp"] { --r: 0; --r-lg: 0; }
body[data-books-per-row="3"] { --per-row: 3; }
body[data-books-per-row="4"] { --per-row: 4; }
body[data-books-per-row="5"] { --per-row: 5; }
body[data-books-per-row="6"] { --per-row: 6; }

/* ---------------------------------------------------------------- أساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 150px; }
body {
	margin: 0;
	font-family: "Tajawal", system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.7;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--store-primary-dark); outline-offset: 2px; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.icon {
	width: 20px; height: 20px; flex: none;
	fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------------------------------------------------------------- أزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 26px;
	font-size: 14.5px; font-weight: 700; line-height: 1.2;
	border: 1px solid transparent; border-radius: var(--r);
	background: none; transition: background-color .2s, color .2s, border-color .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 13px; }
.btn-lg { min-height: 52px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--store-primary); color: var(--store-accent); }
.btn-primary:hover { background: var(--store-primary-dark); color: var(--white); }
.btn-dark { background: var(--store-accent); color: var(--white); }
.btn-dark:hover { background: var(--store-primary-dark); }
.btn-outline { background: var(--white); color: var(--store-accent); border-color: var(--store-accent); }
.btn-outline:hover { background: var(--store-accent); color: var(--white); }
.btn-sample { background: var(--white); color: var(--store-primary-dark); border-color: var(--store-primary-dark); }
.btn-sample:hover { background: var(--store-primary-dark); color: var(--white); }

.link-under {
	display: inline-block; color: var(--store-primary-dark);
	font-weight: 700; font-size: 14px;
	text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.link-under:hover { color: var(--store-accent); }

/* «تسوّق الآن» مسطَّرٌ تتقدّمه دائرة بيضاء */
.circle-link {
	position: relative; isolation: isolate;
	display: inline-flex; align-items: center; min-height: 48px;
	padding-inline-start: 28px; padding-inline-end: 4px;
	font-weight: 700; font-size: 15px; color: var(--store-text);
}
.circle-link::before {
	content: ""; position: absolute; z-index: -1; inset-inline-start: 0; top: 0;
	width: 48px; height: 48px; border-radius: 24px; background: var(--white);
	box-shadow: 0 4px 14px rgba(51, 51, 51, .08);
	transition: width .3s ease;
}
.circle-link span { text-decoration: underline; text-underline-offset: 5px; }
.circle-link:hover::before { width: calc(100% + 24px); }
.section .circle-link::before, .nf .circle-link::before { background: var(--pink); box-shadow: none; }

.link-icon {
	display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none;
	font-size: 14px; text-decoration: underline; text-underline-offset: 4px;
}
.link-icon .icon { width: 18px; height: 18px; }
.link-icon[aria-pressed="true"] .icon { fill: var(--store-primary); stroke: var(--store-primary); }

.field, .hdr-search input, .nf-search input, .nl-field input {
	height: 46px; padding: 0 14px;
	border: 1px solid var(--line); border-radius: var(--r);
	background: var(--white); color: var(--store-text); min-width: 0;
}
textarea.field { height: auto; padding: 12px 14px; resize: vertical; width: 100%; }
select.field { padding-inline-end: 30px; }

/* ---------------------------------------------------------------- شارات ونوع الكتاب والتقييم والسعر */
.badge {
	display: inline-block; padding: 3px 10px; border-radius: 3px;
	font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.badge-new { background: var(--store-accent); color: var(--white); }
.badge-sale { background: var(--store-primary); color: var(--store-accent); }
.badge-out { background: #5A5A5A; color: var(--white); }

.type-dot {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 50%; color: var(--white);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.type-dot .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.type-dot[data-type="print"] { background: var(--type-print); }
.type-dot[data-type="ebook"] { background: var(--type-ebook); }
.type-dot[data-type="audio"] { background: var(--type-audio); }
.type-dot[data-type="educational"] { background: var(--type-edu); }
.type-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.type-label .type-dot { width: 26px; height: 26px; box-shadow: none; }
.type-label .type-dot .icon { width: 14px; height: 14px; }

.rating { display: inline-flex; align-items: center; gap: 6px; }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars .icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.stars .off { color: var(--star-off); }
.rating-count { font-size: 12.5px; color: var(--muted); }
.rating-lg .stars .icon { width: 17px; height: 17px; }
.rating-lg .rating-count { font-size: 14px; }

.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-weight: 700; color: var(--store-text); }
.price del { font-weight: 400; font-size: .88em; color: var(--muted); }
.price-lg { font-size: 26px; }
.price-lg del { font-size: 17px; }

/* ---------------------------------------------------------------- شريط الإعلانات */
.announce { background: var(--store-primary); color: var(--store-accent); overflow: hidden; }
.announce:has(.announce-list:empty) { display: none; }
.announce-track { direction: ltr; overflow: hidden; }
.announce-list {
	display: flex; width: max-content; min-height: 38px; align-items: center;
	animation: marquee 45s linear infinite;
}
.announce-list li {
	direction: rtl; position: relative; white-space: nowrap;
	padding-inline: 34px; font-size: 13.5px; font-weight: 500;
}
.announce-list li::after {
	content: ""; position: absolute; inset-inline-end: -3px; top: 50%;
	width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: currentColor;
}
.announce:hover .announce-list { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
	.announce-list { animation: none; margin-inline: auto; }
	.announce-list li[aria-hidden="true"] { display: none; }
}

/* ---------------------------------------------------------------- الرأس */
.site-header { background: var(--white); position: sticky; top: 0; z-index: 30; }
.hdr-main .container { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; }
.hdr-search {
	display: flex; flex: 0 1 440px; margin-inline: auto;
}
.hdr-search input {
	flex: 1; border-start-end-radius: 0; border-end-end-radius: 0; border-inline-end: 0;
}
.hdr-search button, .nf-search button {
	width: 50px; flex: none; border: 0; background: var(--store-primary); color: var(--store-accent);
	border-start-end-radius: var(--r); border-end-end-radius: var(--r);
	display: inline-flex; align-items: center; justify-content: center;
}
.hdr-search button:hover, .nf-search button:hover { background: var(--store-primary-dark); color: var(--white); }
.hdr-links { display: flex; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 500; }
.hdr-links a { display: inline-flex; align-items: center; gap: 7px; }
.hdr-links .icon { width: 17px; height: 17px; }
.hdr-offer span { text-decoration: underline; text-underline-offset: 4px; }
.hdr-offer:hover { color: var(--store-primary-dark); }
.hdr-btn {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border: 0; border-radius: 50%; background: none;
}
.hdr-btn .icon { width: 24px; height: 24px; }
.hdr-count {
	position: absolute; top: 2px; inset-inline-end: 0;
	min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
	background: var(--store-accent); color: var(--white); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.menu-toggle, .hdr-cart-m { display: none; }

.hdr-nav { background: var(--soft); }
.hdr-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 50px; }
.nav-list { display: flex; align-items: center; gap: 30px; font-weight: 500; font-size: 15px; }
.nav-list > li > a, .drop-btn { display: inline-flex; align-items: center; gap: 4px; padding: 13px 0; }
.nav-list > li > a:hover, .drop-btn:hover { color: var(--store-primary-dark); }
.drop-btn { border: 0; background: none; font-weight: 500; }
.drop-btn .icon { width: 16px; height: 16px; }
.has-drop { position: relative; }
.drop {
	position: absolute; top: 100%; inset-inline-start: -18px; min-width: 230px;
	padding: 10px 0; background: var(--white); border-radius: var(--r); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-drop:hover .drop, .has-drop:focus-within .drop, .has-drop.open .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: block; padding: 7px 20px; font-size: 14.5px; font-weight: 400; }
.drop a:hover { background: var(--soft); color: var(--store-primary-dark); }
.nav-account { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-account a { display: inline-flex; align-items: center; gap: 7px; }
.nav-account .icon { width: 18px; height: 18px; }
.nav-account a:hover { color: var(--store-primary-dark); }

/* الدرج الجانبيّ */
.drawer, .filters-drawer-base {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60;
	width: min(320px, 86vw); background: var(--white); overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.drawer { padding: 18px 20px 30px; }
body.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-backdrop {
	position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .4);
	opacity: 0; visibility: hidden; transition: .3s;
}
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: 16px; }
.drawer-head .brand-name { font-size: 18px; }
.drawer-nav a, .drawer-cats a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer-title { margin: 22px 0 4px; font-size: 13px; font-weight: 700; color: var(--store-primary-dark); }
.drawer-cats a { font-weight: 400; color: var(--muted); }
.drawer-call { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-weight: 700; }

/* ---------------------------------------------------------------- الأقسام والعناوين */
.section { padding-block: 36px; }
main > .section:first-child, .hero + .section, .trust + .section { padding-top: 56px; }
main > .section:last-child { padding-bottom: 72px; }
.sec-head { text-align: center; margin-bottom: 34px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sec-title { font-size: 31px; font-weight: 300; line-height: 1.35; }
.sec-title strong { font-weight: 700; }
.sec-lead { color: var(--muted); font-size: 14.5px; }
.block-title { font-size: 22px; font-weight: 500; margin-bottom: 18px; }
.eyebrow { display: block; color: var(--store-primary-dark); font-size: 14px; font-weight: 500; }
.band-soft { background: var(--soft); }
main > .band-soft { padding-block: 60px; margin-block: 36px; }
.sec-foot { display: flex; justify-content: center; margin-top: 26px; }

/* ---------------------------------------------------------------- الهيرو */
.hero { background: var(--pink); }
.slider { position: relative; }
.slides {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
	position: relative; flex: 0 0 100%; scroll-snap-align: start;
	display: flex; align-items: center; min-height: clamp(400px, 39vw, 560px);
	background: var(--pink);
}
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.slide-inner { position: relative; }
.slide-body { max-width: 600px; padding-block: 60px; }
.slide-eyebrow { color: var(--store-primary-dark); font-size: 19px; font-weight: 400; margin-bottom: 18px; }
.slide-title { font-size: 58px; font-weight: 700; line-height: 1.22; margin-bottom: 34px; color: var(--store-text); }
.slider-dots { position: absolute; bottom: 22px; inset-inline: 0; display: flex; justify-content: center; gap: 10px; }
.slider-dots button {
	width: 11px; height: 11px; padding: 0; border-radius: 50%;
	border: 1px solid var(--store-accent); background: transparent;
}
.slider-dots button[aria-current="true"] { background: var(--store-accent); }

/* ---------------------------------------------------------------- التصنيفات الدائريّة */
.cat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px; }
.cat-circle { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cat-img {
	display: block; width: 100%; max-width: 190px; aspect-ratio: 1; padding: 7px;
	border: 1px solid var(--ring); border-radius: 50%; transition: border-color .25s;
}
.cat-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; transition: transform .4s; }
.cat-circle:hover .cat-img { border-color: var(--store-primary); }
.cat-circle:hover .cat-img img { transform: scale(.97); }
.cat-circle h3 { margin-top: 16px; font-size: 15.5px; font-weight: 500; }
.cat-count { font-size: 13px; color: var(--store-primary-dark); }

/* ---------------------------------------------------------------- ثلاثيّة البانرات */
.trio { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 26px; align-items: stretch; }
.trio-pair { display: contents; }
.trio > *, .trio-pair > * { min-width: 0; }
.trio-pair > :first-child { order: 1; }
.trio > .text-card { order: 2; }
.trio-pair > :last-child { order: 3; }
.tall-banner, .square-banner {
	position: relative; display: block; overflow: hidden; border-radius: var(--r); background: var(--pink);
}
.tall-banner img { width: 100%; height: 100%; max-height: 620px; aspect-ratio: 6 / 7; object-fit: cover; object-position: center bottom; transition: transform .6s; }
.square-banner img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .6s; }
.tall-banner:hover img, .square-banner:hover img { transform: scale(1.04); }
.tall-body {
	position: absolute; top: 34px; inset-inline: 16px;
	display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.tall-body b { font-size: 25px; font-weight: 500; line-height: 1.3; color: var(--store-text); }
.square-label {
	position: absolute; bottom: 20px; inset-inline-start: 20px;
	padding: 6px 16px; border-radius: 999px; background: var(--white); color: var(--store-text);
	font-size: 14px; font-weight: 500;
}
.text-card {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
	padding: 40px 34px; text-align: center; background: var(--soft); border-radius: var(--r);
}
.text-card-ic { width: 70px; height: 70px; color: var(--store-primary); stroke-width: 1.4; }
.text-card h2 { font-size: 29px; font-weight: 400; line-height: 1.35; }
.text-card p { color: var(--muted); font-size: 14.5px; max-width: 320px; }
.text-card:hover .link-under { color: var(--store-accent); }
.trio-offer .text-card { border: 1px solid var(--line); background: var(--white); }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 34px 26px; }
.book-card { position: relative; display: flex; flex-direction: column; }
.book-media {
	position: relative; display: flex; align-items: center; justify-content: center;
	aspect-ratio: 1 / 1.1; background: var(--soft); border-radius: var(--r); overflow: hidden;
}
.book-cover { display: block; width: 60%; }
.book-cover img {
	width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px;
	box-shadow: 0 12px 24px rgba(51, 51, 51, .16); transition: transform .4s;
}
.book-card:hover .book-cover img { transform: translateY(-4px); }
.book-card.is-out .book-cover img { opacity: .55; }
.book-badges { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.book-media > .type-dot { position: absolute; bottom: 12px; inset-inline-start: 12px; }
.book-tools {
	position: absolute; top: 12px; inset-inline-end: 12px; display: flex; flex-direction: column; gap: 8px;
	opacity: 0; transform: translateX(-8px); transition: .25s;
}
.book-card:hover .book-tools, .book-card:focus-within .book-tools { opacity: 1; transform: none; }
.book-tools button {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border: 0; border-radius: 50%;
	background: var(--white); color: var(--store-accent); box-shadow: 0 3px 10px rgba(0, 0, 0, .1);
}
.book-tools button:hover { background: var(--store-primary); }
.book-tools .icon { width: 18px; height: 18px; }
.book-tools [aria-pressed="true"] .icon { fill: var(--store-primary-dark); stroke: var(--store-primary-dark); }
@media (hover: none) { .book-tools { opacity: 1; transform: none; } }
.book-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 16px; text-align: center; }
.book-title { font-size: 15.5px; font-weight: 500; line-height: 1.45; }
.book-title a:hover { color: var(--store-primary-dark); }
.book-author { font-size: 13.5px; color: var(--muted); }
.book-body .price { justify-content: center; font-size: 15px; margin-top: auto; padding-top: 2px; }
/* زرّ السلّة: نصٌّ مسطَّر بأيقونة الحقيبة، كأزرار القالب النصّيّة، ظاهرٌ دائمًا */
.card-cart {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 40px; padding: 0 6px; border: 0; background: none;
	color: var(--store-primary-dark); font-size: 14px; font-weight: 700; line-height: 1.2;
}
.card-cart .icon { width: 17px; height: 17px; }
.card-cart span { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.card-cart:hover { color: var(--store-accent); }
.card-cart[disabled] { color: var(--muted); cursor: not-allowed; font-weight: 500; }
.card-cart[disabled] span { text-decoration: none; }

body[data-card-style="framed"] .book-card { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 10px 8px; }
body[data-card-style="framed"] .book-media { background: var(--white); border-bottom: 1px solid var(--line); border-radius: 0; }
body[data-card-style="minimal"] .book-media { background: none; aspect-ratio: auto; overflow: visible; }
body[data-card-style="minimal"] .book-cover { width: 100%; }
body[data-card-style="minimal"] .book-cover img { box-shadow: none; border-radius: var(--r); }

/* ---------------------------------------------------------------- شريط الثقة */
.trust { background: var(--soft); padding-block: 22px; }
.trust .container { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.trust-item { display: flex; align-items: center; justify-content: center; gap: 14px; }
.trust-ic {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 54px; height: 54px; border-radius: 50%;
	border: 1px solid var(--ring); color: var(--store-primary-dark); background: var(--white);
}
.trust-ic .icon { width: 25px; height: 25px; stroke-width: 1.4; }
.trust-item h3 { font-size: 16px; font-weight: 500; line-height: 1.4; }
.trust-item p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
body[data-show-trust-bar="false"] .trust { display: none; }

/* ---------------------------------------------------------------- المؤلّفون */
.author-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.author-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: center; }
.author-photo { display: block; border-radius: var(--r); overflow: hidden; }
.author-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s; }
.author-card:hover .author-photo img { transform: scale(1.04); }
.author-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.author-count { font-size: 13.5px; color: var(--store-primary-dark); font-weight: 500; }
.author-body h3 { font-size: 20px; font-weight: 500; line-height: 1.4; }
.author-body h3 a:hover { color: var(--store-primary-dark); }
.author-body p { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------------------------------------------------------- الآراء */
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.review-card { position: relative; background: var(--soft); border-radius: var(--r); padding: 30px 28px; display: flex; flex-direction: column; gap: 10px; }
.review-quote { width: 34px; height: 34px; color: var(--store-primary); fill: currentColor; stroke: none; }
.review-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.review-top b { color: var(--store-primary-dark); font-weight: 700; }
.review-top small { color: var(--muted); font-size: 12.5px; }
.review-card p { font-size: 14.5px; color: var(--muted); flex: 1; }
body[data-show-reviews="false"] .reviews-home,
body[data-show-reviews="false"] .reviews-section { display: none; }

/* ---------------------------------------------------------------- شاهدتَه مؤخّرًا */
.recent-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px; }
.recent-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.recent-item img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 6px 14px rgba(51, 51, 51, .12); transition: transform .3s; }
.recent-item:hover img { transform: translateY(-3px); }
.recent-title { font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- النشرة */
.newsletter {
	background: var(--store-primary); color: var(--store-accent); border-radius: var(--r);
	padding: 54px 24px; text-align: center;
}
.newsletter h2 { font-size: 32px; font-weight: 500; margin-bottom: 8px; }
.newsletter p { font-size: 15px; max-width: 560px; margin-inline: auto; }
.nl-field { display: flex; gap: 14px; max-width: 760px; margin: 26px auto 0; }
.nl-field input { flex: 1 1 auto; border-color: var(--white); }
.nl-field button {
	min-height: 46px; padding: 0 40px; border: 0; border-radius: var(--r);
	background: var(--store-accent); color: var(--white); font-weight: 700;
}
.nl-field button:hover { background: var(--white); color: var(--store-accent); }
body[data-show-newsletter="false"] .newsletter-section { display: none; }

/* ---------------------------------------------------------------- التذييل */
.site-footer { background: var(--soft); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.7fr 1fr 1.4fr; gap: 34px; padding-bottom: 50px; }
.footer-col h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--muted); font-size: 14.5px; }
.footer-col a:hover { color: var(--store-primary-dark); }
.footer-about { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-about .brand-name { color: var(--store-text); font-size: 22px; }
.footer-about p { color: var(--muted); font-size: 14.5px; max-width: 340px; }
.social { display: flex; gap: 10px; }
.footer-col .social a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%; background: var(--store-primary); color: var(--store-accent);
}
.footer-col .social a:hover { background: var(--store-primary-dark); color: var(--white); }
.social .icon { width: 18px; height: 18px; }
.footer-contact li { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--store-primary-dark); }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 18px; font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- رأس الصفحات الداخليّة */
.page-hero {
	background-color: var(--hero-dark);
	background-image:
		radial-gradient(circle at 12% 30%, color-mix(in srgb, var(--store-primary) 35%, transparent), transparent 42%),
		radial-gradient(circle at 88% 80%, color-mix(in srgb, var(--store-primary) 18%, transparent), transparent 40%);
	color: var(--white); text-align: center; padding-block: 46px;
}
.breadcrumb { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; opacity: .7; }
.breadcrumb a:hover { text-decoration: underline; }
.page-hero-title { font-size: 34px; font-weight: 500; line-height: 1.35; margin-top: 4px; }
.page-hero-lead { max-width: 640px; margin: 8px auto 0; font-size: 15px; }

/* ---------------------------------------------------------------- صفحة التصنيف */
.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start; }
.filters-head { display: none; }
.filter-box { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.filter-box h3 { font-size: 17px; font-weight: 500; margin-bottom: 12px; }
.filter-top { display: flex; justify-content: space-between; align-items: baseline; }
.filter-top a { color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.filter-cats a { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); font-size: 14.5px; }
.filter-cats a:hover, .filter-cats a[aria-current="page"] { color: var(--store-primary-dark); }
.filter-cats .count { font-size: 13px; }
.check { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14.5px; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--store-accent); margin: 0; }
.check .count { margin-inline-start: auto; font-size: 13px; }
.range { position: relative; height: 3px; margin: 18px 6px 16px; background: var(--store-accent); border-radius: 2px; }
.range::before, .range::after { content: ""; position: absolute; top: -6px; width: 15px; height: 15px; border-radius: 50%; background: var(--store-accent); }
.range::before { inset-inline-start: -6px; }
.range::after { inset-inline-end: -6px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-range label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.price-range .field { height: 40px; width: 100%; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--muted); font-size: 13px; }
.tag:hover { border-color: var(--store-accent); color: var(--store-accent); }
.tag.is-on { background: var(--store-accent); border-color: var(--store-accent); color: var(--white); }
.listing-title { font-size: 20px; font-weight: 500; margin-bottom: 16px; }
.cat-banner { position: relative; display: block; overflow: hidden; border-radius: var(--r); background: var(--hero-dark); }
.cat-banner img { width: 100%; aspect-ratio: 4 / 1; object-fit: cover; object-position: left center; }
.cat-banner-body {
	position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
	gap: 6px; padding-inline: 44px; color: var(--white);
	background: linear-gradient(to left, rgba(30, 24, 22, .78), rgba(30, 24, 22, .35) 55%, transparent 80%);
}
.cat-banner-body small { font-size: 13.5px; }
.cat-banner-body b { font-size: 27px; font-weight: 700; line-height: 1.35; max-width: 460px; }
.toolbar { display: flex; align-items: center; gap: 16px; margin: 22px 0 14px; flex-wrap: wrap; }
.toolbar-count { color: var(--muted); font-size: 14px; margin-inline-end: auto; }
.toolbar-count b { color: var(--store-text); font-weight: 500; }
.sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.sort .field { height: 40px; }
.filters-toggle { display: none; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 26px; }
.chip {
	display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px; padding-inline: 10px 6px;
	border-radius: 3px; background: var(--store-accent); color: var(--white); font-size: 13px;
}
.chip button { display: inline-flex; padding: 2px; border: 0; background: none; color: var(--white); }
.chip .icon { width: 14px; height: 14px; }
.listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px;
	border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; font-weight: 500;
}
.pagination span { border-color: transparent; }
.pagination a:hover { border-color: var(--store-accent); }
.pagination [aria-current="page"] { background: var(--store-accent); border-color: var(--store-accent); color: var(--white); }
.pagination .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- صفحة الكتاب */
.section-pdp { padding-top: 56px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.gallery { position: sticky; top: 152px; }
.gallery-main {
	position: relative; display: flex; align-items: center; justify-content: center;
	aspect-ratio: 1 / 1.02; background: var(--soft); border-radius: var(--r);
}
.gallery-main img { width: 54%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 18px 36px rgba(51, 51, 51, .2); }
.gallery-main > .type-dot { position: absolute; top: 18px; inset-inline-start: 18px; width: 42px; height: 42px; }
.gallery-main > .type-dot .icon { width: 20px; height: 20px; }
.gal-arrow {
	position: absolute; top: 50%; margin-top: -20px; width: 40px; height: 40px; border: 0; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--store-primary); color: var(--store-accent);
}
.gal-arrow:hover { background: var(--store-primary-dark); color: var(--white); }
.gal-arrow.prev { inset-inline-start: 16px; }
.gal-arrow.next { inset-inline-end: 16px; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.thumbs button { padding: 12px; border: 1px solid transparent; border-radius: var(--r); background: var(--soft); }
.thumbs button[aria-pressed="true"] { border-color: var(--store-accent); }
.thumbs img { width: 56%; margin-inline: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.pdp-tags { display: flex; align-items: center; gap: 12px; }
.pdp-title { font-size: 31px; font-weight: 500; line-height: 1.35; margin: 12px 0 4px; }
.pdp-author { color: var(--muted); margin-bottom: 8px; }
.pdp-author a { color: var(--store-primary-dark); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pdp-save { color: var(--store-primary-dark); font-weight: 700; font-size: 17px; }
.pdp-stock { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.pdp-stock b { color: var(--ok); font-weight: 500; }
.pdp-lead { color: var(--muted); font-size: 15px; line-height: 1.85; }
.pdp-meta { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 14.5px; }
.pdp-meta .icon { color: var(--store-primary-dark); margin-top: 2px; }
.pdp-meta b { font-weight: 500; }
.pdp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin-top: 18px; }
.pdp-facts li { display: flex; flex-direction: column; }
.pdp-facts span { color: var(--muted); font-size: 13px; }
.pdp-facts b { font-weight: 500; font-size: 14.5px; }
.pdp-qty-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.pdp-label { font-weight: 500; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); }
.qty button { width: 40px; height: 42px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; }
.qty .icon { width: 16px; height: 16px; }
.qty input { width: 46px; height: 42px; border: 0; text-align: center; background: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 12px; }
.pdp-lines { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.pdp-lines li { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14.5px; }
.pdp-lines b { color: var(--store-text); font-weight: 500; }
.pdp-lines .icon { width: 18px; height: 18px; color: var(--store-text); }
.pdp-perks {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px;
	padding: 20px 14px; background: var(--soft); border-radius: var(--r);
}
.pdp-perks li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pdp-perks li + li::before {
	content: ""; position: absolute; top: 20px; inset-inline-end: calc(50% + 28px); width: calc(100% - 46px);
	border-top: 1px solid #CFCFCF;
}
.perk-ic {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%; background: var(--white); border: 1px solid var(--line);
}
.perk-ic .icon { width: 18px; height: 18px; }
.pdp-perks small { font-size: 12.5px; color: var(--muted); }

.tabs-box { border: 1px solid var(--line); border-radius: var(--r); padding: 26px 30px; }
.tab-bar { display: flex; gap: 30px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab-bar button {
	padding: 0 0 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none;
	font-size: 15.5px; font-weight: 500; color: var(--muted);
}
.tab-bar [aria-selected="true"] { color: var(--store-primary-dark); border-bottom-color: var(--store-primary-dark); }
.tab-panel + .tab-panel { margin-top: 26px; }
.tab-panel[hidden] { display: none; }
.prose p { color: var(--muted); line-height: 1.9; }
.prose p + p { margin-top: 12px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: start; }
.spec-table th { width: 32%; font-weight: 500; background: var(--soft); }

.reviews-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 40px; align-items: start; }
.reviews-summary { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px; background: var(--soft); border-radius: var(--r); }
.reviews-summary strong { font-size: 46px; font-weight: 300; line-height: 1; }
.rating-bars { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.rating-bars li { display: grid; grid-template-columns: 58px 1fr 38px; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.bar { height: 6px; background: #E9E9E9; border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--star); }
.review-form { margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r); }
.review-form h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 500; }
.review-form > p { color: var(--muted); font-size: 14px; margin: 6px 0 10px; }
.star-field { border: 0; padding: 0; margin: 0 0 10px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; color: var(--star-off); }
.star-input label .icon { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-primary-dark); border-radius: 4px; }
.review-form .btn { margin-top: 12px; }
.review-item { position: relative; padding: 22px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.review-item:first-child { padding-top: 0; }
.review-item .review-quote { width: 24px; height: 24px; }
.review-item p { color: var(--muted); font-size: 14.5px; }
.section-tight { padding-top: 10px; }

/* ---------------------------------------------------------------- المؤلّف */
.author-head { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 50px; align-items: center; }
.author-ring { display: block; padding: 9px; border: 1px solid var(--ring); border-radius: 50%; }
.author-ring img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.author-info h1 { font-size: 34px; font-weight: 500; margin: 4px 0 12px; }
.author-stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-bottom: 18px; }
.author-stats li { display: flex; flex-direction: column; }
.author-stats b { font-size: 24px; font-weight: 700; color: var(--store-primary-dark); }
.author-stats span { color: var(--muted); font-size: 13.5px; }
.author-info .prose { max-width: 760px; }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 40px; align-items: start; }
.cart-note { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 18px; background: var(--soft); border-radius: var(--r); font-size: 14.5px; }
.cart-note .icon { color: var(--store-primary-dark); }
.cart-note b { color: var(--store-primary-dark); }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { padding: 12px; text-align: start; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); }
.cart-table td { padding: 18px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-book { display: flex; align-items: center; gap: 16px; }
.cart-thumb { flex: none; width: 82px; padding: 10px; background: var(--soft); border-radius: var(--r); }
.cart-thumb img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.cart-book h3 { font-size: 15.5px; font-weight: 500; }
.cart-book p { color: var(--muted); font-size: 13.5px; margin-bottom: 4px; }
.cart-book .type-label { font-size: 12.5px; }
.cart-book .type-label .type-dot { width: 22px; height: 22px; }
.cart-book .type-label .type-dot .icon { width: 12px; height: 12px; }
.cart-remove { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: none; display: inline-flex; align-items: center; justify-content: center; }
.cart-remove:hover { border-color: var(--store-accent); }
.cart-remove .icon { width: 17px; height: 17px; }
.cart-under { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.empty-cart { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 44px 20px; border: 1px dashed var(--line); border-radius: var(--r); }
.empty-cart p { color: var(--muted); }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%; background: var(--pink); color: var(--store-primary-dark); }
.empty-icon .icon { width: 34px; height: 34px; }
.empty-cart h2, .empty-cart h3 { font-size: 22px; font-weight: 500; }
.summary { padding: 26px; background: var(--soft); border-radius: var(--r); position: sticky; top: 152px; }
.summary h2 { font-size: 20px; font-weight: 500; margin-bottom: 16px; }
.coupon { display: flex; gap: 8px; }
.coupon .field { flex: 1; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0 8px; padding: 8px 12px; background: var(--white); border-radius: var(--r); font-size: 13.5px; }
.coupon-applied button { border: 0; background: none; color: var(--store-primary-dark); font-weight: 700; text-decoration: underline; padding: 0; }
.summary-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid #E2E2E2; font-size: 15px; }
.summary-row span { color: var(--muted); }
.summary-total { border-bottom: 0; font-size: 18px; margin-bottom: 14px; }
.summary-total span { color: var(--store-text); font-weight: 700; }
.summary-perks { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.summary-perks li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.summary-perks .icon { width: 18px; height: 18px; color: var(--store-text); }

/* ---------------------------------------------------------------- 404 */
.nf-section { padding-top: 56px; }
.nf { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.nf-code { font-size: clamp(110px, 16vw, 190px); font-weight: 300; line-height: 1; color: var(--store-primary); letter-spacing: 6px; }
.nf h1 { font-size: 34px; font-weight: 300; line-height: 1.4; }
.nf h1 b { font-weight: 700; }
.nf > p { color: var(--muted); max-width: 520px; }
.nf-search { display: flex; width: 100%; max-width: 520px; margin: 10px 0; }
.nf-search input { flex: 1; border-start-end-radius: 0; border-end-end-radius: 0; border-inline-end: 0; }

/* ---------------------------------------------------------------- صفحة المكوّنات */
.kit-title { font-size: 18px; font-weight: 700; margin: 30px 0 14px; }
.kit-title:first-child { margin-top: 0; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 18px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.swatch span { width: 70px; height: 70px; border-radius: var(--r); border: 1px solid var(--line); }
.swatch code { font-size: 12px; }
.kit .empty-cart { margin-bottom: 30px; }

/* ================================================================ الشاشات المتوسّطة */
@media (max-width: 1199px) {
	.hdr-links { gap: 18px; }
	.hdr-offer { display: none !important; }
	.book-grid { grid-template-columns: repeat(min(var(--per-row), 4), minmax(0, 1fr)); }
	.slide-title { font-size: 48px; }
	.footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.footer-about { grid-column: 1 / -1; order: -1; }
	.author-card { grid-template-columns: 160px minmax(0, 1fr); }
	.recent-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.recent-row > :nth-child(n+7) { display: none; }
}

@media (max-width: 991px) {
	:root { --gutter: 20px; }
	.menu-toggle, .hdr-cart-m { display: inline-flex; }
	.hdr-nav, .hdr-links { display: none; }
	.hdr-main .container { flex-wrap: wrap; gap: 8px 12px; min-height: 66px; padding-block: 10px; }
	.hdr-main .brand { margin-inline-end: auto; }
	.hdr-search { order: 5; flex: 1 1 100%; margin: 0; }
	.book-grid, .listing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; }
	.cat-row { display: flex; overflow-x: auto; gap: 18px; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
	.cat-circle { flex: 0 0 140px; scroll-snap-align: start; }
	.slide-title { font-size: 40px; }
	.slide-body { max-width: 440px; }
	.trust .container { gap: 16px; }
	.trust-item { justify-content: flex-start; }
	.listing { grid-template-columns: minmax(0, 1fr); }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60;
		width: min(320px, 88vw); padding: 18px 20px 30px; background: var(--white); 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; margin-bottom: 14px; }
	.filters-head h2 { font-size: 18px; font-weight: 700; }
	.filters-toggle { display: inline-flex; }
	.pdp { grid-template-columns: minmax(0, 1fr); gap: 34px; }
	.gallery { position: static; max-width: 560px; width: 100%; margin-inline: auto; }
	.reviews-layout { grid-template-columns: minmax(0, 1fr); }
	.cart-layout { grid-template-columns: minmax(0, 1fr); }
	.summary { position: static; }
	.review-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.review-grid > :nth-child(3) { grid-column: 1 / -1; }
	.author-grid { grid-template-columns: minmax(0, 1fr); }
	.author-head { grid-template-columns: 180px minmax(0, 1fr); gap: 30px; }
}

/* ================================================================ الهاتف */
@media (max-width: 767px) {
	:root { --gutter: 16px; }
	body { font-size: 14.5px; }
	.section { padding-block: 26px; }
	main > .section:first-child, .hero + .section, .trust + .section { padding-top: 34px; }
	main > .band-soft { padding-block: 40px; margin-block: 26px; }
	.sec-title { font-size: 24px; }
	.sec-head { margin-bottom: 22px; }
	.brand-name { font-size: 19px; }
	.brand img { width: 38px; height: 38px; }

	.slide { flex-direction: column; align-items: stretch; min-height: 0; }
	.slide-img { position: static; order: 2; height: 230px; object-position: 18% center; }
	.slide-inner { order: 1; }
	.slide-body { padding: 34px 0 18px; }
	.slide-eyebrow { font-size: 16px; margin-bottom: 10px; }
	.slide-title { font-size: 30px; margin-bottom: 20px; }
	.slider-dots { bottom: 12px; }

	.cat-circle { flex-basis: 112px; }
	.cat-circle h3 { font-size: 14px; margin-top: 10px; }

	.trio { display: flex; flex-wrap: wrap; gap: 14px; }
	.trio > *, .trio-pair > * { flex: 1 1 calc(50% - 7px); }
	.trio > .text-card { order: 4; flex-basis: 100%; padding: 30px 20px; }
	.tall-body { top: 18px; gap: 10px; }
	.tall-body b { font-size: 17px; }
	.tall-body .btn-sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
	.square-label { bottom: 10px; inset-inline-start: 10px; font-size: 12.5px; padding: 4px 10px; }
	.text-card h2 { font-size: 23px; }

	.book-grid, .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
	.book-badges { top: 8px; inset-inline-start: 8px; }
	.badge { font-size: 11px; padding: 2px 7px; }
	.book-media > .type-dot { width: 28px; height: 28px; bottom: 8px; inset-inline-start: 8px; }
	.book-tools { top: 8px; inset-inline-end: 8px; }
	.book-tools button { width: 36px; height: 36px; }
	.book-title { font-size: 14.5px; }
	.card-cart { font-size: 13.5px; }

	.trust { padding-block: 14px; }
	.trust .container {
		display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	}
	.trust .container::-webkit-scrollbar { display: none; }
	.trust-item { flex: 0 0 78%; justify-content: flex-start; gap: 12px; scroll-snap-align: start; }
	.trust-ic { width: 44px; height: 44px; }
	.trust-ic .icon { width: 21px; height: 21px; }
	.trust-item h3 { font-size: 14.5px; }
	.trust-item p { font-size: 12.5px; }
	.author-card { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
	.author-grid[data-slot] {
		display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
		margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
	}
	.author-grid[data-slot]::-webkit-scrollbar { display: none; }
	.author-grid[data-slot] > .author-card { flex: 0 0 86%; scroll-snap-align: center; }
	.author-body h3 { font-size: 17px; }
	.author-body p { -webkit-line-clamp: 2; font-size: 13.5px; }
	.review-grid {
		display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
		margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
	}
	.review-grid::-webkit-scrollbar { display: none; }
	.review-grid > .review-card { flex: 0 0 84%; scroll-snap-align: center; padding: 24px 20px; }
	.recent-row { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 6px; }
	.recent-row > :nth-child(n+7) { display: flex; }
	.recent-item { flex: 0 0 96px; }

	.newsletter { padding: 36px 18px; }
	.newsletter h2 { font-size: 24px; }
	.nl-field { flex-direction: column; }
	.nl-field input { flex: none; }

	.footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 18px; padding-bottom: 34px; }
	.footer-contact { grid-column: 1 / -1; }
	.footer-bottom .container { justify-content: center; text-align: center; }

	.page-hero { padding-block: 30px; }
	.page-hero-title { font-size: 25px; }
	.cat-banner img { aspect-ratio: 2.3 / 1; }
	.cat-banner-body { padding-inline: 20px; }
	.cat-banner-body b { font-size: 18px; max-width: 70%; }
	.toolbar { gap: 10px; }
	.toolbar-count { order: 3; flex-basis: 100%; }

	.section-pdp { padding-top: 30px; }
	.pdp-title { font-size: 25px; }
	.pdp-buttons { grid-template-columns: minmax(0, 1fr); }
	.pdp-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
	.pdp-perks li::before { display: none; }
	.tabs-box { padding: 20px 16px; }
	.spec-table th, .spec-table td { padding: 10px; }

	.author-head { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 20px; }
	.author-ring { width: 180px; }
	.author-stats { justify-content: center; }
	.author-info h1 { font-size: 27px; }

	.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: 16px 0; border-bottom: 1px solid var(--line); }
	.cart-table td { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border: 0; }
	.cart-table td:first-child { padding-inline-end: 44px; }
	.cart-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13.5px; }
	.cart-table .cell-remove { position: absolute; top: 16px; inset-inline-end: 0; width: auto; padding: 0; }
	.cart-under { flex-wrap: wrap; }

	.nf h1 { font-size: 25px; }
}

/* ---------------------------------------------------------------- ميزات المنصّة */
/* العدّاد التنازليّ في بطاقة العرض */
.countdown { display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin: 4px 0 6px; }
.countdown[hidden] { display: none; }
.countdown-unit { display: flex; flex-direction: column; align-items: center; min-width: 46px; }
.countdown-unit b { font-size: 24px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--store-text); }
.countdown-unit small { font-size: 12px; color: var(--muted); }
.countdown-sep { font-size: 22px; line-height: 1.2; color: var(--muted); }

/* النظرة السريعة: زرٌّ ثالث في أدوات البطاقة */

/* قسيمة الترحيب تحت حقل النشرة */
.nl-offer { margin-top: 14px; font-size: 14.5px; font-weight: 700; }

/* المدوّنة: بطاقةٌ أفقيّة، صورةٌ مربّعة ثمّ التاريخ والعنوان والمقتطف */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.post-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; }
.post-photo { display: block; border-radius: var(--r); overflow: hidden; background: var(--pink); }
.post-photo img { width: 100%; aspect-ratio: 1 / 1.1; object-fit: cover; transition: transform .5s; }
.post-card:hover .post-photo img { transform: scale(1.04); }
.post-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.post-date { font-size: 13px; color: var(--store-primary-dark); font-weight: 500; }
.post-title { font-size: 16.5px; font-weight: 500; line-height: 1.45; }
.post-title a:hover { color: var(--store-primary-dark); }
.post-excerpt { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-lead { text-align: center; color: var(--muted); margin: -6px 0 34px; }
.blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
.blog-grid .post-card { grid-template-columns: 210px minmax(0, 1fr); gap: 26px; }
.post-hero-date { display: block; margin-top: 8px; font-size: 14px; opacity: .9; }
.post-article { max-width: 860px; }
.post-figure { margin: 0; border-radius: var(--r); overflow: hidden; background: var(--pink); }
.post-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-content { max-width: 720px; margin: 34px auto 0; font-size: 16.5px; line-height: 2; }
.post-content p + p { margin-top: 16px; }
.post-back { display: block; width: max-content; margin: 30px auto 0; }

@media (max-width: 1199px) {
	.post-grid { gap: 24px; }
	.post-card { grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
	.post-photo img { aspect-ratio: 16 / 9; }
	.blog-grid .post-card { grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: center; }
	.blog-grid .post-photo img { aspect-ratio: 1 / 1.1; }
}
@media (max-width: 767px) {
	.post-grid, .blog-grid { grid-template-columns: minmax(0, 1fr); }
	.post-card { align-items: center; }
	.post-photo img { aspect-ratio: 1 / 1.1; }
}
@media (max-width: 767px) {
	.post-card, .blog-grid .post-card { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; }
	.post-title { font-size: 15.5px; }
	.countdown-unit { min-width: 40px; }
	.countdown-unit b { font-size: 21px; }
	.post-content { font-size: 15.5px; margin-top: 24px; }
}

/* آراء القرّاء: اسم الكتاب تحت الاسم */
.review-card .review-book { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }

/* ================================================================ الإصدار الثاني */
/* صفّ الكتب في سطرٍ واحد: لا يظهر من البطاقات إلّا ما يملأ الأعمدة، فلا يبقى صفٌّ ناقص */
.row-fit > :nth-child(n+7) { display: none; }
@media (min-width: 1200px) {
	body[data-books-per-row="3"] .row-fit > :nth-child(n+4),
	body[data-books-per-row="4"] .row-fit > :nth-child(n+5),
	body[data-books-per-row="5"] .row-fit > :nth-child(n+6) { display: none; }
}
@media (min-width: 992px) and (max-width: 1199px) {
	.row-fit > :nth-child(n+5) { display: none; }
	body[data-books-per-row="3"] .row-fit > :nth-child(n+4) { display: none; }
}
@media (min-width: 768px) and (max-width: 991px) { .row-fit > :nth-child(n+4) { display: none; } }
@media (max-width: 767px) { .row-fit > :nth-child(n+5) { display: none; } }

/* الدوّار الأفقيّ: سهمان مرجانيّان على الحافّتين، واللمس يمرّره */
.carousel { position: relative; --cols: var(--per-row); --gap: 26px; }
.carousel-track {
	display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; padding-bottom: 2px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; scroll-snap-align: start; }
.car-btn {
	position: absolute; z-index: 2; top: calc(var(--media-h, 160px)); margin-top: -21px;
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border: 0; border-radius: 50%;
	background: var(--store-primary); color: var(--store-accent); box-shadow: 0 4px 12px rgba(51, 51, 51, .14);
	transition: opacity .2s, background-color .2s;
}
.car-btn:hover { background: var(--store-primary-dark); color: var(--white); }
.car-btn[disabled] { opacity: 0; pointer-events: none; }
.car-btn.prev { inset-inline-start: -21px; }
.car-btn.next { inset-inline-end: -21px; }
@media (max-width: 1199px) { .carousel { --cols: min(var(--per-row), 4); } }
@media (max-width: 991px) {
	.carousel { --cols: 3; --gap: 18px; }
	.car-btn { display: none; }
}
@media (max-width: 767px) {
	.carousel { --gap: 14px; }
	.carousel-track { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
	.carousel-track > * { flex-basis: 44%; }
}

/* تبويبات صفّ الكتب (القاعدة 16): كلماتٌ مسطَّرة كتبويبات صفحة الكتاب */
.row-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 28px; margin-top: 6px; }
.row-tab {
	min-height: 40px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: none;
	font-size: 15px; font-weight: 500; color: var(--muted);
}
.row-tab:hover { color: var(--store-text); }
.row-tab[aria-selected="true"] { color: var(--store-primary-dark); border-bottom-color: var(--store-primary-dark); }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }
@media (max-width: 767px) {
	.row-tabs {
		flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; gap: 22px;
		max-width: 100%; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
	}
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tab { flex: none; font-size: 14.5px; }
}

/* كتاب الأسبوع: غلافٌ كبير على دائرةٍ بيضاء فوق الورديّ، كالسلايدر */
.featured-section { --muted: #4F4F4F; background: var(--pink); padding-block: 64px; margin-block: 36px; }
.featured-section .eyebrow { color: color-mix(in srgb, var(--store-primary-dark) 78%, #000); }
.featured {
	display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 64px; align-items: center;
}
.featured-head { grid-column: 2; grid-row: 1; align-self: end; margin-bottom: 8px; }
.featured-heading { font-size: 18px; font-weight: 500; color: var(--muted); }
.featured-items, .feature-book { display: contents; }
.feature-book + .feature-book { display: none; }
.feature-media {
	grid-column: 1; grid-row: 1 / span 2; position: relative;
	display: flex; align-items: center; justify-content: center;
	width: min(100%, 440px); aspect-ratio: 1; margin-inline: auto; border-radius: 50%;
	background: radial-gradient(circle, var(--white) 0 58%, color-mix(in srgb, var(--white) 55%, transparent) 58.4% 66%, transparent 66.4%);
}
.feature-cover { display: block; width: 46%; }
.feature-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 22px 40px rgba(51, 51, 51, .22); transition: transform .4s; }
.feature-cover:hover img { transform: translateY(-5px) rotate(-1deg); }
.feature-media > .type-dot { position: absolute; bottom: 16%; inset-inline-end: 22%; width: 40px; height: 40px; }
.feature-media > .type-dot .icon { width: 19px; height: 19px; }
.feature-body { grid-column: 2; grid-row: 2; align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.feature-title { font-size: 40px; font-weight: 700; line-height: 1.25; }
.feature-title a:hover { color: var(--store-primary-dark); }
.feature-author { color: var(--muted); font-size: 15.5px; }
.feature-author span { color: var(--store-text); font-weight: 500; }
.feature-desc { max-width: 560px; margin-top: 6px; color: #555; font-size: 15.5px; line-height: 1.9; }
.feature-desc p + p { margin-top: 8px; }
.feature-body .price-lg { margin-top: 2px; }
.feature-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 12px; }
.featured-section .circle-link::before { background: var(--white); }
@media (max-width: 991px) {
	.featured { column-gap: 36px; }
	.feature-title { font-size: 32px; }
}
@media (max-width: 767px) {
	.featured-section { padding-block: 40px; margin-block: 26px; }
	.featured { grid-template-columns: minmax(0, 1fr); text-align: center; }
	.featured-head, .feature-media, .feature-body { grid-column: 1; }
	.featured-head { grid-row: 1; margin-bottom: 6px; }
	.feature-media { grid-row: 2; width: min(100%, 290px); margin-bottom: 14px; }
	.feature-body { grid-row: 3; align-items: center; }
	.feature-title { font-size: 27px; }
	.feature-desc { font-size: 14.5px; }
	.feature-actions { justify-content: center; }
}

/* صفحة الكتاب: اختيار النسخة (book.formats) */
.formats-box { margin-top: 16px; }
.formats-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format-opt {
	display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 16px 6px 12px;
	border: 1px solid var(--line); border-radius: var(--r); background: var(--white); transition: border-color .2s;
}
.format-opt:hover { border-color: var(--store-primary-dark); }
.format-opt.is-current { border-color: var(--store-accent); box-shadow: inset 0 0 0 1px var(--store-accent); }
.format-opt .type-dot { width: 28px; height: 28px; box-shadow: none; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-txt { display: flex; flex-direction: column; line-height: 1.35; }
.format-name { font-size: 14px; font-weight: 500; }
.format-price { font-size: 13px; color: var(--muted); }

/* صندوق التوصيل والدفع */
.pdp-delivery { margin-top: 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); }
.pdp-delivery h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.pdp-delivery .pdp-lines { margin-top: 0; gap: 8px; }
.pdp-delivery .pdp-lines li { align-items: flex-start; font-size: 14px; }
.pdp-delivery .pdp-lines .icon { margin-top: 3px; color: var(--store-primary-dark); }

/* صفحة التصنيف: عرض الشبكة أو القائمة، وتصفية التقييم */
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.view-switch button { width: 40px; height: 40px; border: 0; background: var(--white); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.view-switch button + button { border-inline-start: 1px solid var(--line); }
.view-switch [aria-pressed="true"] { background: var(--store-accent); color: var(--white); }
.view-switch .icon { width: 18px; height: 18px; }
.listing-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.listing-grid.is-list .book-card { flex-direction: row; align-items: center; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.listing-grid.is-list .book-media { flex: none; width: 170px; }
.listing-grid.is-list .book-body { align-items: flex-start; text-align: start; padding-top: 0; }
.listing-grid.is-list .book-body .price { margin-top: 4px; }
.listing-grid.is-list .book-title { font-size: 18px; }
.check .stars .icon { width: 14px; height: 14px; }
.check .rate-label { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 767px) {
	.listing-grid.is-list .book-media { width: 112px; }
	.listing-grid.is-list .book-card { gap: 14px; }
	.listing-grid.is-list .book-title { font-size: 15.5px; }
	.toolbar .sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.toolbar .sort { flex: 1; }
	.toolbar .sort .field { width: 100%; }
}

/* صفحة المؤلّف: أعماله في دوّارٍ أفقيّ */
.works .sec-head { margin-bottom: 26px; }

/* الجهاز اللوحيّ: البانران صفًّا والبطاقة النصّيّة تحتهما بعرضه، فلا تضيق */
@media (min-width: 768px) and (max-width: 991px) {
	.trio { display: flex; flex-wrap: wrap; gap: 18px; }
	.trio > *, .trio-pair > * { flex: 1 1 calc(50% - 9px); }
	.trio > .text-card { order: 4; flex-basis: 100%; padding: 34px 30px; }
}

/* صفحة المكوّنات */
.kit-note { color: var(--muted); font-size: 14px; margin: -4px 0 14px; }
.kit-countdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.kit-countdowns .text-card { border: 1px solid var(--line); background: var(--white); }
@media (max-width: 767px) { .kit-countdowns { grid-template-columns: minmax(0, 1fr); } }


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