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

:root {
	/* ألوان الهويّة: قيمٌ تجريبيّة يغيّرها الناشر */
	--store-primary: #B0566F;
	--store-primary-dark: #8F4157;
	--store-accent: #2F7F96;
	--store-bg: #FCFCFC;
	--store-text: #222222;

	/* الباستيل مشتقٌّ من لوني الهويّة، والرمليّ محايدٌ ثابت */
	--pastel-rose: color-mix(in srgb, var(--store-primary) 35%, #fff);
	--pastel-blue: color-mix(in srgb, var(--store-accent) 35%, #fff);
	--pastel-sand: #EFE6CC;
	--primary-ink: color-mix(in srgb, var(--store-primary) 85%, #000);
	--accent-ink: color-mix(in srgb, var(--store-accent) 78%, #000);
	--frame: color-mix(in srgb, var(--store-accent) 20%, #fff);

	/* محايدات */
	--muted: #5f5f5f;
	--line: #e7e7e7;
	--grey: #F6F6F6;
	--soft: #F9F9F9;
	--footer: #222222;
	--gold: #E2A622;
	--per: 4;
	--font: 'Tajawal', system-ui, sans-serif;
}

[data-frame-tone="rose"] { --frame: color-mix(in srgb, var(--store-primary) 22%, #fff); }
[data-frame-tone="sand"] { --frame: #E8DCB8; }
[data-books-per-row="3"] { --per: 3; }
[data-books-per-row="5"] { --per: 5; }

/* ------------------------------------------------------------------ الأساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
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; }
a:hover { color: var(--primary-ink); }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.35; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--store-accent); outline-offset: 2px; }
.container { width: min(1170px, 100% - 32px); margin-inline: auto; }
.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; }

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

.section { padding: 72px 0; }
.section-sm { padding: 28px 0 8px; }
.tone-grey { background: var(--grey); }
.tone-soft { background: var(--soft); }
.section-pattern {
	background-color: #F5F5F5;
	background-image: repeating-linear-gradient(45deg, rgba(0, 0, 0, .028) 0 2px, transparent 2px 9px);
}
.framed { border: 8px solid var(--frame); background: #fff; }

/* درجات البطاقات الملوّنة */
.tone-sand { --tone: var(--pastel-sand); }
.tone-rose { --tone: var(--pastel-rose); }
.tone-blue { --tone: var(--pastel-blue); }

/* ------------------------------------------------------------------ الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 24px; border: 1px solid transparent; border-radius: 0;
	font-size: 14px; font-weight: 500; line-height: 1.3; cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--store-primary); color: #fff; }
.btn-primary:hover { background: var(--store-primary-dark); color: #fff; }
.btn-accent { background: var(--store-accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); color: #fff; }
.btn-outline { background: #fff; border-color: #cfcfcf; color: #333; }
.btn-outline:hover { border-color: var(--store-primary); color: var(--primary-ink); }
.btn-pastel { background: var(--tone, var(--pastel-blue)); color: #222; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: not-allowed; }
.more-link { display: inline-block; font-size: 12.5px; color: #555; border-bottom: 1px solid currentColor; line-height: 1.6; }
.kicker { display: block; margin: 0 0 10px; color: var(--accent-ink); font-size: 13px; font-weight: 500; word-spacing: .35em; }

.icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
	background: transparent; border: 0; cursor: pointer; position: relative; color: inherit;
}
.field {
	width: 100%; border: 1px solid #d4d4d4; border-radius: 0; background: #fff; color: var(--store-text);
	padding: 9px 12px; font: inherit; font-size: 14px;
}
.field::placeholder { color: #6b6b6b; }

/* ------------------------------------------------------------------ عنوان القسم وزخرفته */
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.sec-title { margin: 0 0 10px; font-size: clamp(27px, 3vw, 38px); font-weight: 300; color: #222; }
.sec-lead { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.ornament { display: block; width: 220px; height: 26px; margin-inline: auto; fill: none; stroke: currentColor; color: color-mix(in srgb, var(--store-accent) 55%, #fff); }

/* ------------------------------------------------------------------ النوع والتقييم والسعر والشارات */
.type-dot {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	color: #fff; box-shadow: 0 0 0 2px #fff; vertical-align: middle; flex: none;
}
.type-dot .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.type-dot[data-type="print"] { background: #DB7056; }
.type-dot[data-type="ebook"] { background: #5675A3; }
.type-dot[data-type="audio"] { background: #986AB0; }
.type-dot[data-type="educational"] { background: #3f8f6b; }

.rating { display: inline-flex; vertical-align: middle; }
.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: #d9d9d9; }
.rate-count { font-size: 12px; color: #666; margin-inline-start: 4px; }
.price { color: var(--primary-ink); font-weight: 700; font-size: 16px; }
.price del { color: #6b6b6b; font-weight: 400; font-size: 13px; margin-inline-start: 6px; }
.badge {
	display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%;
	font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
}
.badge-sale { background: var(--store-primary); color: #fff; }
.badge-new { background: var(--pastel-sand); color: #222; }

/* ================================================================== الرأس */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; color: #222; border-bottom: 1px solid var(--line); transition: background-color .25s, color .25s, box-shadow .25s; }
.site-header.is-scrolled { box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.header-bar { display: flex; align-items: center; gap: 24px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: inherit; flex: none; }
.brand img { width: 44px; height: 44px; }
.main-nav { flex: 1; display: flex; justify-content: center; }
.main-nav > ul { display: flex; gap: 26px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a,
.main-nav > ul > li > button {
	position: relative; display: inline-flex; align-items: center; gap: 4px;
	padding: 28px 0; background: none; border: 0; cursor: pointer; font-size: 14px; font-weight: 500; color: inherit;
}
.main-nav > ul > li > a::before,
.main-nav > ul > li > button::before {
	content: ''; position: absolute; top: 0; inset-inline: 0; height: 3px; background: var(--store-accent);
	transform: scaleX(0); transition: transform .25s;
}
.main-nav > ul > li > a:hover::before,
.main-nav > ul > li > a[aria-current="page"]::before,
.main-nav > ul > li > button:hover::before { transform: scaleX(1); }
.main-nav .icon { width: 16px; height: 16px; }
.drop {
	display: none; position: absolute; top: 100%; inset-inline-start: -16px; min-width: 210px;
	background: #fff; color: #222; padding: 10px 0; box-shadow: 0 14px 30px rgba(0, 0, 0, .1); border-top: 3px solid var(--store-accent);
}
.has-drop:hover .drop, .has-drop:focus-within .drop, .has-drop.open .drop { display: block; }
.drop a { display: block; padding: 8px 18px; font-size: 14px; }
.drop a:hover { background: var(--soft); }
.header-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.wish-count {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
	background: var(--store-primary); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
}
.cart-pill {
	display: inline-flex; align-items: center; gap: 8px; margin-inline-start: 6px;
	padding: 9px 16px; background: var(--store-accent); color: #fff; font-size: 14px; font-weight: 700;
}
.cart-pill:hover { background: var(--accent-ink); color: #fff; }
.cart-pill .icon { width: 18px; height: 18px; }
.cart-count {
	min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #fff; color: var(--accent-ink);
	font-size: 12px; line-height: 22px; text-align: center;
}
.menu-toggle { display: none; }
.header-search { display: none; background: #fff; border-top: 1px solid var(--line); padding: 14px 0; color: #222; }
.search-open .header-search { display: block; }
.hs-inner { display: flex; gap: 10px; }
.hs-inner .field { flex: 1; }

/* الرأس الشفّاف فوق السلايدر — يعود أبيض مصمتًا إن غاب السلايدر */
body:has(.hero) .site-header {
	margin-bottom: calc(-1 * var(--header-h, 78px)); border-bottom: 0; color: #fff;
	background: linear-gradient(rgba(25, 22, 24, .55), rgba(25, 22, 24, 0));
}
body:has(.hero) .site-header .brand-name { text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
/* بعد التمرير يبقى الرأس مثبّتًا بخلفيّةٍ بيضاء مصمتة */
body:has(.hero) .site-header.is-scrolled, body.search-open:has(.hero) .site-header { background: #fff; color: #222; }
body:has(.hero) .site-header.is-scrolled .brand-name, body.search-open:has(.hero) .site-header .brand-name { text-shadow: none; }

/* الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .4); opacity: 0; visibility: hidden; transition: opacity .25s; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100; width: min(320px, 86vw);
	background: #fff; color: #222; padding: 18px; overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer-head .brand { font-size: 18px; }
.drawer-head .brand img { width: 38px; height: 38px; }
.drawer-search { display: flex; border: 1px solid #d4d4d4; margin-bottom: 10px; }
.drawer-search .field { border: 0; }
.drawer-nav > li { border-bottom: 1px solid var(--line); }
.drawer-nav > li > a, .drawer-label { display: block; padding: 12px 2px; font-weight: 500; }
.drawer-label { color: var(--accent-ink); padding-bottom: 6px; }
.drawer-cats { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; }
.drawer-cats a { padding: 4px 10px; border: 1px solid #d6d6d6; font-size: 13px; }
.drawer-contact { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; }
.drawer-contact a { display: flex; align-items: center; gap: 8px; }

/* ================================================================== السلايدر */
.hero { position: relative; height: clamp(500px, 50vw, 720px); overflow: hidden; background: var(--pastel-blue); }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; visibility: hidden; transition: opacity .9s, visibility .9s; }
.slide.is-active, .hero:not(.slider-ready) .slide:first-child { opacity: 1; visibility: visible; }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-box {
	position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%);
	width: min(560px, 100% - 40px); padding: 42px 40px 36px; text-align: center;
	background: rgba(239, 230, 204, .92); color: #2a2a2a;
}
.slide-title { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 46px); font-weight: 300; color: #222; }
.slide-box p { margin: 0 0 18px; font-size: 14.5px; color: #3d3d3d; line-height: 1.9; }
.slide-link { display: inline-block; font-size: 13.5px; color: #333; border-bottom: 1px solid currentColor; }
.slider-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.slider-dots button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: rgba(40, 40, 40, .55); cursor: pointer; }
.slider-dots button[aria-current="true"] { background: #fff; }

/* ================================================================== الصندوق المتداخل */
.intro { position: relative; z-index: 2; padding-bottom: 16px; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.intro-box { margin-top: -110px; padding: 30px 30px 26px; box-shadow: 0 12px 30px rgba(0, 0, 0, .05); }
body:not(:has(.hero)) .intro { padding-top: 48px; }
body:not(:has(.hero)) .intro-box { margin-top: 0; }
body:not(:has(.hero)) .intro-pair { padding-top: 0; }
.intro-title { margin: 0 0 12px; font-size: 26px; font-weight: 400; }
.intro-about { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.95; }
.trust-bar { display: grid; gap: 18px; margin-top: 24px; }
.trust-bar li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; }
.trust-bar h3 { margin: 2px 0 2px; font-size: 16px; font-weight: 500; }
.trust-bar p { margin: 0; font-size: 13px; color: var(--muted); }
.trust-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--tone, var(--pastel-blue)); color: #333; flex: none; }
.trust-icon .icon { width: 24px; height: 24px; stroke-width: 1.5; }
.intro-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 28px; }
.service-card { display: flex; flex-direction: column; text-align: center; color: inherit; }
.service-card img { width: 100%; aspect-ratio: 330 / 240; object-fit: cover; }
.sc-body { display: flex; flex-direction: column; align-items: center; padding: 18px 16px 20px; }
.service-card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 400; }
.sc-text { font-size: 13.5px; color: var(--muted); line-height: 1.85; margin-bottom: 14px; }
.service-card:hover h3 { color: var(--primary-ink); }

/* ================================================================== التصنيفات: البطاقة الملوّنة */
.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 66px 18px; padding-top: 46px; }
.cat-card, .sub-card {
	position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
	padding: 60px 12px 22px; background: var(--tone); color: #222;
	box-shadow: inset 0 0 0 7px color-mix(in srgb, var(--tone) 70%, #fff);
}
.cat-card:nth-child(3n+1), .sub-card:nth-child(3n+1) { --tone: var(--pastel-sand); }
.cat-card:nth-child(3n+2), .sub-card:nth-child(3n+2) { --tone: var(--pastel-rose); }
.cat-card:nth-child(3n), .sub-card:nth-child(3n) { --tone: var(--pastel-blue); }
.cat-photo, .sub-photo {
	position: absolute; top: -46px; left: 50%; transform: translateX(-50%);
	width: 92px; height: 92px; border-radius: 50%; overflow: hidden; border: 5px solid #d9d9d9; background: #fff;
}
.cat-photo img, .sub-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cat-card:hover .cat-photo img { transform: scale(1.06); }
.cat-card h3 { margin: 0 0 2px; font-size: 17px; font-weight: 500; }
.cat-count { font-size: 13px; color: #333; margin-bottom: 12px; }
.cat-card .more-link, .cat-card:hover { color: #222; }

/* ================================================================== البانر المقسوم */
.split-band { padding: 46px 0; }
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px 40px; align-items: center; color: inherit; }
.split-rev { grid-template-columns: 1.2fr 1fr; }
.split:hover { color: inherit; }
.split-media img { width: 100%; }
.split-title { margin: 0 0 12px; font-size: clamp(22px, 2.3vw, 29px); font-weight: 400; color: #222; }
.split-text { display: block; margin-bottom: 22px; color: var(--muted); font-size: 14px; line-height: 1.95; }
.split:hover .btn-primary { background: var(--store-primary-dark); }

/* ================================================================== معرض الأغلفة */
.gallery-sec { padding-bottom: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100% - 20px, 1420px); margin-inline: auto; }
.g-tile { position: relative; aspect-ratio: 6 / 5; display: grid; place-items: center; overflow: hidden; background: var(--tone); }
.g-tile:nth-child(8n+1), .g-tile:nth-child(8n+7) { --tone: var(--pastel-sand); }
.g-tile:nth-child(8n+2), .g-tile:nth-child(8n+8) { --tone: var(--pastel-rose); }
.g-tile:nth-child(8n+3), .g-tile:nth-child(8n+5) { --tone: var(--pastel-blue); }
.g-tile:nth-child(8n+4), .g-tile:nth-child(8n+6) { --tone: #ECECEC; }
.g-cover { display: block; width: 42%; }
.g-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 14px 26px rgba(0, 0, 0, .18); transition: transform .4s; }
.g-tile:hover .g-cover img { transform: translateY(-6px); }
.g-tile > .type-dot { position: absolute; top: 14px; inset-inline-start: 14px; }
.g-cap {
	position: absolute; inset-inline: 0; bottom: 0; padding: 12px 14px; text-align: center;
	background: rgba(255, 255, 255, .95); transform: translateY(100%); transition: transform .3s;
}
.g-tile:hover .g-cap, .g-tile:focus-within .g-cap { transform: none; }
.g-cap .book-title { font-size: 15px; }
.g-cap .book-author { font-size: 12.5px; }

/* ================================================================== مختاراتنا: بطاقة الاختيار الكبيرة */
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; padding-top: 16px; }
.pick { position: relative; display: flex; flex-direction: column; text-align: center; background: #F3F3F3; }
.pick:nth-child(3n+1) { --tone: var(--pastel-blue); }
.pick:nth-child(3n+2) { --tone: var(--pastel-rose); }
.pick:nth-child(3n) { --tone: var(--pastel-sand); }
.pick-tag {
	position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 2;
	padding: 7px 34px; background: var(--tone); color: #222; font-size: 16px; white-space: nowrap;
	clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 34%, 100% 100%, 0 100%, 0 34%);
}
.pick-media { position: relative; display: grid; place-items: center; padding: 38px 0 44px; background: color-mix(in srgb, var(--tone) 50%, #fff); }
.pick-media img { width: 140px; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 12px 24px rgba(0, 0, 0, .16); }
.pick-media > .type-dot { position: absolute; top: 18px; inset-inline-start: 18px; }
.pick-price {
	position: absolute; bottom: -50px; inset-inline-end: 22px;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	width: 108px; height: 108px; border-radius: 50%; background: var(--tone); color: #222;
	font-size: 19px; font-weight: 400; line-height: 1.3; white-space: nowrap; box-shadow: 0 0 0 5px #F3F3F3;
}
.pick-price del { font-size: 12px; color: #3a3a3a; }
.pick .book-title { margin-top: 16px; padding-inline: 24px 136px; text-align: start; font-size: 19px; font-weight: 400; }
.pick-list { padding: 8px 22px 22px; }
.pick-list li { padding: 7px 0; font-size: 13.5px; color: #4f4f4f; }
.pick-list li + li { border-top: 1px solid #e3e3e3; }
.pick-btn {
	display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: auto;
	padding: 13px; background: var(--tone); color: #222; border: 0; font-size: 14px; font-weight: 500; cursor: pointer;
}
.pick-btn:hover { background: color-mix(in srgb, var(--tone) 80%, #000); }
.pick-btn .icon { width: 18px; height: 18px; }

/* ================================================================== آراء القرّاء: البطاقة المطويّة الزاوية */
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.review-card { display: flex; flex-direction: column; align-items: center; }
.rv-body { position: relative; flex: 1; width: 100%; padding: 36px 24px 22px; background: #fff; text-align: center; }
.rv-fold {
	position: absolute; top: 0; inset-inline-start: 0; width: 56px; height: 56px; background: var(--pastel-sand); color: #6d5a2b;
	clip-path: polygon(0 0, 100% 0, 100% 100%);
}
[dir="rtl"] .rv-fold { clip-path: polygon(0 0, 100% 0, 100% 100%); }
.rv-fold .icon { position: absolute; top: 9px; inset-inline-start: 8px; width: 18px; height: 18px; }
.rv-text { margin: 10px 0 0; font-size: 14px; color: #505050; line-height: 1.95; }
.rv-name {
	display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: center;
	width: 100%; padding: 10px 16px; background: var(--pastel-blue);
}
.rv-name b { font-size: 15px; color: #222; }
.rv-name small { font-size: 12px; color: #2e2e2e; }
.rv-avatar {
	display: grid; place-items: center; width: 54px; height: 54px; margin-top: 16px; border-radius: 50%;
	background: #fff; color: var(--accent-ink); font-size: 21px; font-weight: 700; box-shadow: 0 0 0 4px var(--frame);
}

/* ================================================================== المؤلّفون: شريحةٌ لمؤلّفٍ واحد */
.author-slide { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; }
.author-slider.slider-ready .author-slide:not(.is-active) { display: none; }
.author-slider.slider-ready .author-slide.is-active { animation: fade .6s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.as-name { margin: 0 0 6px; font-size: clamp(28px, 3vw, 40px); font-weight: 300; }
.as-bio { margin: 12px 0 24px; color: var(--muted); font-size: 14.5px; line-height: 1.95; }
.as-bio p { margin: 0 0 10px; }
.as-photo img { width: min(330px, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-inline: auto; box-shadow: 0 0 0 12px var(--frame); }
.diamond-dots { display: flex; justify-content: center; gap: 12px; margin-top: 40px; }
.diamond-dots button { width: 11px; height: 11px; padding: 0; border: 0; background: #6b6b6b; transform: rotate(45deg); cursor: pointer; }
.diamond-dots button[aria-current="true"] { background: var(--store-accent); }

/* ================================================================== بطاقة الكتاب */
.book-row { display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); gap: 30px 22px; }
@media (min-width: 901px) {
	.book-row > :nth-child(n+5) { display: none; }
	[data-books-per-row="3"] .book-row > :nth-child(n+4) { display: none; }
	[data-books-per-row="5"] .book-row > :nth-child(5) { display: flex; }
}
.book-card { display: flex; flex-direction: column; text-align: center; min-width: 0; }
.bc-media { position: relative; padding: 12px; background: #fff; border: 8px solid var(--frame); }
[data-card-style="plain"] .bc-media { border: 0; padding: 0; background: var(--soft); box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }
.bc-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.bc-media > .type-dot { position: absolute; top: 20px; inset-inline-end: 20px; }
[data-card-style="plain"] .bc-media > .type-dot { top: 10px; inset-inline-end: 10px; }
.bc-badges { position: absolute; top: 18px; inset-inline-start: 18px; z-index: 2; display: flex; flex-direction: column; gap: 6px; }
[data-card-style="plain"] .bc-badges { top: 8px; inset-inline-start: 8px; }
.stock-band { position: absolute; inset-inline: 12px; bottom: 42%; padding: 8px; background: rgba(55, 55, 55, .9); color: #fff; font-size: 13px; }
.is-out .bc-cover img { filter: grayscale(.7); opacity: .75; }
.bc-tools {
	position: absolute; bottom: 20px; inset-inline-start: 20px; z-index: 2; display: flex; flex-direction: column; gap: 8px;
	opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
.book-card:hover .bc-tools, .bc-tools:focus-within, .bc-tools:has([aria-pressed="true"]) { opacity: 1; transform: none; }
@media (hover: none) { .bc-tools { opacity: 1; transform: none; } }
[data-card-style="plain"] .bc-tools { bottom: 10px; inset-inline-start: 10px; }
.bc-tool { width: 40px; height: 40px; background: #fff; border-radius: 50%; color: #444; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); transition: color .2s; }
.bc-tool .icon { width: 18px; height: 18px; }
.bc-tool:hover { color: var(--primary-ink); }
.bc-tool[aria-pressed="true"] { color: var(--store-primary); }
.bc-tool[aria-pressed="true"] .icon { fill: currentColor; }
.bc-body { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 4px; padding: 14px 4px 0; }
.book-title { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.5; }
.book-author { margin: 0; font-size: 13px; color: var(--muted); }
.bc-rate { display: inline-flex; align-items: center; }
.bc-add {
	display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 14px;
	background: #fff; border: 1px solid #d3d3d3; color: #4a4a4a; font-size: 12.5px; cursor: pointer; transition: border-color .2s, color .2s;
}
.bc-add .icon { width: 16px; height: 16px; }
.bc-add:hover:not([disabled]) { border-color: var(--store-primary); color: var(--primary-ink); }
.bc-add[disabled] { color: #5f5f5f; cursor: not-allowed; }
@media (max-width: 767px) { .bc-add { min-height: 40px; } } /* لمسٌ مريح في الجوّال، والشكل الأصليّ نفسه */

/* ================================================================== الصفحات الداخليّة */
.page-head {
	padding: 52px 0 38px; text-align: center;
	background-color: color-mix(in srgb, var(--store-accent) 12%, #fff);
	background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .55) 0 2px, transparent 2px 10px);
}
.ph-title { margin: 0 0 6px; font-size: clamp(30px, 3.4vw, 44px); font-weight: 300; color: #222; }
.ph-lead { margin: 0 0 12px; color: #3a3a3a; }
.page-head .ornament { margin-bottom: 12px; color: var(--accent-ink); opacity: .55; }
.breadcrumb { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: #3a3a3a; }
.breadcrumb li + li::before { content: '/'; margin-inline-end: 6px; color: #777; }
.breadcrumb a:hover { color: var(--primary-ink); }

/* شريط التصنيفات الفرعيّة */
.sub-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 50px 18px; padding-top: 36px; }
.sub-card { padding: 42px 12px 16px; }
.sub-photo { top: -34px; width: 70px; height: 70px; border-width: 4px; }
.sub-name { font-size: 15px; font-weight: 500; }
.sub-card small { font-size: 12px; color: #333; }
.sub-card:hover { color: #222; }

/* القائمة والتصفية */
.listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters { display: flex; flex-direction: column; gap: 16px; }
.filters-head { display: none; }
.filter-box { padding: 14px 18px 16px; border-width: 6px; }
.filter-box h3 { margin: 0 0 8px; font-size: 15px; font-weight: 500; }
.check { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--store-primary); width: 16px; height: 16px; margin: 0; }
.price-range { display: flex; align-items: center; gap: 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.toolbar p { margin: 0; color: var(--muted); font-size: 14px; }
.toolbar p b { color: #222; }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.toolbar-actions .field { width: auto; }
.filters-toggle { display: none; }
.listing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 22px; }
[data-books-per-row="5"] .listing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.works-grid { display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); gap: 32px 22px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 44px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border: 1px solid #d9d9d9; background: #fff; font-size: 14px; }
.pagination a:hover { border-color: var(--store-primary); }
.pagination [aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: #fff; }
.pagination .gap { border-color: transparent; background: none; }
.pagination .icon { width: 16px; height: 16px; }

/* صفحة الكتاب */
.pdp { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 52px; align-items: start; }
.gallery-main { position: relative; padding: 20px; }
.gallery-main img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.gallery-main > .type-dot { position: absolute; top: 32px; inset-inline-end: 32px; }
.thumbs { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
.thumbs button { width: 72px; padding: 4px; background: #fff; border: 2px solid #ddd; cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--store-accent); }
.pdp-type { display: flex; align-items: center; gap: 10px; }
.pdp-title { margin: 4px 0 6px; font-size: clamp(30px, 3.2vw, 42px); font-weight: 300; }
.pdp-author { margin: 0 0 8px; color: var(--muted); }
.pdp-author a { color: var(--accent-ink); font-weight: 500; }
.pdp-rating { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pdp-lead { color: var(--muted); line-height: 1.95; margin: 14px 0; }
.price-lg { display: block; margin: 8px 0 20px; font-size: 28px; }
.price-lg del { font-size: 17px; }
.pdp-options { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px; margin-bottom: 22px; }
.opt { display: flex; flex-direction: column; gap: 8px; }
.opt-label { font-size: 13px; color: var(--muted); }
.feat { flex-direction: row; align-items: center; gap: 12px; }
.feat .trust-icon { width: 46px; height: 46px; }
.feat .trust-icon .icon { width: 21px; height: 21px; }
.feat b { display: block; font-size: 15px; font-weight: 500; }
.qty { display: inline-flex; border: 1px solid #d4d4d4; background: #fff; }
.qty button { width: 38px; height: 40px; border: 0; background: var(--grey); font-size: 18px; cursor: pointer; }
.qty button:hover { background: var(--frame); }
.qty input { width: 50px; border: 0; text-align: center; font: inherit; font-size: 15px; color: inherit; background: #fff; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pdp-wish { width: 50px; height: 50px; border: 1px solid #d4d4d4; }
.pdp-wish[aria-pressed="true"] { color: var(--store-primary); }
.pdp-wish[aria-pressed="true"] .icon { fill: currentColor; }
.stock { display: flex; align-items: center; gap: 6px; margin: 16px 0; color: #2c6b4c; font-size: 14px; font-weight: 500; }
.pdp-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.pdp-meta dt { font-size: 12px; color: var(--muted); }
.pdp-meta dd { margin: 0; font-size: 14px; }
.sample-box { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 12px 16px; border-width: 6px; }
.sample-play { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%; background: var(--store-primary); color: #fff; cursor: pointer; }
.sample-info b { display: block; font-size: 15px; }
.sample-info span { font-size: 12.5px; color: var(--muted); }
.wave { display: flex; align-items: center; gap: 3px; margin-inline-start: auto; overflow: hidden; }
.wave span { width: 3px; background: var(--pastel-blue); }

.tabs { margin-top: 64px; }
.tab-list { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 3px solid var(--frame); }
.tab-list [role="tab"] { padding: 12px 26px; border: 0; background: var(--grey); color: #3a3a3a; font-size: 15px; cursor: pointer; }
.tab-list [role="tab"][aria-selected="true"] { background: var(--frame); color: #222; font-weight: 500; }
.tab-panel { padding: 30px 0 0; }
.prose { max-width: 780px; color: #444; font-size: 15px; line-height: 2; }
.prose h3 { margin: 18px 0 6px; color: #222; font-size: 18px; font-weight: 500; }
.prose ul { list-style: disc; padding-inline-start: 22px; }
.spec-table { width: 100%; max-width: 720px; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; font-size: 14px; }
.spec-table th { width: 180px; color: var(--muted); font-weight: 500; }
.reviews-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 36px; align-items: start; }
.reviews-summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.reviews-summary strong { font-size: 44px; font-weight: 300; line-height: 1; }
.reviews-summary small { display: block; font-size: 13px; color: var(--muted); }
.rating-bars { margin: 18px 0; display: grid; gap: 6px; }
.rating-bars li { display: grid; grid-template-columns: 62px 1fr 38px; gap: 10px; align-items: center; font-size: 13px; color: #444; }
.bar { height: 6px; background: #ececec; }
.bar span { display: block; height: 100%; background: var(--gold); }
.review-form { position: relative; padding: 34px 22px 22px; background: #fff; border: 1px solid var(--line); }
.review-form h3 { margin: 0 0 4px; font-size: 17px; font-weight: 500; }
.review-form p { margin: 0; font-size: 13px; color: var(--muted); }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; margin: 10px 0; padding: 0; border: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { color: #cfcfcf; cursor: pointer; }
.star-input label .icon { width: 24px; height: 24px; }
.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-accent); }
.review-form textarea { margin-bottom: 12px; resize: vertical; }
.review-list { display: grid; gap: 22px; }
.review-list .rv-body { background: var(--soft); border: 1px solid var(--line); }
.review-list .rv-body .rv-text, .review-list .review-card { text-align: center; }

/* صفحة المؤلّف */
.author-hero { padding: 26px 0 64px; background: color-mix(in srgb, var(--store-accent) 8%, #fff); }
.author-hero .breadcrumb { justify-content: flex-start; margin-bottom: 30px; }
.author-hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 50px; align-items: center; }
.author-hero .as-name { font-size: clamp(34px, 4vw, 52px); }
.works-grid + .pagination { margin-top: 36px; }

/* السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.cart-head, .cart-item { display: grid; grid-template-columns: 80px minmax(0, 1fr) 110px 130px 110px 40px; gap: 16px; align-items: center; }
.cart-head { padding: 12px 16px; background: var(--grey); font-size: 13px; color: #3a3a3a; }
.cart-head span:first-child { grid-column: 1 / 3; }
.cart-item { padding: 18px 16px; border-bottom: 1px solid var(--line); }
.ci-cover { position: relative; display: block; }
.ci-cover img { width: 80px; aspect-ratio: 2 / 3; object-fit: cover; }
.ci-cover .type-dot { position: absolute; top: -6px; inset-inline-end: -6px; width: 24px; height: 24px; }
.ci-cover .type-dot .icon { width: 13px; height: 13px; }
.ci-info h3 { margin: 0; font-size: 15px; font-weight: 500; }
.ci-info p { margin: 2px 0; font-size: 13px; color: var(--muted); }
.ci-type { font-size: 12px; color: var(--accent-ink); }
.ci-price small, .ci-total small { display: none; font-size: 11px; color: var(--muted); }
.ci-price .price { font-size: 14px; }
.ci-price del { display: block; margin: 0; }
.ci-total b { font-size: 15px; }
.cart-under { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 20px; }
.summary { position: sticky; top: 98px; padding: 24px; }
.summary h2 { margin: 0 0 16px; font-size: 21px; font-weight: 400; }
.coupon { display: flex; gap: 8px; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0; padding: 8px 12px; background: var(--pastel-sand); font-size: 13px; color: #222; }
.coupon-applied button { background: none; border: 0; text-decoration: underline; cursor: pointer; color: #222; font-size: 13px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-total { border-bottom: 0; font-size: 18px; font-weight: 700; }
.summary .btn-block { margin-top: 14px; }
.note { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.note .icon { width: 16px; height: 16px; }
.empty-cart { padding: 40px 24px; text-align: center; }
.empty-cart[hidden] { display: none; }

/* 404 */
.nf-hero { padding: 64px 0 36px; text-align: center; }
.nf-inner { max-width: 640px; }
.nf-code { margin: 0; font-size: clamp(110px, 16vw, 200px); font-weight: 300; line-height: 1; color: var(--pastel-rose); }
.nf-hero h1 { margin: 18px 0 8px; font-size: 28px; font-weight: 400; }
.nf-hero p { color: var(--muted); }
.nf-search { display: flex; gap: 8px; max-width: 520px; margin: 22px auto 18px; }

/* ================================================================== التذييل */
.site-footer { padding: 64px 0 30px; background: var(--footer); color: #BDBDBD; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer-title { margin: 0 0 22px; color: #fff; font-size: 15px; font-weight: 700; }
.footer-title::after { content: ''; display: block; width: 36px; height: 2px; margin-top: 10px; background: var(--pastel-blue); }
.footer-contact li, .footer-links li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #3a3a3a; font-size: 13.5px; }
.footer-contact .icon { width: 16px; height: 16px; color: #9f9f9f; }
.footer-links a:hover, .tag-list a:hover, .footer-social a:hover { color: #fff; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list a { display: inline-block; padding: 5px 11px; border: 1px solid #4d4d4d; color: #c9c9c9; font-size: 12.5px; }
.site-footer p { margin: 0; line-height: 1.85; }
.newsletter { display: flex; gap: 8px; margin-top: 14px; }
.newsletter .field { background: #2d2d2d; border-color: #464646; color: #fff; }
.newsletter .field::placeholder { color: #a3a3a3; }
.footer-call { margin-top: 56px; text-align: center; }
.site-footer .footer-phone { margin: 0 0 10px; color: #fff; font-size: clamp(24px, 3vw, 38px); font-weight: 300; word-spacing: .2em; }
.site-footer .footer-name { color: #a8a8a8; font-size: 13px; word-spacing: .4em; }
.footer-social { display: flex; justify-content: center; gap: 20px; margin: 22px 0; }
.footer-social .icon { width: 20px; height: 20px; }
.site-footer .copyright { font-size: 12px; color: #9e9e9e; }

/* ================================================================== components.html */
.kit-stack { display: flex; flex-direction: column; gap: 34px; }
.kit-block { padding: 24px; border: 1px solid var(--line); background: #fff; }
.kit-title { margin: 0 0 14px; font-size: 18px; font-weight: 500; }
.kit-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0; }
.kit-row b { min-width: 110px; font-weight: 500; }
.kit-pattern { background-color: #F5F5F5; }
.kit-pattern .kit-title { background: #fff; display: inline-block; padding: 2px 10px; }
.kit-one { grid-template-columns: minmax(0, 360px); justify-content: center; padding-top: 24px; }
.kit-block .sec-head { margin-bottom: 18px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.swatch span { display: block; height: 54px; border: 1px solid #ddd; margin-bottom: 6px; }
.swatch code { font-size: 12px; }
.header-demo { position: relative; height: 200px; overflow: hidden; }
.header-demo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.header-demo-bar {
	position: absolute; top: 0; inset-inline: 0; display: flex; align-items: center; gap: 24px; padding: 14px 22px; color: #fff;
	background: linear-gradient(rgba(25, 22, 24, .6), rgba(25, 22, 24, 0));
}
.demo-nav { display: flex; gap: 20px; flex: 1; justify-content: center; font-size: 14px; }
.demo-nav .is-on { border-top: 3px solid var(--store-accent); padding-top: 6px; }

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

/* ================================================================== العروض */
@media (max-width: 1100px) {
	.slider-dots { bottom: 128px; }
	.main-nav { display: none; }
	.menu-toggle { display: inline-grid; }
	.header-actions { margin-inline-start: auto; }
	.intro-grid { grid-template-columns: minmax(0, 1fr); }
	.intro-pair { padding-top: 0; }
	.cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.listing { grid-template-columns: 220px minmax(0, 1fr); }
}

@media (max-width: 900px) {
	.section { padding: 56px 0; }
	.book-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.book-row > :nth-child(n+4) { display: none; }
	.pick-grid { gap: 40px 16px; }
	.pick-media img { width: 112px; }
	.pick-tag { padding: 6px 22px; font-size: 14px; }
	.review-grid { gap: 16px; }
	.rv-body { padding: 34px 16px 18px; }
	.split, .split-rev { grid-template-columns: 1fr 1fr; gap: 24px; }
	.gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.g-tile { aspect-ratio: 3 / 4; }
	.listing { grid-template-columns: minmax(0, 1fr); }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 100; width: min(320px, 88vw);
		padding: 18px; background: #fff; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head { display: flex; justify-content: space-between; align-items: center; }
	.filters-head h2 { margin: 0; font-size: 18px; font-weight: 500; }
	.filters-toggle { display: inline-flex; }
	.listing-grid, [data-books-per-row="5"] .listing-grid, .works-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pdp { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; }
	.reviews-layout { grid-template-columns: 1fr; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.author-slide, .author-hero-grid { gap: 28px; }
}

@media (max-width: 700px) {
	.cart-head { display: none; }
	.cart-item {
		grid-template-columns: 70px minmax(0, 1fr) auto; gap: 8px 14px; align-items: start;
		grid-template-areas: "cover info remove" "cover price price" "cover qty total";
	}
	.ci-cover { grid-area: cover; }
	.ci-cover img { width: 70px; }
	.ci-info { grid-area: info; }
	.ci-remove { grid-area: remove; }
	.ci-price { grid-area: price; display: flex; gap: 8px; align-items: baseline; }
	.cart-item .qty { grid-area: qty; justify-self: start; }
	.ci-total { grid-area: total; text-align: end; }
	.ci-price small, .ci-total small { display: inline; }
	.ci-total small { display: block; }
	.ci-price del { display: inline; margin-inline-start: 6px; }
}

@media (max-width: 600px) {
	body { font-size: 14.5px; }
	.section { padding: 46px 0; }
	.header-bar { min-height: 64px; gap: 10px; }
	.brand { font-size: 17px; gap: 8px; }
	.brand img { width: 38px; height: 38px; }
	.cart-word, .wish-link { display: none; }
	.cart-pill { padding: 8px 12px; margin-inline-start: 0; }
	.hs-inner .btn { padding-inline: 14px; }
	.hero { height: auto; }
	.slides { position: relative; display: grid; }
	.slide { position: relative; inset: auto; grid-area: 1 / 1; }
	.slide-img { position: relative; inset: auto; height: auto; aspect-ratio: 16 / 10; }
	.slide-box { position: relative; top: auto; left: auto; transform: none; width: auto; margin: -34px 16px 0; padding: 20px 18px 18px; background: var(--pastel-sand); }
	.slide-title { margin-bottom: 8px; }
	.slide-box p { margin-bottom: 12px; font-size: 13.5px; line-height: 1.8; }
	.slider-dots { position: static; transform: none; justify-content: center; padding: 14px 0 16px; }
	.intro { padding-top: 18px; }
	.intro-box { margin-top: 0; padding: 20px 16px 16px; border-width: 6px; }
	.intro-title { font-size: 22px; margin-bottom: 6px; }
	.intro-about { font-size: 13.5px; line-height: 1.85; }
	.trust-bar { display: flex; gap: 8px; margin: 14px -16px 0; padding: 0 16px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.trust-bar::-webkit-scrollbar { display: none; }
	.trust-bar li { flex: 0 0 auto; grid-template-columns: 34px auto; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; scroll-snap-align: start; }
	.trust-bar .trust-icon { width: 34px; height: 34px; }
	.trust-bar .trust-icon .icon { width: 18px; height: 18px; }
	.trust-bar h3 { margin: 0; font-size: 13.5px; white-space: nowrap; }
	.trust-bar p { display: none; }
	.intro-pair { grid-template-columns: 1fr 1fr; gap: 12px; }
	.intro-pair .framed { border-width: 5px; }
	.sc-body { padding: 10px 6px 12px; }
	.service-card h3 { margin-bottom: 4px; font-size: 15px; }
	.sc-text { display: none; }
	.cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 50px 10px; padding-top: 36px; }
	.cat-card { padding: 42px 6px 14px; box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--tone) 70%, #fff); }
	.cat-photo { width: 66px; height: 66px; top: -33px; border-width: 3px; }
	.cat-card h3 { font-size: 14px; }
	.cat-count { font-size: 12px; margin-bottom: 0; }
	.cat-card .more-link { display: none; }
	.split, .split-rev { grid-template-columns: 1fr; }
	.split-rev .split-media { order: -1; }
	.gallery-grid { grid-template-columns: 1fr 1fr; width: 100%; }
	.g-tile { aspect-ratio: 1; }
	.g-cover { width: 44%; }
	.pick-grid { grid-template-columns: 1fr; }
	.review-grid { grid-template-columns: 1fr; }
	.author-slide, .author-hero-grid { grid-template-columns: 1fr; text-align: center; }
	.as-photo { order: -1; }
	.as-photo img { width: 200px; box-shadow: 0 0 0 8px var(--frame); }
	.author-hero .breadcrumb { justify-content: center; }
	.book-row {
		display: flex; overflow-x: auto; gap: 14px; scroll-snap-type: x mandatory; padding-bottom: 8px;
		margin-inline: -16px; padding-inline: 16px; scrollbar-width: thin;
	}
	.book-row > * { flex: 0 0 46%; scroll-snap-align: start; }
	.book-row > :nth-child(n+4) { display: flex; }
	.bc-media { padding: 8px; border-width: 6px; }
	.bc-media > .type-dot { top: 12px; inset-inline-end: 12px; width: 26px; height: 26px; }
	.bc-badges { top: 10px; inset-inline-start: 10px; }
	.badge { width: 40px; height: 40px; font-size: 11px; }
	.listing-grid, [data-books-per-row="5"] .listing-grid, .works-grid { grid-template-columns: 1fr 1fr; gap: 26px 14px; }
	.sub-row { grid-template-columns: 1fr 1fr; gap: 46px 12px; }
	.pdp { grid-template-columns: 1fr; }
	.gallery { max-width: 300px; margin-inline: auto; width: 100%; }
	.pdp-buttons .btn-lg { flex: 1 1 100%; }
	.tab-list [role="tab"] { padding: 10px 14px; font-size: 14px; }
	.footer-grid { grid-template-columns: 1fr; }
	.nf-search, .coupon, .newsletter { flex-wrap: wrap; }
	.nf-search .btn { width: 100%; }
	.header-demo-bar { gap: 10px; padding: 12px; }
	.demo-nav { display: none; }
	.header-demo-bar .cart-pill { margin-inline-start: auto; }
}

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

/* ==== ميزات المنصّة (الملحق 8) ==== */
/* «آخر الأخبار» (المدوّنة): مقالٌ كبير ومقالان صغيران كما في المرجع */
.wposts { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 30px; }
.wpost { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; min-width: 0; }
.wpost-lg { grid-row: span 2; display: block; }
.wpost-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--pastel-blue); }
.wpost-lg .wpost-media { aspect-ratio: 16 / 9; }
.wpost-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wpost-date { position: absolute; bottom: -16px; inset-inline-start: 22px; padding: 7px 16px; border-radius: 999px; background: var(--pastel-sand); color: #222; font-size: 13px; font-weight: 700; box-shadow: 0 0 0 4px #fff; white-space: nowrap; }
.wpost:not(.wpost-lg) .wpost-date { position: static; display: inline-block; margin-top: 10px; padding: 4px 12px; box-shadow: none; font-size: 12px; }
.wpost:not(.wpost-lg) .wpost-media { display: flex; flex-direction: column; aspect-ratio: auto; background: none; }
.wpost:not(.wpost-lg) .wpost-media img { aspect-ratio: 5 / 4; height: auto; align-self: stretch; }
.wpost:not(.wpost-lg) .wpost-date { align-self: flex-start; }
.wpost-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 6px; }
.wpost-lg .wpost-body { padding-top: 34px; }
.wpost-title { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.5; color: #222; }
.wpost-lg .wpost-title { font-size: 24px; font-weight: 300; }
.wpost-title a:hover { color: var(--primary-ink); }
.wpost-text { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.wposts-all { text-align: center; margin: 40px 0 0; }
.wposts-even { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wposts-even .wpost { display: block; }
.wposts-even .wpost .wpost-media { display: block; aspect-ratio: 16 / 9; background: var(--pastel-blue); }
.wposts-even .wpost .wpost-media img { height: 100%; aspect-ratio: auto; }
.wposts-even .wpost .wpost-date { position: absolute; bottom: -14px; margin: 0; padding: 6px 14px; box-shadow: 0 0 0 4px #fff; }
.wposts-even .wpost-body { padding-top: 28px; }
@media (max-width: 991px) {
	.wposts { grid-template-columns: minmax(0, 1fr); }
	.wpost-lg { grid-row: auto; }
	.wposts-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.wpost { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; }
	.wpost-lg .wpost-title { font-size: 21px; }
	.wposts-even { grid-template-columns: minmax(0, 1fr); }
}
.post-crumbs { padding-top: 28px; }
.blog-section { padding: 48px 0 72px; }
.blog-related { padding-top: 56px; background: var(--soft); }
.post-page-title { font-weight: 300; }

/* قسيمة الترحيب تحت حقل النشرة */
.nl-offer { margin: 10px 0 0; color: var(--pastel-sand); font-size: 13.5px; font-weight: 700; }
/* صفحة المقال */
.blog-section { padding: 8px 0 56px; }
.post-page { padding: 8px 0 24px; }
.post-article { max-width: 760px; margin-inline: auto; }
.post-header { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
.post-back { font-size: .88rem; font-weight: 700; color: var(--primary-ink); text-decoration: none; }
.post-back::before { content: "→ "; }
.post-page-title { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.4; font-weight: 800; color: #222; }
.post-figure { margin: 0 0 24px; border-radius: 0; overflow: hidden; aspect-ratio: 16 / 9; background: var(--line); }
.post-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-content { font-size: 1.02rem; line-height: 2; color: var(--store-text); }
.post-content p { margin: 0 0 1.1em; }
.blog-related { padding-top: 24px; border-top: 1px solid var(--line); }

/* ================================================================== الإصدار الثاني */
.tone-tint { background: color-mix(in srgb, var(--store-accent) 9%, #fff); }
.sec-lead:empty { display: none; }
.sec-head .kicker { margin-bottom: 6px; }

/* تبويبات صفّ الكتب (القاعدة 16): كبسولاتٌ تحت الزخرفة */
.row-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -18px 0 34px; }
.row-tab {
	padding: 9px 22px; border: 0; background: #fff; color: #3a3a3a; font-size: 14px; cursor: pointer;
	box-shadow: inset 0 0 0 1px #d6d6d6; transition: background-color .2s, box-shadow .2s;
}
.row-tab:hover { box-shadow: inset 0 0 0 1px var(--store-primary); }
.row-tab[aria-selected="true"] { background: var(--pastel-blue); color: #222; font-weight: 500; box-shadow: inset 0 0 0 1px var(--pastel-blue); }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* شبكة الكتب بصفّين: عدد الكتب ضعف عدد الأعمدة دائمًا، فلا يبقى صفٌّ ناقص */
.book-grid { display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); gap: 34px 22px; }
.book-grid > * { display: none; }
.book-grid > :nth-child(-n+8) { display: flex; }
[data-books-per-row="3"] .book-grid > :nth-child(n+7) { display: none; }
[data-books-per-row="5"] .book-grid > :nth-child(-n+10) { display: flex; }

/* عروض الواحة: عدّادٌ بدوائر، وشريطٌ يُمرَّر بسهمين */
.deals-sec { background: color-mix(in srgb, var(--store-primary) 8%, #fff); }
.countdown { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.countdown[hidden] { display: none; }
.cd-unit {
	display: grid; place-content: center; width: 64px; height: 64px; border-radius: 50%;
	background: #fff; box-shadow: 0 0 0 5px var(--frame); text-align: center; line-height: 1.1;
}
.cd-unit b { font-size: 21px; font-weight: 300; color: #222; }
.cd-unit small { font-size: 11px; color: var(--muted); }
.carousel { position: relative; }
.book-track {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--per) - 1) * 22px) / var(--per)); gap: 22px;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 2px;
}
.book-track::-webkit-scrollbar { display: none; }
.book-track > * { scroll-snap-align: start; }
.car-btn {
	position: absolute; top: 34%; z-index: 3; display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
	border: 0; border-radius: 50%; background: #fff; color: #333; box-shadow: 0 0 0 5px var(--frame), 0 8px 18px rgba(0, 0, 0, .1); cursor: pointer;
	transition: opacity .2s;
}
.car-btn:hover { color: var(--primary-ink); }
.car-btn[disabled] { opacity: 0; pointer-events: none; }
.car-prev { inset-inline-start: -23px; }
.car-next { inset-inline-end: -23px; }

/* اختيار النسخة في صفحة الكتاب */
.formats-box { display: flex; flex-direction: column; gap: 8px; margin: -6px 0 22px; }
.formats { display: flex; flex-wrap: wrap; gap: 10px; }
.format-opt {
	display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; min-width: 140px;
	padding: 8px 14px 8px 12px; background: #fff; border: 2px solid var(--line); transition: border-color .2s;
}
.format-opt .type-dot { grid-row: span 2; width: 28px; height: 28px; box-shadow: none; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-name { font-size: 14px; font-weight: 500; line-height: 1.4; }
.format-price { font-size: 13px; color: var(--primary-ink); font-weight: 700; line-height: 1.4; }
.format-opt:hover { border-color: var(--pastel-rose); color: inherit; }
.format-opt.is-current { border-color: var(--frame); background: color-mix(in srgb, var(--store-accent) 7%, #fff); box-shadow: inset 0 0 0 1px var(--store-accent); }
[data-slot="book.formats"]:not(:has([data-repeat="format"] ~ [data-preview-copy])) { display: none; }

/* التوصيل والدفع تحت أزرار الشراء */
.pdp-perks { display: grid; gap: 10px; margin: 0 0 20px; padding: 14px 16px; background: var(--soft); border: 1px solid var(--line); }
.pdp-perks li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; font-size: 13.5px; color: #444; line-height: 1.7; }
.pdp-perks .trust-icon { width: 36px; height: 36px; }
.pdp-perks .trust-icon .icon { width: 18px; height: 18px; }
.pdp-perks b { color: #222; font-weight: 500; }

/* التصنيف: طريقة العرض، والتصفية المختارة، وعرض القائمة */
.view-switch { display: flex; border: 1px solid #d4d4d4; background: #fff; }
.view-switch button { display: grid; place-items: center; width: 40px; height: 38px; padding: 0; border: 0; background: none; color: #666; cursor: pointer; }
.view-switch button + button { border-inline-start: 1px solid #d4d4d4; }
.view-switch button[aria-pressed="true"] { background: var(--frame); color: #222; }
.view-switch .icon { width: 18px; height: 18px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -10px 0 24px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 12px; background: var(--pastel-sand); color: #222; font-size: 13px; }
.chip .icon { width: 14px; height: 14px; }
.chip:hover { color: var(--primary-ink); }
.chip-clear { font-size: 13px; color: #444; border-bottom: 1px solid currentColor; }
.listing-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.is-list .book-card { flex-direction: row; align-items: center; gap: 24px; text-align: start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.is-list .bc-media { flex: none; width: 150px; }
.is-list .bc-body { align-items: flex-start; padding: 0; }
.is-list .book-title { font-size: 18px; }

/* أعمال المؤلّف: أربعة أعمدةٍ ثابتة، فلا يبقى صفٌّ ناقص */
.works-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1240px) {
	.car-prev { inset-inline-start: -6px; }
	.car-next { inset-inline-end: -6px; }
}
@media (max-width: 900px) {
	[data-books-per-row] .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	[data-books-per-row] .book-grid > :nth-child(-n+10) { display: none; }
	[data-books-per-row] .book-grid > :nth-child(-n+6) { display: flex; }
	.book-track { grid-auto-columns: calc((100% - 44px) / 3); }
	.works-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 14px; }
}
@media (max-width: 600px) {
	.row-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: -22px -16px 24px; padding: 0 16px 4px; scrollbar-width: none; }
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tab { flex: none; padding: 8px 16px; font-size: 13.5px; }
	[data-books-per-row] .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
	[data-books-per-row] .book-grid > :nth-child(-n+6) { display: none; }
	[data-books-per-row] .book-grid > :nth-child(-n+4) { display: flex; }
	.cd-unit { width: 56px; height: 56px; }
	.cd-unit b { font-size: 18px; }
	.book-track { grid-auto-columns: 46%; gap: 14px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
	.car-btn { display: none; }
	.bc-tools { bottom: 12px; inset-inline-start: 12px; gap: 6px; }
	.format-opt { min-width: 0; flex: 1 1 30%; grid-template-columns: 1fr; justify-items: center; row-gap: 2px; padding: 8px 6px; text-align: center; }
	.format-opt .type-dot { grid-row: auto; }
	.format-price { white-space: nowrap; }
	.view-switch { display: none; }
	.works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.is-list .bc-media { width: 110px; }
	.is-list .book-card { gap: 14px; }
}

@media (min-width: 601px) and (max-width: 1100px) {
	.service-card img { aspect-ratio: 330 / 160; }
}
@media (min-width: 901px) {
	.pdp .gallery { position: sticky; top: 100px; }
}
@media (max-width: 900px) {
	.pick-price { width: 92px; height: 92px; font-size: 16px; bottom: -44px; inset-inline-end: 14px; }
	.pick .book-title { padding-inline: 14px 108px; font-size: 17px; }
}

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