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

:root {
	/* ألوان الهويّة: يختارها الناشر، وهذه قيمٌ تجريبيّة */
	--store-primary: #2E7D5B;
	--store-primary-dark: #22613F;
	--store-accent: #212E47;
	--store-bg: #FFFFFF;
	--store-text: #111827;

	/* ألوان محايدة ثابتة */
	--muted: #4E5561;
	--soft: #F8FAFB;
	--band: #E7EDF2;
	--line: #E2E7ED;
	--line-strong: #CFD7E0;
	--on-dark: #FFFFFF;
	--on-dark-muted: #C9D1DD;
	--star: #F2A93B;
	--star-off: #D3D9E0;

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

	/* مشتقّات من ألوان المتجر */
	--primary-tint: color-mix(in srgb, var(--store-primary) 10%, #fff);
	--primary-light: color-mix(in srgb, var(--store-primary) 40%, #fff);
	--footer-bg: color-mix(in srgb, var(--store-accent) 82%, #000);

	--r: 16px;
	--r-sm: 10px;
	--r-lg: 24px;
	--pill: 999px;
	--shadow: 0 6px 22px rgba(17, 24, 39, .07);
	--shadow-lg: 0 18px 46px rgba(17, 24, 39, .13);
	--container: 1240px;
	--gutter: 24px;
	--per-row: 4;
	/* القطع المائل في الركن السفليّ الأيسر (مقابل الأيمن في المرجع) */
	--notch: polygon(0 0, 100% 0, 100% 100%, 36% 100%, 23% 89%, 0 89%);
}

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; }
body[data-corners="sharp"] { --r: 4px; --r-sm: 3px; --r-lg: 6px; --pill: 6px; }

/* ---------------------------------------------------------------- أساسيّات */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	font-family: "Tajawal", system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.7;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: clip;
}
html { scroll-padding-top: 96px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3 { line-height: 1.3; font-weight: 800; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--store-primary) 55%, transparent); outline-offset: 2px; }
.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap;
}
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-arrow { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 22px;
	border-radius: var(--pill);
	font-size: 14.5px; font-weight: 700; line-height: 1.3;
	border: 1.5px solid transparent;
	transition: background .2s, color .2s, border-color .2s, transform .2s;
	white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--store-primary); color: #fff; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-dark { background: var(--store-accent); color: #fff; }
.btn-dark:hover { background: color-mix(in srgb, var(--store-accent) 85%, #000); }
.btn-light { background: #fff; color: var(--store-text); }
.btn-light:hover { background: var(--band); }
.btn-outline { background: #fff; color: var(--store-text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--store-text); }
.btn-outline[aria-pressed="true"] { border-color: var(--store-primary-dark); color: var(--store-primary-dark); }
.btn-light-outline { background: var(--primary-tint); color: var(--store-primary-dark); border-color: color-mix(in srgb, var(--store-primary) 45%, #fff); }
.btn-light-outline:hover { border-color: var(--store-primary-dark); }

.icon-btn {
	display: inline-grid; place-items: center;
	width: 42px; height: 42px; border-radius: 50%;
	position: relative; transition: background .2s, color .2s;
}

/* ---------------------------------------------------------------- عناوين الأقسام */
.section { padding-block: 70px; }
.section-tight { padding-block: 40px 60px; }
.section-band { background: var(--band); }
.section-soft { background: var(--soft); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.sec-head.center { justify-content: center; text-align: center; }
.sec-head.center > div { max-width: 720px; }
.sec-title { font-size: 31px; font-weight: 800; letter-spacing: -.2px; }
/* الجزء المميَّز: العربيّة بلا مائلٍ حقيقيّ، فيصير بوزنٍ أخفّ ولون المتجر */
.sec-title em { font-style: normal; font-weight: 500; color: var(--store-primary-dark); }
.eyebrow { display: block; font-size: 13px; font-weight: 700; color: var(--store-primary-dark); margin-bottom: 4px; }
.sec-more { display: flex; justify-content: center; margin-top: 34px; }

/* ---------------------------------------------------------------- البطاقة العلويّة (الرأس داخلها) */
.topcard-wrap { padding: 0 14px; }
/* الرأس فوق البطاقة: تبدأ البطاقة تحت حافّته السفلى المستديرة فيبدوان قطعةً واحدة */
.topcard {
	position: relative;
	margin-top: -26px; padding-top: 26px;
	border-radius: 0 0 26px 26px;
	background-color: var(--store-accent);
	color: var(--on-dark);
}
.topcard-page {
	background-image:
		radial-gradient(60% 120% at 12% 0%, color-mix(in srgb, var(--store-primary) 38%, transparent), transparent 70%),
		radial-gradient(40% 90% at 100% 100%, color-mix(in srgb, var(--store-primary) 18%, transparent), transparent 70%);
}

/* الرأس */
.site-header {
	position: sticky; top: 0; z-index: 40;
	display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
	padding: 16px 26px; margin: 14px 14px 0;
	border-radius: 26px; background-color: var(--store-accent); color: var(--on-dark);
	box-shadow: 0 10px 24px -14px rgba(12, 17, 30, .45);
}
.site-header.is-stuck { margin-inline: 0; padding-inline: 40px; border-radius: 0 0 26px 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand-name { font-size: 20px; font-weight: 800; }
.menu-toggle { display: none; color: var(--on-dark); }
.main-nav { margin-inline: auto; }
.nav-pill { display: flex; align-items: center; gap: 2px; }
.nav-pill > li > a,
.nav-pill > li > button {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 7px 14px; border-radius: var(--pill);
	font-size: 14.5px; font-weight: 500; color: var(--on-dark);
	transition: background .2s;
}
.nav-pill > li > button .icon { width: 15px; height: 15px; }
.nav-pill > li > a:hover,
.nav-pill > li > button:hover { background: rgba(255, 255, 255, .1); }
.nav-pill a[aria-current="page"] { background: rgba(255, 255, 255, .18); font-weight: 700; }
.has-drop { position: relative; }
.drop {
	position: absolute; top: calc(100% + 10px); inset-inline-start: 0;
	min-width: 220px; padding: 10px;
	background: #fff; color: var(--store-text);
	border-radius: var(--r); box-shadow: var(--shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .2s, transform .2s, visibility .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: 8px 12px; border-radius: var(--r-sm); font-weight: 500; }
.drop a:hover { background: var(--primary-tint); color: var(--store-primary-dark); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-actions .icon-btn { color: var(--on-dark); }
.header-actions .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.count {
	position: absolute; top: 0; inset-inline-end: -2px;
	min-width: 19px; height: 19px; padding-inline: 5px;
	border-radius: 10px; background: var(--store-primary); color: #fff;
	font-size: 11.5px; font-weight: 700; line-height: 19px; text-align: center;
}
.cart-pill {
	display: inline-flex; align-items: center; gap: 8px;
	position: relative; padding: 8px 16px 8px 14px; border-radius: var(--pill);
	background: rgba(255, 255, 255, .12); color: var(--on-dark); font-weight: 700; font-size: 14px;
}
.cart-pill .count { position: static; }
.cart-pill:hover { background: rgba(255, 255, 255, .2); }
.header-search {
	display: none; flex-basis: 100%;
	gap: 8px; padding: 6px; border-radius: var(--pill); background: #fff;
}
.site-header.search-open .header-search { display: flex; }
.header-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding-inline: 14px; color: var(--store-text); background: transparent; }

/* البطل */
.topcard-hero { min-height: 652px; }
.hero { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.slider, .slides { height: 100%; }
.slides {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
	scrollbar-width: none; overscroll-behavior-x: contain;
}
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; min-height: 652px; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to left, rgba(12, 17, 30, .82) 0%, rgba(12, 17, 30, .5) 45%, rgba(12, 17, 30, .08) 100%);
}
.slide-inner {
	position: relative; z-index: 2; height: 100%;
	display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 30px;
	padding: 80px 50px 190px;
}
.slide-copy { max-width: 560px; align-self: center; }
.slide-title { font-size: 64px; font-weight: 900; line-height: 1.12; letter-spacing: -.5px; color: #fff; }
.slide-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.slide-glass {
	position: relative; margin-top: 10px; padding: 20px 22px;
	border-radius: 20px; border: 1px solid rgba(255, 255, 255, .25);
	background: rgba(255, 255, 255, .14);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	color: #fff; font-size: 15px; font-weight: 500; line-height: 1.7;
}
.glass-dot { position: absolute; top: 14px; inset-inline-end: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary-light); }
.slider-nav {
	position: absolute; z-index: 3; bottom: 150px; inset-inline-end: 50px;
	display: flex; align-items: center; gap: 10px;
}
.slider-nav .icon-btn { width: 38px; height: 38px; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); }
.slider-nav .icon-btn:hover { background: rgba(255, 255, 255, .26); }
.slider-dots { display: flex; gap: 6px; }
.slider-dots button { width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .45); transition: width .25s, background .25s; }
.slider-dots button[aria-current="true"] { width: 24px; background: #fff; }
.hero-search {
	position: absolute; z-index: 4; bottom: 34px; inset-inline: 50px;
	display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 8px;
	padding: 10px; border-radius: 20px;
	background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .2);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.hs-field { background: #fff; color: var(--store-text); padding: 10px 18px; border-radius: 12px; display: grid; }
.hs-field label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.hs-field input, .hs-field select { border: 0; outline: 0; background: transparent; font-size: 16px; font-weight: 700; padding: 2px 0; width: 100%; color: var(--store-text); }
.hs-btn { border-radius: 12px; padding-inline: 34px; font-size: 15px; }
/* إن أخفى الناشر السلايدر: يبقى الرأس والبحث في بطاقةٍ داكنة قصيرة */
.topcard-hero:not(:has(.hero)) { min-height: 0; padding-bottom: 26px; }
.topcard-hero:not(:has(.hero)) .hero-search { position: relative; inset: auto; margin: 26px 26px 0; }

/* البطاقة العلويّة في الصفحات الداخليّة */
.topcard-body {
	position: relative; overflow: hidden;
	padding: 22px 50px 46px;
	border-radius: 0 0 26px 26px;
}
.topcard-body > * { position: relative; }
.topcard-body > .topcard-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .2; }
.topcard-body h1 { font-size: 40px; font-weight: 900; margin-top: 10px; color: #fff; }
.topcard-body p { color: var(--on-dark-muted); max-width: 680px; margin-top: 8px; }
.tc-count { display: inline-block; margin-inline-start: 6px; padding: 1px 12px; border-radius: var(--pill); background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; font-size: 13.5px; }
.eyebrow-light { color: var(--primary-light); margin-top: 12px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--on-dark-muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; opacity: .7; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb [aria-current] { color: #fff; font-weight: 700; }

/* ---------------------------------------------------------------- نوع الكتاب، التقييم، السعر، الشارات */
.type-dot {
	display: inline-grid; place-items: center;
	width: 34px; height: 34px; border-radius: 50%;
	color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .85);
	flex-shrink: 0;
}
.type-dot .icon { width: 17px; height: 17px; }
.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); }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: var(--star); }
.stars .icon { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.stars .off { color: var(--star-off); }
.rating-lg .stars .icon { width: 20px; height: 20px; }
.rating-light .stars .off { color: rgba(255, 255, 255, .3); }
.price { display: inline-flex; align-items: baseline; gap: 7px; flex-wrap: wrap; font-weight: 800; font-size: 16px; color: var(--store-primary-dark); }
.price del { font-size: 13px; font-weight: 500; color: var(--muted); }
.price-lg { font-size: 27px; }
.price-lg del { font-size: 16px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 800; line-height: 1.5; }
.badge-sale { background: var(--store-primary-dark); color: #fff; }
.badge-new { background: var(--store-accent); color: #fff; }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 30px 22px; }
.book-grid.grid-listing { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 18px; }
.bcard { position: relative; display: flex; flex-direction: column; min-width: 0; }
.bcard-media { position: relative; }
.bcard-cover { display: block; aspect-ratio: 2 / 3; border-radius: var(--r); overflow: hidden; background: var(--band); clip-path: var(--notch); }
.bcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.bcard:hover .bcard-cover img { transform: scale(1.04); }
.bcard-media .type-dot { position: absolute; top: 12px; inset-inline-start: 12px; }
.bcard-badges { position: absolute; top: 54px; inset-inline-start: 10px; display: grid; gap: 6px; justify-items: start; }
/* المفضّلة والنظرة السريعة تطفوان فوق الغلاف: تظهران عند التحويم في الحاسوب، ودائمًا في اللمس */
.bcard-tools { position: absolute; top: 10px; inset-inline-end: 10px; display: grid; gap: 8px; }
.bcard-tool {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
	background: #fff; color: var(--store-text); box-shadow: var(--shadow);
	transition: opacity .2s, transform .2s, color .2s, background .2s;
}
.bcard-tool .icon { width: 18px; height: 18px; }
.bcard-tool:hover { background: var(--store-accent); color: #fff; }
.bcard-tool[aria-pressed="true"] { color: var(--store-primary-dark); }
.bcard-tool[aria-pressed="true"] .icon { fill: currentColor; }
@media (hover: hover) {
	.bcard-tools .bcard-tool { opacity: 0; transform: translateX(-6px); }
	.bcard-tools .bcard-tool + .bcard-tool { transition-delay: .05s; }
	.bcard:hover .bcard-tool, .bcard-tool:focus-visible, .bcard-tool[aria-pressed="true"] { opacity: 1; transform: none; }
}
.stock-band {
	position: absolute; inset-inline: 0; top: 46%;
	padding: 7px 10px; text-align: center;
	background: rgba(17, 24, 39, .86); color: #fff; font-size: 13.5px; font-weight: 700;
}
.bcard.is-out .bcard-cover img { filter: grayscale(.7); opacity: .75; }
.bcard-body { display: flex; flex-direction: column; gap: 3px; padding-top: 12px; flex: 1; }
.bcard-title { font-size: 15.5px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-title a:hover { color: var(--store-primary-dark); }
.bcard-author { font-size: 13px; color: var(--muted); }
.bcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.bcard-cart {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
	background: var(--band); color: var(--store-text); flex-shrink: 0;
	transition: background .2s, color .2s;
}
.section-band .bcard-cart { background: #fff; }
.bcard-cart .icon { width: 18px; height: 18px; }
.bcard-cart:hover { background: var(--store-primary); color: #fff; }
.bcard-cart:disabled { cursor: not-allowed; background: var(--soft); color: #8A919C; border: 1.5px dashed var(--line-strong); }
.bcard-cart:disabled:hover { background: var(--soft); color: #8A919C; }

/* خيار شكل البطاقة */
body[data-card-style="framed"] .bcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 10px 12px; }
body[data-card-style="framed"] .bcard-cover { border-radius: var(--r-sm); clip-path: none; }
body[data-card-style="plain"] .bcard-cover { clip-path: none; box-shadow: var(--shadow); }
body[data-card-style="plain"] .bcard-cart { background: transparent; border: 1.5px solid var(--line-strong); }

/* ---------------------------------------------------------------- التصنيفات */
.cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.cat-card {
	position: relative; display: block; aspect-ratio: 360 / 560;
	border-radius: 20px; overflow: hidden; clip-path: var(--notch);
	background: var(--store-accent);
}
body[data-corners="sharp"] .cat-card { border-radius: var(--r); }
.cat-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 15, 28, .85) 0%, rgba(10, 15, 28, .2) 42%, transparent 60%); }
.cat-card:hover > img { transform: scale(1.05); }
.cat-info { position: absolute; z-index: 2; bottom: 18px; inset-inline-start: 18px; inset-inline-end: 42%; color: #fff; display: grid; }
.cat-info h3 { font-size: 19px; font-weight: 800; }
.cat-info > span { font-size: 13px; color: #E5E9EF; }

/* ---------------------------------------------------------------- شريط العبارات */
.marquee { background: var(--store-accent); overflow: hidden; padding-block: 20px; }
.marquee-track { display: flex; width: max-content; animation: jisr-marquee 38s linear infinite; }
.marquee ul { display: flex; align-items: center; flex-shrink: 0; }
.marquee li { display: flex; align-items: center; font-size: 38px; font-weight: 800; color: #AEB8C8; white-space: nowrap; line-height: 1.3; }
.marquee li::after {
	content: ""; width: 46px; height: 46px; margin-inline: 40px; border-radius: 50%; flex-shrink: 0;
	background: var(--store-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5C10 5 7.5 4.5 4 4.5v13c3.5 0 6 .5 8 2 2-1.5 4.5-2 8-2v-13c-3.5 0-6 .5-8 2Z'/%3E%3Cpath d='M12 6.5v13'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.marquee:has(ul[data-option]:empty) { display: none; }
@keyframes jisr-marquee { to { transform: translateX(50%); } }

/* ---------------------------------------------------------------- شريط الثقة: بطاقاتٌ مائلة حول صورة */
.trust-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 30px; }
.trust-stage:not(:has(.trust-figure)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trust-col { display: grid; gap: 40px; }
.trust-card { background: #fff; border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.trust-card.tilt-a { transform: rotate(-3.5deg); }
.trust-card.tilt-b { transform: rotate(3deg); }
.trust-card h3 { font-size: 18px; margin-top: 12px; }
.trust-card p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.trust-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: #fff; }
.ti-1 { background: var(--store-primary); }
.ti-2 { background: var(--store-accent); }
.ti-3 { background: var(--store-primary-dark); }
.ti-4 { background: color-mix(in srgb, var(--store-primary) 55%, var(--store-accent)); }
.trust-figure { position: relative; display: grid; place-items: center; min-height: 420px; }
.trust-figure::before {
	content: ""; position: absolute; inset: 4% -6%;
	background:
		radial-gradient(closest-side at 40% 55%, color-mix(in srgb, var(--store-primary) 30%, transparent), transparent),
		radial-gradient(closest-side at 65% 45%, rgba(242, 169, 59, .22), transparent);
	filter: blur(6px);
}
.trust-figure img { position: relative; max-height: 520px; width: auto; object-fit: contain; }
.trust { overflow: hidden; }
body[data-show-trust-bar="false"] .trust { display: none; }

/* ---------------------------------------------------------------- المؤلّفون: لوحةٌ داكنة بصفوفٍ أفقيّة */
.authors-wrap { padding: 0 14px; margin-block: 10px; }
.authors-panel {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; align-items: center;
	padding: 64px max(30px, calc((100% - var(--container)) / 2));
	border-radius: 26px; background: var(--store-accent); color: var(--on-dark);
}
.authors-intro .eyebrow { color: var(--primary-light); }
.authors-intro .sec-title { color: #fff; }
.authors-intro .sec-title em { color: var(--primary-light); }
.authors-intro p { color: var(--on-dark-muted); margin: 12px 0 22px; }
.author-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.author-row {
	display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; align-items: center; gap: 16px;
	padding: 14px; border-radius: 20px;
	background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
	transition: background .2s, border-color .2s;
}
.author-row:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }
.author-photo { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; clip-path: var(--notch); background: var(--band); }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-text { display: grid; gap: 2px; min-width: 0; }
.author-text h3 { font-size: 17px; color: #fff; }
.author-count { font-size: 13px; font-weight: 700; color: var(--primary-light); }
.author-bio { font-size: 13.5px; color: var(--on-dark-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.author-go { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); color: #fff; transition: background .2s, border-color .2s; }
.author-go .icon { width: 17px; height: 17px; }
.author-row:hover .author-go { background: var(--store-primary); border-color: var(--store-primary); }

/* ---------------------------------------------------------------- آراء القرّاء: صفّان يتحرّكان */
.reviews {
	background:
		radial-gradient(38% 55% at 32% 62%, color-mix(in srgb, var(--store-primary) 15%, transparent), transparent 70%),
		radial-gradient(30% 45% at 68% 55%, rgba(242, 169, 59, .13), transparent 70%);
	overflow: hidden;
}
.reviews-note { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.reviews-note .stars .icon { width: 18px; height: 18px; }
.reviews-marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.reviews-track {
	display: grid; grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: 400px;
	gap: 20px; width: max-content; padding-inline-end: 20px; padding-block: 6px 12px;
	animation: jisr-marquee 70s linear infinite;
}
.reviews-marquee:hover .reviews-track { animation-play-state: paused; }
.reviews-track > :nth-child(even) { transform: translateX(-140px); }
.review { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); }
.review-top { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.review-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--primary-tint); color: var(--store-primary-dark); font-weight: 800; flex-shrink: 0; }
.review-who { display: grid; min-width: 0; }
.review-who b { font-size: 15px; }
.review-who small { font-size: 12.5px; color: var(--muted); }
.review-score { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.review p { padding-top: 14px; font-size: 14.5px; line-height: 1.85; color: #374151; }
body[data-show-reviews="false"] .reviews { display: none; }

/* ---------------------------------------------------------------- وصل حديثًا والبانر الطويل */
.new-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: stretch; }
.new-layout:not(:has(.tall-banner)) { grid-template-columns: minmax(0, 1fr); }
.new-main { min-width: 0; }
.tall-banner { position: relative; display: block; min-height: 480px; border-radius: 22px; overflow: hidden; background: var(--store-accent); }
.tall-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tall-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 15, 28, .82), rgba(10, 15, 28, .1) 55%); }
.tall-banner:hover > img { transform: scale(1.04); }
.tall-copy { position: absolute; z-index: 2; inset-inline: 24px; bottom: 26px; display: grid; justify-items: start; gap: 10px; color: #fff; }
.tall-copy strong { font-size: 24px; line-height: 1.4; }

/* ---------------------------------------------------------------- وسمٌ صغير على صور المقالات والبانر */
.promo-tag { display: inline-block; padding: 4px 14px; border-radius: var(--pill); background: #fff; color: var(--store-text); font-size: 12.5px; font-weight: 700; }

/* ---------------------------------------------------------------- شاهدتَه مؤخّرًا */
.recent-row {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 18px) / 6); gap: 18px;
	overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin;
}
.recent-row .bcard { scroll-snap-align: start; }
.recent-row .bcard-title { font-size: 14.5px; }
.recent-row .price { font-size: 14.5px; }
.recent-row .type-dot { width: 30px; height: 30px; top: 9px; inset-inline-start: 9px; }
.recent-row .type-dot .icon { width: 15px; height: 15px; }
.recent-row .bcard-badges { top: 46px; }
.recent-row .bcard-tool { width: 34px; height: 34px; }
.recent-row .bcard-cart { width: 36px; height: 36px; }

/* ---------------------------------------------------------------- التذييل */
.site-footer { background: var(--footer-bg); color: var(--on-dark); padding-top: 56px; margin-top: 20px; }
.footer-panel {
	display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.3fr); gap: 34px;
	padding: 40px; border-radius: 24px; background: rgba(255, 255, 255, .05);
}
.footer-news h2 { font-size: 25px; margin-top: 20px; }
.footer-news p { color: var(--on-dark-muted); margin-top: 6px; font-size: 14.5px; }
.newsletter {
	display: flex; align-items: center; gap: 8px; margin-top: 18px; max-width: 440px;
	padding: 6px; padding-inline-start: 16px; border-radius: var(--pill); background: #fff; color: var(--muted);
}
.newsletter input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--store-text); }
.social { display: flex; gap: 8px; margin-top: 18px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .1); transition: background .2s; }
.social a:hover { background: var(--store-primary); }
.social .icon { width: 17px; height: 17px; }
.footer-col h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 14px; }
.footer-col h3::after { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--store-primary); }
.footer-col li { margin-bottom: 8px; }
.footer-col li a { color: var(--on-dark-muted); font-size: 14.5px; display: inline-flex; align-items: center; gap: 8px; }
.footer-col li a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.footer-col li a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fc-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--store-primary); flex-shrink: 0; }
.fc-icon .icon { width: 18px; height: 18px; }
.footer-contact li > span:last-child { display: grid; font-weight: 700; font-size: 14.5px; }
.footer-contact small { font-weight: 500; font-size: 12.5px; color: var(--on-dark-muted); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 34px; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; color: var(--on-dark-muted); }

/* ---------------------------------------------------------------- الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(17, 24, 39, .55); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.drawer {
	position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 80;
	width: min(330px, 88vw); padding: 18px; overflow-y: auto;
	background: #fff; color: var(--store-text);
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop, .filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-head .icon-btn:hover { background: var(--band); }
.drawer-search { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--pill); padding: 3px; padding-inline-start: 14px; margin-bottom: 10px; }
.drawer-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.drawer-search .icon-btn { width: 38px; height: 38px; background: var(--store-primary); color: #fff; }
.drawer-nav a { display: block; padding: 11px 2px; border-bottom: 1px solid var(--line); font-weight: 700; }
.drawer-label { padding: 14px 2px 2px; font-size: 13px; font-weight: 700; color: var(--muted); }
.drawer-sub a { padding-inline-start: 14px; font-weight: 500; }
.drawer-phone { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-weight: 700; }
.drawer-phone .icon { color: var(--store-primary-dark); }

/* ---------------------------------------------------------------- الحقول */
.field {
	width: 100%; padding: 10px 14px; border-radius: 12px;
	border: 1.5px solid var(--line-strong); background: #fff; color: var(--store-text);
	transition: border-color .2s, box-shadow .2s;
}
.field:focus { outline: 0; border-color: var(--store-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-primary) 18%, transparent); }
.textarea { min-height: 110px; resize: vertical; }

/* ---------------------------------------------------------------- صفحة التصنيف */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.chip { padding: 7px 18px; border-radius: var(--pill); border: 1px solid var(--line-strong); background: #fff; font-size: 14px; font-weight: 700; transition: border-color .2s; }
.chip:hover { border-color: var(--store-text); }
.chip[aria-current="page"] { background: var(--store-accent); border-color: var(--store-accent); color: #fff; }
.listing { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters { background: var(--soft); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px 20px; position: sticky; top: 104px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; }
.filters-head h2 { font-size: 19px; }
.filters-head .icon-btn { display: none; }
.filter-box { padding-block: 14px; border-bottom: 1px solid var(--line); }
.filter-box:last-of-type { border-bottom: 0; margin-bottom: 8px; }
.filter-box h3 { font-size: 15px; margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 8px; margin-block: 6px; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--store-primary); }
.check .count { position: static; margin-inline-start: auto; background: #fff; color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.toolbar p { color: var(--muted); font-size: 14px; }
.toolbar b { color: var(--store-text); }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.toolbar-actions .field { width: auto; padding-block: 8px; }
.filters-toggle { display: none; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 6px; border-radius: var(--pill); border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 14.5px; }
.pagination a:hover { border-color: var(--store-text); }
.pagination [aria-current="page"] { background: var(--store-accent); border-color: var(--store-accent); color: #fff; }
.pagination .gap { border: 0; background: none; min-width: 20px; }
.pagination .pg-arrow { box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- صفحة الكتاب */
.pdp-kind { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding-block: 4px; padding-inline: 6px 14px; border-radius: var(--pill); background: rgba(255, 255, 255, .12); font-size: 13.5px; font-weight: 700; }
.pdp-kind .type-dot { width: 26px; height: 26px; box-shadow: none; }
.pdp-kind .type-dot .icon { width: 14px; height: 14px; }
.pdp-kind.small { margin-top: 6px; padding: 0; background: none; color: var(--muted); font-size: 12.5px; }
.pdp-kind.small .type-dot { width: 24px; height: 24px; }
.pdp-sub { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; color: var(--on-dark-muted); font-size: 15px; }
.pdp-sub a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.pdp-sub b { color: #fff; }
.pdp { display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.gallery-main { position: relative; border-radius: 20px; overflow: hidden; clip-path: var(--notch); box-shadow: var(--shadow-lg); }
body[data-corners="sharp"] .gallery-main { border-radius: var(--r); }
.gallery-main img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.gallery-main .type-dot { position: absolute; top: 14px; inset-inline-start: 14px; width: 42px; height: 42px; }
.gallery-main .type-dot .icon { width: 20px; height: 20px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs button { width: 62px; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; opacity: .7; }
.thumbs button[aria-pressed="true"] { border-color: var(--store-primary); opacity: 1; }
.thumbs img { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; }
.pdp-lead { font-size: 16.5px; line-height: 1.95; color: #374151; }
.pdp-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.meta-item { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line); }
.meta-item .icon { grid-row: span 2; width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--primary-tint); color: var(--store-primary-dark); }
.meta-item small { font-size: 12.5px; color: var(--muted); }
.meta-item b { font-size: 14.5px; }
.buy-card { position: sticky; top: 104px; display: grid; gap: 12px; padding: 22px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.buy-label { font-size: 13px; color: var(--muted); font-weight: 700; }
.buy-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.buy-price del { color: var(--muted); font-size: 15px; }
.stock { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 3px 12px; border-radius: var(--pill); background: var(--primary-tint); color: var(--store-primary-dark); font-size: 13.5px; font-weight: 700; }
.stock .icon { width: 16px; height: 16px; }

.tabs { margin-top: 56px; }
.tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-list button { padding: 12px 18px; font-size: 15.5px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab-list button[aria-selected="true"] { color: var(--store-text); border-bottom-color: var(--store-primary); }
.tab-panel { padding-top: 26px; }
.prose { max-width: 820px; font-size: 15.5px; line-height: 1.95; color: #374151; }
.prose p + p { margin-top: 12px; }
.spec-table { width: 100%; max-width: 720px; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 12px 4px; border-bottom: 1px solid var(--line); text-align: start; font-size: 14.5px; }
.spec-table th { width: 200px; color: var(--muted); font-weight: 500; }
.reviews-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 34px; align-items: start; }
.reviews-summary { display: grid; gap: 8px; padding: 22px; border-radius: 20px; background: var(--soft); border: 1px solid var(--line); }
.reviews-summary strong { font-size: 46px; font-weight: 900; line-height: 1; }
.reviews-summary > span { font-size: 13.5px; color: var(--muted); }
.rating-bars { display: grid; gap: 6px; margin-block: 8px 6px; }
.rating-bars li { display: grid; grid-template-columns: 14px 1fr 38px; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.bar { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--star); }
.review-note { font-size: 12.5px; color: var(--muted); }
.review-list { display: grid; gap: 14px; }
.review-form { display: grid; gap: 12px; margin-top: 22px; padding: 20px; border-radius: 18px; border: 1.5px dashed var(--line-strong); }
.review-form h3 { font-size: 17px; }
.star-field { border: 0; }
.star-field legend { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.star-input { display: inline-flex; flex-direction: row-reverse; direction: ltr; gap: 2px; }
.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); border-radius: 4px; }
.review-form .btn { justify-self: start; }

/* ---------------------------------------------------------------- صفحة المؤلّف */
.author-profile { display: grid; grid-template-columns: 220px minmax(0, 1fr) 240px; gap: 32px; align-items: center; padding: 24px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.author-photo-lg { border-radius: 18px; }
.author-about h2 { font-size: 20px; margin-bottom: 8px; }
.author-about .bio { font-size: 15.5px; line-height: 1.95; color: #374151; }
.author-facts { display: grid; gap: 12px; padding: 22px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line); text-align: center; }
.author-facts b { display: block; font-size: 42px; font-weight: 900; line-height: 1.1; color: var(--store-primary-dark); }
.author-facts small { font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: start; }
.cart-list { display: grid; gap: 14px; }
.cart-row {
	display: grid; grid-template-columns: 70px minmax(0, 1fr) 130px auto 100px auto; align-items: center; gap: 18px;
	padding: 14px 18px 14px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line);
}
.cart-cover img { width: 70px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-sm); }
.cart-info h3 { font-size: 16px; }
.cart-info p { font-size: 13px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--pill); }
.qty button { width: 34px; height: 36px; font-size: 18px; font-weight: 700; }
.qty input { width: 40px; border: 0; text-align: center; font-weight: 700; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-total { font-size: 16px; }
.cart-remove { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--soft); color: var(--muted); }
.cart-remove:hover { background: var(--band); color: var(--store-text); }
.cart-under { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.empty-cart { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 44px 20px; border-radius: 20px; border: 1.5px dashed var(--line-strong); }
.empty-cart[hidden] { display: none; }
.empty-cart p { color: var(--muted); }
.summary { position: sticky; top: 104px; display: grid; gap: 4px; padding: 26px; border-radius: 24px; background: var(--store-accent); color: var(--on-dark); }
.summary h2 { font-size: 21px; margin-bottom: 12px; }
.coupon { display: flex; gap: 8px; }
.coupon .field { border-color: transparent; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-block: 12px 8px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); color: var(--on-dark-muted); font-size: 13.5px; }
.coupon-applied b { color: #fff; }
.coupon-applied button { color: #fff; text-decoration: underline; font-size: 13.5px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding-block: 10px; border-bottom: 1px solid rgba(255, 255, 255, .1); color: var(--on-dark-muted); font-size: 14.5px; }
.summary-row b { color: #fff; }
.summary-total { border-bottom: 0; font-size: 18px; color: #fff; font-weight: 800; margin-bottom: 8px; }
.summary-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--on-dark-muted); }
.summary-note .icon { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- 404 */
.nf { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 20px 26px 64px; }
.nf-code { font-size: 170px; font-weight: 900; line-height: 1; letter-spacing: -4px; color: var(--primary-light); }
.topcard-body.nf h1 { margin-top: 0; font-size: 34px; }
.nf-search { display: flex; gap: 8px; width: min(560px, 100%); margin-block: 10px 6px; padding: 6px; padding-inline-start: 18px; border-radius: var(--pill); background: #fff; }
.nf-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--store-text); }

/* ---------------------------------------------------------------- ميزات المنصّة: الأسئلة الشائعة، المدوّنة، تقييم المتجر، تطبيق المتجر */
.store-rating { gap: 8px; }
.sr-score { font-size: 22px; font-weight: 900; color: var(--store-text); }
.reviews-note:not(:has([data-slot="store.rating"])) { display: none; }
.faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: start; }
.faq-list { display: grid; gap: 12px; counter-reset: faq; }
.faq-item { counter-increment: faq; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.faq-item summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; font-weight: 700; font-size: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--store-accent); color: #fff; font-size: 12.5px; font-weight: 800; }
.faq-num::before { content: counter(faq); }
.faq-q { flex: 1; min-width: 0; }
.faq-item[open] .faq-q { color: var(--store-primary-dark); }
.faq-sign { position: relative; flex: none; width: 16px; height: 16px; }
.faq-sign::before, .faq-sign::after { content: ""; position: absolute; top: 7px; inset-inline: 0; height: 2px; border-radius: 2px; background: var(--store-text); transition: transform .2s; }
.faq-sign::after { transform: rotate(90deg); }
.faq-item[open] .faq-sign::after { transform: rotate(0); }
.faq-a { padding: 0 62px 20px 20px; color: var(--muted); font-size: 15px; }
.faq-help { position: sticky; top: 110px; display: grid; justify-items: start; gap: 10px; padding: 28px 26px; border-radius: var(--r-lg); background: var(--store-accent); color: var(--on-dark); }
.faq-help-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--store-primary); color: #fff; }
.faq-help-icon .icon { width: 26px; height: 26px; }
.faq-help strong { font-size: 22px; }
.faq-help p { color: var(--on-dark-muted); font-size: 14.5px; }
.faq-help-phone { display: grid; font-weight: 700; }
.faq-help-phone small { color: var(--on-dark-muted); font-weight: 500; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-grid-page { row-gap: 34px; margin-bottom: 40px; }
.post-card { display: grid; gap: 12px; align-content: start; }
.post-media { position: relative; display: block; aspect-ratio: 4 / 3.4; border-radius: 22px; overflow: hidden; background: var(--store-accent); }
.post-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 15, 28, .88), rgba(10, 15, 28, 0) 58%); }
.post-media:hover > img { transform: scale(1.05); }
.post-date { position: absolute; z-index: 2; top: 16px; inset-inline-end: 16px; display: grid; justify-items: center; min-width: 52px; padding: 6px 8px; border-radius: 10px; background: #fff; color: var(--store-text); line-height: 1.2; }
.post-date b { font-size: 19px; font-weight: 900; }
.post-date small { font-size: 12px; color: var(--muted); }
.post-copy { position: absolute; z-index: 2; inset-inline: 22px; bottom: 22px; display: grid; justify-items: center; gap: 10px; text-align: center; color: #fff; }
.post-copy strong { font-size: 20px; line-height: 1.4; }
.post-excerpt { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-wrap { max-width: 820px; }
.article-media { margin: 0 0 30px; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--store-accent); }
.article-media img { width: 100%; height: 100%; object-fit: cover; }
.article-body { display: grid; gap: 18px; font-size: 17.5px; line-height: 2; }
.article-back { margin-top: 30px; }
.app-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.app-links-label { color: var(--on-dark-muted); }
.app-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px; border-radius: 10px; background: #fff; color: var(--store-text); font-weight: 800; font-size: 14px; line-height: 1.15; }
.app-badge small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); }
.app-badge .icon { width: 20px; height: 20px; }
.app-badge:hover { background: var(--primary-tint); }
@media (max-width: 1023px) {
	.faq-layout { grid-template-columns: minmax(0, 1fr); }
	.faq-help { position: static; }
	.post-grid-page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-copy strong { font-size: 17px; }
}
@media (max-width: 640px) {
	.post-grid { grid-template-columns: minmax(0, 1fr); }
	.post-media { aspect-ratio: 16 / 11; }
	.faq-item summary { padding: 15px 16px; font-size: 15px; }
	.faq-a { padding: 0 16px 16px; }
	.article-body { font-size: 16.5px; }
}

/* ---------------------------------------------------------------- components.html */
.kit-block { padding-block: 44px; }
.kit-title { font-size: 22px; margin-bottom: 18px; }
.kit-note { color: var(--muted); margin: -10px 0 16px; font-size: 14px; }
.kit-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kit-row > b { min-width: 120px; }
.kit-dark { display: flex; gap: 12px; flex-wrap: wrap; padding: 24px; border-radius: 20px; background: var(--store-accent); }
.kit-authors { margin-block: 30px; }
.kit-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kit-block .tall-banner { max-width: 340px; }

/* ---------------------------------------------------------------- ظهورٌ هادئ وحركة مخفّضة */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
	.marquee-track { animation: none; width: auto; }
	.marquee ul[aria-hidden] { display: none; }
	.marquee ul { flex-wrap: wrap; justify-content: center; row-gap: 10px; }
	.reviews-track { animation: none; width: auto; grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); padding-inline: var(--gutter); }
	.reviews-track > :nth-child(even) { transform: none; }
	.reviews-track > [aria-hidden="true"] { display: none; }
	.reviews-marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ================================================================= العروض */
@media (max-width: 1180px) {
	.main-nav { display: none; }
	.menu-toggle { display: inline-grid; }
	.header-actions { margin-inline-start: auto; }
	.pdp { grid-template-columns: 300px minmax(0, 1fr); }
	.buy-card { grid-column: 1 / -1; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.buy-card > :not(.btn) { grid-column: 1 / -1; }
	.footer-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.authors-panel { grid-template-columns: 1fr; }
	.author-profile { grid-template-columns: 200px minmax(0, 1fr); }
	.author-facts { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: space-between; align-items: center; text-align: start; }
}

@media (max-width: 1024px) {
	:root { --gutter: 20px; }
	body[data-books-per-row="4"], body[data-books-per-row="5"], body[data-books-per-row="6"] { --per-row: 3; }
	.section { padding-block: 56px; }
	.sec-title { font-size: 27px; }
	.slide-title { font-size: 48px; }
	.slide-inner { grid-template-columns: minmax(0, 1fr) 220px; padding-inline: 34px; }
	.hero-search { inset-inline: 34px; }
	.slider-nav { inset-inline-end: 34px; }
	.cat-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 3 * 18px) / 3.4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
	.cat-grid::-webkit-scrollbar { display: none; }
	.cat-card { scroll-snap-align: start; }
	/* شريط الثقة في الجهاز اللوحيّ: أربع بطاقاتٍ مدمجة بلا الصورة */
	.trust-stage, .trust-stage:not(:has(.trust-figure)) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.trust-col { display: contents; }
	.trust-figure { display: none; }
	.trust-card, .trust-card.tilt-a, .trust-card.tilt-b { transform: none; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 16px 18px; box-shadow: var(--shadow); }
	.trust-icon { grid-row: span 2; }
	.trust-card h3 { margin-top: 0; font-size: 16px; }
	.trust-card p { margin-top: 0; }
	.new-layout { grid-template-columns: 1fr; }
	.tall-banner { min-height: 300px; }
	.recent-row { grid-auto-columns: calc((100% - 3 * 18px) / 4); }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 80; top: 0;
		width: min(330px, 88vw); border-radius: 0; overflow-y: auto;
		transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
	}
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-head .icon-btn, .filters-toggle { display: inline-flex; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.reviews-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
	.topcard-hero { min-height: 0; }
	.topcard-hero:has(.hero) { padding-top: 0; }
	.hero { position: relative; inset: auto; border-radius: 0; }
	.slide { min-height: 0; display: flex; flex-direction: column; padding: 0 14px; }
	.slide > img { position: relative; inset: auto; height: auto; aspect-ratio: 2 / 1; border-radius: 18px; margin-top: 6px; }
	.slide::after { display: none; }
	.slide-inner { grid-template-columns: 1fr; padding: 22px 12px 72px; gap: 16px; }
	.slide-glass { margin-top: 0; padding: 14px 16px; font-size: 14px; }
	.glass-dot { display: none; }
	.slider-nav { bottom: 20px; inset-inline-end: 50%; transform: translateX(-50%); }
	.hero-search { position: relative; inset: auto; margin: 0 14px 0; transform: translateY(-14px); grid-template-columns: 1fr 1fr; background: rgba(255, 255, 255, .1); }
	.hs-field.hs-wide { grid-column: 1 / -1; }
	.topcard-hero:not(:has(.hero)) .hero-search { transform: none; }
	.pdp { grid-template-columns: 1fr; }
	.gallery { max-width: 320px; margin-inline: auto; width: 100%; }
	.author-profile { grid-template-columns: 1fr; text-align: center; justify-items: center; }
	.author-photo-lg { width: 200px; }
	.author-facts { width: 100%; }
}

@media (max-width: 760px) {
	.cart-pill-total { display: none; }
	.cart-pill { padding: 9px 12px; }
	.author-list { grid-template-columns: 1fr; }
	.footer-panel { padding: 28px 22px; }
	.cart-row { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "cover info remove" "cover price total" "cover qty qty"; row-gap: 10px; padding: 14px; }
	.cart-cover { grid-area: cover; align-self: start; }
	.cart-cover img { width: 64px; }
	.cart-info { grid-area: info; }
	.cart-row .price { grid-area: price; }
	.cart-row .qty { grid-area: qty; justify-self: start; }
	.cart-total { grid-area: total; justify-self: end; }
	.cart-remove { grid-area: remove; align-self: start; }
	.kit-reviews { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	:root { --gutter: 16px; }
	body[data-books-per-row] { --per-row: 2; }
	.topcard-wrap { padding: 0 8px; }
	.authors-panel { border-radius: 20px; }
	.topcard { border-radius: 0 0 20px 20px; margin-top: -20px; padding-top: 20px; }
	.topcard-hero:has(.hero) { padding-top: 0; }
	.topcard-body { border-radius: 0 0 20px 20px; padding: 14px 22px 34px; }
	.site-header { padding: 12px 14px; gap: 8px; margin: 8px 8px 0; border-radius: 20px; }
	.site-header.is-stuck { padding-inline: 22px; border-radius: 0 0 20px 20px; }
	.brand-name { font-size: 17px; }
	.brand img { width: 36px; height: 36px; }
	.hide-sm { display: none; }
	.section { padding-block: 46px; }
	.sec-title { font-size: 23px; }
	.sec-head { margin-bottom: 22px; }
	.slide { padding: 0 8px; }
	.slide-inner { padding: 18px 8px 68px; }
	.slide-title { font-size: 30px; }
	.slide-buttons .btn { flex: 1; }
	.hero-search { grid-template-columns: minmax(0, 1fr) auto; margin-inline: 8px; }
	.hero-search .hs-field:not(.hs-wide) { display: none; }
	.hero-search .hs-field.hs-wide { grid-column: auto; }
	.cat-info { inset-inline: 12px; bottom: 14px; }
	.cat-info h3 { font-size: 16px; }
	.hs-btn { padding-inline: 16px; }
	.book-grid, .book-grid.grid-new, .book-grid.grid-listing { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
	.bcard-title { font-size: 14.5px; }
	.price { font-size: 15px; }
	.bcard-cart { width: 40px; height: 40px; }
	.cat-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 35%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
	.cat-card { scroll-snap-align: start; }
	.marquee li { font-size: 26px; }
	.marquee li::after { width: 36px; height: 36px; margin-inline: 24px; background-size: 18px; }
	/* شريط الثقة في الهاتف: شريطٌ واحد يُمرَّر، بلا الصورة */
	.trust { padding-block: 34px; }
	.trust .sec-head { margin-bottom: 16px; }
	.trust .sec-title { font-size: 20px; }
	.trust-stage, .trust-stage:not(:has(.trust-figure)) { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px; scrollbar-width: none; }
	.trust-stage::-webkit-scrollbar { display: none; }
	.trust-col { display: contents; }
	.trust-figure { display: none; }
	.trust-card, .trust-card.tilt-a, .trust-card.tilt-b { transform: none; flex: 0 0 74%; scroll-snap-align: start; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 14px 16px; box-shadow: var(--shadow); }
	.trust-icon { grid-row: span 2; width: 42px; height: 42px; }
	.trust-card h3 { margin-top: 0; font-size: 15.5px; }
	.trust-card p { margin-top: 0; font-size: 13px; }
	.authors-wrap { padding: 0 8px; }
	.authors-panel { padding: 40px 18px; gap: 26px; }
	.author-row { grid-template-columns: 80px minmax(0, 1fr) auto; gap: 12px; padding: 12px; }
	.reviews-track { grid-auto-columns: 300px; }
	.reviews-track > :nth-child(even) { transform: translateX(-90px); }
	.review { padding: 16px; }
	.review-top { flex-wrap: wrap; }
	.recent-row { grid-auto-columns: 40%; }
	.footer-panel { grid-template-columns: 1fr; gap: 26px; }
	.footer-bottom { justify-content: center; text-align: center; }
	.topcard-body h1 { font-size: 30px; }
	.pdp-meta { grid-template-columns: 1fr; }
	.buy-card { grid-template-columns: 1fr; }
	.nf-code { font-size: 110px; }
	.topcard-body.nf h1 { font-size: 25px; }
	.nf-search { flex-direction: column; border-radius: 18px; padding: 10px; }
	.nf-search input { padding: 8px 6px; }
	.spec-table th { width: 40%; }
}

/* ---------------------------------------------------------------- الإصدار الثاني: سطر القسم، والتبويبات، والصفوف الكاملة، والدوّار */
.sec-sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.sec-head.center .sec-sub { margin-inline: auto; }
.sec-tools { display: flex; align-items: center; gap: 10px; }

/* التبويبات في صفّ الكتب (القاعدة 16): أقراصٌ في وسط القسم */
.row-tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: -10px auto 28px; }
.row-tab { padding: 9px 20px; border-radius: var(--pill); background: #fff; border: 1px solid var(--line-strong); font-size: 14.5px; font-weight: 700; color: var(--store-text); transition: background .2s, color .2s, border-color .2s; }
.row-tab:hover { border-color: var(--store-accent); }
.row-tab[aria-selected="true"] { background: var(--store-accent); border-color: var(--store-accent); color: #fff; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* صفوفٌ كاملة: لا يبقى في آخر الشبكة صفٌّ نصفه فارغ مهما كان عدد الكتب في الصفّ */
@media (min-width: 1025px) {
	body[data-books-per-row="3"] .fill-rows > :nth-child(n+7),
	body[data-books-per-row="5"] .fill-rows > :nth-child(n+6),
	body[data-books-per-row="6"] .fill-rows > :nth-child(n+7) { display: none; }
}
@media (max-width: 1024px) {
	.fill-rows > :nth-child(n+7) { display: none; }
}

/* الدوّار الأفقيّ: يُمرَّر باللمس، وسهمان في الحاسوب */
.book-row {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 18px) / 5); gap: 18px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.book-row::-webkit-scrollbar { display: none; }
.book-row > * { scroll-snap-align: start; }
.new-layout:has(.tall-banner) .book-row { grid-auto-columns: calc((100% - 3 * 18px) / 4); }
.carousel-nav { display: flex; gap: 8px; }
.carousel-nav .icon-btn { width: 40px; height: 40px; background: #fff; border: 1px solid var(--line-strong); color: var(--store-text); }
.carousel-nav .icon-btn:hover:not(:disabled) { background: var(--store-accent); border-color: var(--store-accent); color: #fff; }
.carousel-nav .icon-btn:disabled { opacity: .4; cursor: default; }

/* ---------------------------------------------------------------- عرض الأسبوع: كتابٌ واحد كبير بعدّادٍ واحد */
.deal-panel {
	display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); gap: 44px; align-items: center;
	padding: 44px; border-radius: 26px; border: 1px solid var(--line);
	background:
		radial-gradient(45% 70% at 88% 20%, color-mix(in srgb, var(--store-primary) 16%, transparent), transparent 70%),
		radial-gradient(40% 60% at 10% 90%, rgba(242, 169, 59, .14), transparent 70%),
		var(--soft);
}
.deal-head { display: grid; justify-items: start; gap: 12px; }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px 5px 12px; border-radius: var(--pill); background: var(--store-accent); color: #fff; font-size: 13px; font-weight: 700; }
.deal-kicker .icon { width: 16px; height: 16px; color: var(--star); fill: currentColor; stroke: none; }
.deal-head .sec-sub { margin-top: 0; }
.countdown { display: flex; gap: 10px; margin-block: 6px 8px; }
.countdown[hidden] { display: none; }
.cd-unit { display: grid; justify-items: center; min-width: 66px; padding: 10px 6px 8px; border-radius: 14px; background: var(--store-accent); color: #fff; line-height: 1.15; }
.cd-unit b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: var(--on-dark-muted); }
.deal-book { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: center; }
.deal-media { position: relative; }
.deal-cover { display: block; aspect-ratio: 2 / 3; border-radius: 18px; overflow: hidden; clip-path: var(--notch); box-shadow: var(--shadow-lg); background: var(--band); }
.deal-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.deal-book:hover .deal-cover img { transform: scale(1.04); }
.deal-media .type-dot { position: absolute; top: 12px; inset-inline-start: 12px; }
.deal-body { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.deal-title { font-size: 28px; font-weight: 900; }
.deal-title a:hover { color: var(--store-primary-dark); }
.deal-body .bcard-author { font-size: 14.5px; }
.deal-body .price-lg { margin-top: 6px; }
.deal-desc { margin-top: 8px; font-size: 15px; line-height: 1.85; color: #374151; }
.deal-desc p + p { margin-top: 6px; }
.deal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.deal-wish { width: 46px; height: 46px; border: 1px solid var(--line-strong); box-shadow: none; }
.deal-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--store-primary-dark); }
.deal-more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- صفحات الكتاب: اختيار الصيغة، والكمّيّة، والتوصيل */
.formats-box { margin-top: 22px; }
.formats-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.formats { display: flex; gap: 10px; }
.formats > * { flex: 1 1 0; min-width: 0; }
.format-opt { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: #fff; transition: border-color .2s; }
.format-opt:hover { border-color: var(--store-accent); }
.format-opt[aria-current="page"] { border-color: var(--store-primary); background: var(--primary-tint); }
.format-opt .type-dot { grid-row: span 2; width: 30px; height: 30px; box-shadow: none; }
.format-opt .type-dot .icon { width: 15px; height: 15px; }
.format-name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.format-price { font-size: 13.5px; font-weight: 800; color: var(--store-primary-dark); line-height: 1.3; }
.formats-box:not(:has([data-repeat="format"] ~ .format-opt)) { display: none; }
.pdp-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ship-box { display: grid; gap: 0; margin-top: 22px; border-radius: 16px; border: 1px solid var(--line); overflow: hidden; }
.ship-box li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 12px 16px; font-size: 14px; }
.ship-box li + li { border-top: 1px solid var(--line); }
.ship-box .icon { grid-row: span 2; width: 22px; height: 22px; color: var(--store-primary-dark); }
.ship-box b { font-size: 14.5px; }
.ship-box small { color: var(--muted); font-size: 13px; }
.buy-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.buy-row .qty { height: 46px; }
.buy-row .qty button { display: grid; place-items: center; width: 36px; height: 100%; }
.buy-row .qty button .icon { width: 16px; height: 16px; }
.buy-row .qty input { width: 32px; }
.buy-row .qty button { width: 32px; }
.buy-row .btn { padding-inline: 12px; min-width: 0; }
.buy-card .buy-row .btn .icon { display: none; }

/* ---------------------------------------------------------------- صفحة التصنيف: التصفية المختارة، وعرض القائمة */
.active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; font-size: 13.5px; color: var(--muted); }
.af-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: var(--pill); background: var(--primary-tint); color: var(--store-primary-dark); font-weight: 700; }
.af-chip .icon { width: 14px; height: 14px; }
.af-clear { font-weight: 700; color: var(--store-text); text-decoration: underline; text-underline-offset: 3px; }
.view-switch { display: inline-flex; padding: 3px; border-radius: var(--pill); border: 1.5px solid var(--line-strong); background: #fff; }
.view-switch button { display: grid; place-items: center; width: 36px; height: 34px; border-radius: var(--pill); color: var(--muted); }
.view-switch button[aria-pressed="true"] { background: var(--store-accent); color: #fff; }
.view-switch .icon { width: 18px; height: 18px; }
.book-grid.is-list { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
.book-grid.is-list .bcard { flex-direction: row; gap: 18px; align-items: stretch; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.book-grid.is-list .bcard-media { width: 120px; flex-shrink: 0; }
.book-grid.is-list .bcard-body { padding-top: 4px; }
.book-grid.is-list .bcard-title { font-size: 17px; }
.book-grid.is-list .bcard-foot { justify-content: flex-start; gap: 16px; }

@media (max-width: 1180px) {
	.book-grid.grid-listing { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.deal-panel { gap: 28px; padding: 34px; }
	.deal-book { grid-template-columns: 170px minmax(0, 1fr); gap: 22px; }
	.pdp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
	.book-row, .new-layout:has(.tall-banner) .book-row { grid-auto-columns: calc((100% - 2 * 18px) / 3); }
	.new-layout .tall-banner { min-height: 260px; }
}
@media (max-width: 900px) {
	.slide > img { margin-top: 32px; }
	.deal-panel { grid-template-columns: 1fr; }
	/* الشراء قبل التفاصيل في الهاتف والجهاز اللوحيّ */
	.pdp .buy-card { order: 1; }
	.pdp .pdp-info { order: 2; }
}
@media (max-width: 600px) {
	.slide > img { margin-top: 26px; border-radius: 14px; }
	.row-tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin: -6px calc(var(--gutter) * -1) 20px; padding-inline: var(--gutter); scrollbar-width: none; }
	.row-tabs::-webkit-scrollbar { display: none; }
	.row-tab { flex-shrink: 0; padding: 8px 16px; font-size: 14px; }
	.book-row, .new-layout:has(.tall-banner) .book-row { grid-auto-columns: 44%; gap: 14px; }
	.sec-head:has(.carousel-nav) .carousel-nav { display: none; }
	.deal-panel { padding: 22px 18px; border-radius: 20px; }
	.deal-book { grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: start; }
	.deal-title { font-size: 21px; }
	.deal-desc { display: none; }
	.deal-actions { margin-top: 10px; }
	.deal-actions .btn { padding: 10px 16px; font-size: 14px; }
	.deal-more { display: none; }
	.cd-unit { min-width: 0; flex: 1; padding: 8px 4px 6px; }
	.cd-unit b { font-size: 21px; }
	.countdown { width: 100%; }
	.formats { gap: 6px; }
	.format-opt { padding: 8px; column-gap: 6px; border-radius: 12px; }
	.format-opt .type-dot { width: 24px; height: 24px; }
	.format-opt .type-dot .icon { width: 13px; height: 13px; }
	.format-name { font-size: 13px; }
	.format-price { font-size: 12.5px; }
	.pdp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.meta-item { padding: 10px; column-gap: 8px; }
	.meta-item .icon { width: 30px; height: 30px; padding: 6px; }
	.book-grid.grid-listing { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
	.book-grid.is-list .bcard-media { width: 96px; }
	.book-grid.is-list .bcard-title { font-size: 15px; }
	.recent-row .bcard-cart, .bcard-tool { width: 40px; height: 40px; }
}
@media (max-width: 640px) {
	/* المدوّنة في الهاتف صفٌّ واحد يُمرَّر */
	.post-grid:not(.post-grid-page) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); gap: 14px; }
	.post-grid:not(.post-grid-page)::-webkit-scrollbar { display: none; }
	.post-grid:not(.post-grid-page) > * { scroll-snap-align: start; }
	.deal-actions { flex-wrap: nowrap; gap: 8px; }
	.deal-actions .btn .icon { display: none; }
	.deal-wish { width: 42px; height: 42px; flex-shrink: 0; }
}
@media (max-width: 380px) {
	.deal-book { grid-template-columns: minmax(0, 1fr); }
	.deal-media { max-width: 170px; }
}

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