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

:root {
	/* ألوان المتجر: يختارها الناشر (القاعدة 4) */
	--store-primary: #2B2F36;
	--store-primary-dark: #1C1F24;
	--store-accent: #EB662B;
	--store-bg: #FFFFFF;
	--store-text: #05073C;

	/* محايدات ومشتقّات */
	--on-primary: #FFFFFF;            /* الأبيض على الفحميّ ≈ 13 */
	--on-accent: #05073C;             /* البرتقاليّ للزخرفة وزرّ البحث؛ ونصّه داكنٌ دائمًا ≈ 5.9 */
	--warm: color-mix(in srgb, var(--store-accent) 7%, #FFFFFF);      /* اللوح الدافئ */
	--warm-2: color-mix(in srgb, var(--store-accent) 13%, #FFFFFF);
	--muted: #5C5F6E;
	--line: #E3E3E8;
	--white: #FFFFFF;
	--soft: #F5F5F7;                  /* لوحٌ رماديّ فاتح لـ«شاهدتَه مؤخّرًا» */
	--star: #F5A623;
	--ok: #1E7348;
	--shade: rgba(12, 14, 18, .5);
	--shadow: 0 14px 34px rgba(5, 7, 60, .1);
	--shadow-sm: 0 4px 14px rgba(5, 7, 60, .08);
	--radius: 12px;
	--radius-lg: 18px;
	--gap: 20px;
	--per-row: 5;
	--hdr-h: 78px;
	--font: "Tajawal", system-ui, sans-serif;
}

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 { --vis: var(--per-row); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--store-accent); outline-offset: 2px; }

.container { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 20px; }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.muted { color: var(--muted); }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-fill { fill: currentColor; stroke: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }
.rot { transform: rotate(45deg); }

/* ---------------------------------------------------------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 22px; border-radius: var(--radius);
	border: 1.5px solid transparent; font-weight: 700; font-size: 15px;
	transition: background .2s, color .2s, border-color .2s, transform .2s;
	white-space: nowrap;
}
.btn-primary { background: var(--store-primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--store-primary-dark); }
/* البرتقاليّ: نصٌّ داكن لأنّ الأبيض عليه ≈ 3.2 فقط */
.btn-accent { background: var(--store-accent); color: var(--on-accent); }
.btn-accent:hover { background: color-mix(in srgb, var(--store-accent) 88%, #FFFFFF); }
.btn-line { background: var(--white); color: var(--store-text); border-color: var(--line); }
.btn-line:hover { border-color: var(--store-text); }
.btn-ghost-white { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .85); border-radius: 999px; }
.btn-ghost-white:hover { background: rgba(255, 255, 255, .14); }
.btn-pill { border-radius: 999px; }
.btn-wide { width: 100%; max-width: 360px; min-height: 52px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn {
	display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--white); color: var(--store-text); flex: none;
}
.icon-btn:hover { border-color: var(--store-text); }
.icon-btn[aria-pressed="true"] { color: #C2410C; }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.see-all .icon { width: 18px; height: 18px; color: var(--store-accent); }
.see-all:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-size: 14px; }
.link-btn:hover { color: var(--store-text); }

/* ---------------------------------------------------------------- عنوان القسم */
.section { padding-block: 60px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-title { font-size: clamp(23px, 2.2vw, 30px); font-weight: 800; letter-spacing: -.01em; }
.sec-pick { color: var(--muted); font-weight: 500; }
.sec-sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.sec-tools { display: flex; align-items: center; gap: 14px; flex: none; }
.track-arrows { display: flex; gap: 8px; }
.track-arrow {
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--white); color: var(--store-text);
}
.track-arrow:hover:not(:disabled) { border-color: var(--store-text); }
.track-arrow:disabled { opacity: .4; cursor: default; }
.track-arrow .icon { width: 18px; height: 18px; }
.band-warm { background: var(--warm); }

/* ---------------------------------------------------------------- التقييم والسعر والشارات ودوائر النوع */
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rating a { text-decoration: underline; text-underline-offset: 3px; }
.stars { display: inline-flex; gap: 2px; color: var(--star); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: #D9D9DE; }
.rating-lg .stars .icon { width: 18px; height: 18px; }
.rating-lg { font-size: 15px; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-weight: 800; font-size: 16px; color: var(--store-text); }
.price del { font-weight: 400; font-size: 13px; color: var(--muted); }
.price-lg { font-size: 32px; }
.price-lg del { font-size: 17px; }
.type-dot {
	display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
	color: #FFFFFF; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); flex: none;
}
.type-dot .icon { width: 16px; height: 16px; stroke-width: 2; }
.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; }
.type-dot-xl { width: 50px; height: 50px; box-shadow: 0 0 0 4px var(--white), 0 8px 18px rgba(5, 7, 60, .18); }
.type-dot-xl .icon { width: 24px; height: 24px; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.badge-disc { background: var(--store-accent); color: var(--on-accent); }
.badge-new { background: var(--store-primary); color: var(--on-primary); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--warm-2); color: var(--store-text); font-size: 13.5px; font-weight: 500; }
.pill-white { background: var(--white); }

/* ---------------------------------------------------------------- الحافّة البيضاء المقوّسة تحت الصور الداكنة */
.edge-curve { position: absolute; inset-inline: 0; bottom: -1px; display: block; width: 100%; height: 56px; z-index: 4; pointer-events: none; }
.edge-curve path { fill: var(--store-bg); }
body[data-hero-edge="straight"] .edge-curve { display: none; }

/* ---------------------------------------------------------------- الرأس */
.site-header {
	position: sticky; top: 0; z-index: 40; color: #FFFFFF;
	background: var(--store-primary); transition: background .25s, box-shadow .25s;
}
/* فوق الصور الداكنة: شفّاف، ثمّ بلون المتجر عند التمرير */
body:has(.dark-head) .site-header { position: fixed; inset-inline: 0; background: transparent; }
body:has(.dark-head) .site-header.is-stuck,
body.search-open:has(.dark-head) .site-header { background: var(--store-primary); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.hdr { display: flex; align-items: center; gap: 22px; min-height: var(--hdr-h); }
/* الروابط داخل الصفحة لا تختفي تحت الرأس المثبّت */
#reviews { scroll-margin-top: calc(var(--hdr-h) + 16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.hdr-nav { margin-inline-start: 18px; }
.hdr-nav > ul { display: flex; align-items: center; gap: 2px; }
.hdr-nav a, .hdr-nav .drop-btn {
	position: relative; display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 12px;
	border: 0; background: none; font-size: 15px; font-weight: 500; color: inherit;
}
.hdr-nav > ul > li > a::after, .hdr-nav .drop-btn::after {
	content: ""; position: absolute; inset-inline: 12px; bottom: 6px; height: 2px; border-radius: 2px;
	background: var(--store-accent); transform: scaleX(0); transition: transform .2s;
}
.hdr-nav > ul > li > a:hover::after, .hdr-nav a[aria-current="page"]::after, .hdr-nav .drop-btn:hover::after { transform: none; }
.has-drop { position: relative; }
.drop-btn .icon { width: 16px; height: 16px; transition: transform .2s; }
.has-drop.open .drop-btn .icon { transform: rotate(180deg); }
.drop {
	position: absolute; top: 100%; inset-inline-start: 0; min-width: 240px; padding: 8px;
	background: var(--white); color: var(--store-text); border-radius: var(--radius); box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-drop:hover .drop, .has-drop.open .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: flex; gap: 10px; height: 42px; width: 100%; border-radius: 8px; }
.drop a .icon { width: 18px; height: 18px; color: var(--muted); }
.drop a:hover { background: var(--warm); }
.hdr-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; flex: none; }
.hdr-icon {
	position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
	border: 0; background: transparent; color: inherit;
}
.hdr-icon:hover { background: rgba(255, 255, 255, .12); }
.hdr-icon .count {
	position: absolute; top: 1px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 4px;
	display: grid; place-items: center; border-radius: 999px; background: var(--store-accent); color: var(--on-accent);
	font-size: 11px; font-weight: 800; line-height: 1;
}
.hdr-account {
	display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; margin-inline-start: 8px;
	border: 1.5px solid rgba(255, 255, 255, .75); border-radius: 999px; font-weight: 700; font-size: 14.5px;
}
.hdr-account:hover { background: #FFFFFF; color: var(--store-primary); }
.hdr-account .icon { width: 18px; height: 18px; }
.menu-btn { display: none; }
.m-search { display: none; padding: 0 0 14px; }
body.search-open .m-search { display: block; }

/* ---------------------------------------------------------------- الدرج الجانبيّ */
.drawer-backdrop {
	position: fixed; inset: 0; z-index: 55; background: rgba(10, 12, 16, .5);
	opacity: 0; visibility: hidden; transition: .25s;
}
body.drawer-open .drawer-backdrop, body.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer {
	position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60; width: min(340px, 86vw);
	background: var(--white); color: var(--store-text); overflow-y: auto;
	transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
}
body.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--store-primary); color: #FFFFFF; }
.drawer-head .brand-name { font-size: 18px; }
.drawer-nav li > a { display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; border-bottom: 1px solid #F0F0F3; font-weight: 500; }
.drawer-sub { display: grid; padding: 4px 0; border-bottom: 1px solid #F0F0F3; }
.drawer-sub a { padding: 8px 36px 8px 20px; font-size: 15px; color: var(--muted); }
.drawer-card { display: flex; align-items: center; gap: 12px; margin: 20px; padding: 16px; border-radius: 14px; background: var(--warm); }
.drawer-card small { display: block; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- حقل البحث الكبسوليّ */
.search-cap {
	display: flex; align-items: center; gap: 10px; width: 100%; max-width: 640px; margin-inline: auto;
	padding: 6px; padding-inline-start: 20px; border-radius: 999px; background: #FFFFFF; color: var(--store-text);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.search-cap .sc-ico { color: var(--muted); }
.search-cap input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; outline: 0; font-size: 15.5px; }
.search-cap input::placeholder { color: #6B6E7C; }
.sc-go {
	display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; flex: none;
	background: var(--store-accent); color: var(--on-accent);
}
.sc-go:hover { background: color-mix(in srgb, var(--store-accent) 88%, #FFFFFF); }
.sc-go .icon { width: 22px; height: 22px; stroke-width: 2.2; }
.search-cap-big { max-width: 720px; padding: 8px; padding-inline-start: 26px; }
.search-cap-big input { height: 56px; font-size: 17px; }
.search-cap-big .sc-go { width: 58px; height: 58px; }
.search-cap:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--store-accent) 45%, transparent), 0 10px 30px rgba(0, 0, 0, .18); }

/* الكبسولات الزجاجيّة */
.caps-label { margin: 22px 0 12px; font-size: 15px; color: #FFFFFF; }
.caps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cap {
	display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px;
	background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .38); color: #FFFFFF;
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-weight: 500; font-size: 15px;
	transition: background .2s;
}
.cap:hover { background: rgba(255, 255, 255, .26); }
.cap .icon { width: 18px; height: 18px; }
.cap small { padding: 0 7px; border-radius: 999px; background: rgba(0, 0, 0, .3); font-size: 12px; }

/* ---------------------------------------------------------------- الواجهة «البحث أوّلًا» */
.hero-top { position: relative; isolation: isolate; background: var(--store-primary-dark); color: #FFFFFF; }
.hero { position: relative; height: clamp(680px, 52vw, 770px); overflow: hidden; }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity .9s; }
.slide:first-child, .slider-ready .slide.is-active { opacity: 1; }
.slider-ready .slide:not(.is-active) { opacity: 0; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(12, 14, 18, .55) 0%, rgba(12, 14, 18, .22) 42%, rgba(12, 14, 18, .5) 100%);
}
.slide-body { position: relative; z-index: 2; padding-top: calc(var(--hdr-h) + 70px); text-align: center; }
.slide-body h2 { max-width: 920px; margin-inline: auto; font-size: clamp(36px, 4.7vw, 66px); font-weight: 800; line-height: 1.18; letter-spacing: -.015em; text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.slide-body p { max-width: 640px; margin: 14px auto 0; font-size: 18px; color: rgba(255, 255, 255, .92); }
.slide-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: #FFFFFF; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.slide-link .icon { width: 17px; height: 17px; }
.hero-over { position: absolute; z-index: 3; inset-inline: 0; bottom: 104px; text-align: center; }
.hero-fallback { display: none; }
.hero-dots { position: absolute; z-index: 5; inset-inline: 0; bottom: 66px; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .55); transition: width .25s; }
.hero-dots button[aria-current="true"] { width: 26px; background: #FFFFFF; }
/* إن أُخفي السلايدر: يبقى البحث والكبسولات على شريطٍ داكن بلون المتجر */
.hero-top:not(:has(.hero)) .hero-over { position: relative; bottom: auto; padding: calc(var(--hdr-h) + 56px) 20px 110px; }
.hero-top:not(:has(.hero)) .hero-fallback { display: block; margin-bottom: 26px; }
.hero-fallback h1, .hero-fallback h2 { font-size: clamp(32px, 4vw, 54px); font-weight: 800; }
.hero-fallback p { margin-top: 8px; font-size: 17px; color: #E7E8EC; }
.kit-hero { margin-top: 18px; }
.kit-hero .hero-over { padding-top: 56px !important; }

/* ---------------------------------------------------------------- بطاقة الكتاب «المؤطَّرة» */
.bcard {
	position: relative; display: flex; flex-direction: column; min-width: 0;
	background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	transition: box-shadow .25s, transform .25s;
}
.bcard:hover { box-shadow: var(--shadow); }
.bcard-media { position: relative; }
.bcard-cover { display: block; overflow: hidden; background: #F3EFE8; }
.bcard-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; transition: transform .5s; }
.bcard:hover .bcard-cover img { transform: scale(1.03); }
.bcard-media > .type-dot { position: absolute; top: 10px; inset-inline-start: 10px; }
.bcard-badges { position: absolute; top: 12px; inset-inline-end: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.stock-band {
	position: absolute; inset-inline: 0; bottom: 0; padding: 8px; text-align: center;
	background: rgba(28, 31, 36, .9); color: #FFFFFF; font-size: 13.5px; font-weight: 700;
}
.heart {
	position: absolute; z-index: 2; bottom: -20px; inset-inline-end: 14px; display: grid; place-items: center;
	width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--store-text);
	box-shadow: var(--shadow-sm); transition: color .2s, transform .2s;
}
.heart:hover { transform: scale(1.06); }
.heart .icon { width: 19px; height: 19px; }
.heart[aria-pressed="true"] { color: #C2410C; }
.heart[aria-pressed="true"] .icon { fill: currentColor; }
.bcard-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 14px 14px; }
.bcard-author { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); padding-inline-end: 44px; }
.bcard-author .icon { width: 14px; height: 14px; }
.bcard-title { font-size: 16px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bcard-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bcard-desc { display: none; font-size: 14px; color: var(--muted); }
.bcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); }
.add-btn {
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; flex: none;
	background: var(--store-primary); color: var(--on-primary); transition: background .2s;
}
.add-btn:hover:not(:disabled) { background: var(--store-accent); color: var(--on-accent); }
.add-btn .icon { width: 18px; height: 18px; }
.add-btn:disabled { background: #ECECEF; color: #6B6E7C; cursor: not-allowed; }
.bcard.is-out .bcard-cover img { filter: grayscale(.7); opacity: .75; }
/* شكل البطاقة */
body[data-card-style="shadow"] .bcard { border-color: transparent; box-shadow: 0 6px 22px rgba(5, 7, 60, .08); }
body[data-card-style="flat"] .bcard { border: 0; background: transparent; overflow: visible; }
body[data-card-style="flat"] .bcard:hover { box-shadow: none; }
body[data-card-style="flat"] .bcard-cover { border-radius: var(--radius); }
body[data-card-style="flat"] .bcard-body { padding-inline: 2px; }
body[data-card-style="flat"] .stock-band { border-radius: 0 0 var(--radius) var(--radius); }

/* ---------------------------------------------------------------- صفوف الكتب (مسارٌ أفقيّ) */
.track {
	display: grid; grid-auto-flow: column; gap: var(--gap);
	grid-auto-columns: calc((100% - (var(--vis) - 1) * var(--gap)) / var(--vis));
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }

/* ---------------------------------------------------------------- ثلاثة بانرات صور */
.offers { padding-top: 10px; }
.offer-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 22px; }
.offer { position: relative; display: block; overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 600 / 340; color: #FFFFFF; isolation: isolate; }
.offer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s; }
.offer:hover img { transform: scale(1.04); }
.offer::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 14, 18, .15), rgba(12, 14, 18, .72)); }
.offer-body { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 24px 26px; }
.offer-text { font-size: 14px; color: rgba(255, 255, 255, .92); }
.offer-title { max-width: 75%; margin-top: 4px; font-size: clamp(20px, 1.8vw, 25px); font-weight: 800; line-height: 1.3; }
.offer-btn {
	display: inline-flex; align-items: center; gap: 6px; margin-top: auto; height: 40px; padding: 0 18px; border-radius: 999px;
	background: #FFFFFF; color: var(--store-text); font-size: 14px; font-weight: 700;
}
.offer-btn .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- التصنيفات على اللوح الدافئ */
.cats-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: 60px; align-items: center; }
.cats-intro p { margin: 14px 0 26px; max-width: 400px; color: var(--muted); font-size: 16px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat-card {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 26px 14px 22px;
	background: var(--white); border-radius: var(--radius-lg); transition: transform .25s, box-shadow .25s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cc-img { display: block; width: 74px; height: 74px; margin-bottom: 10px; border-radius: 50%; overflow: hidden; }
.cc-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card h3 { font-size: 16px; }
.cat-card p { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- المؤلّفون */
.author-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.author-card { display: block; }
.ac-img { display: block; overflow: hidden; border-radius: var(--radius-lg); }
.ac-img img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s; }
.author-card:hover .ac-img img { transform: scale(1.05); }
.author-card h3 { margin-top: 12px; font-size: 16px; }
.author-card p { font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- لوح «لماذا نحن» (شريط الثقة) */
.why {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 54px; align-items: center;
	padding: 54px; border-radius: 28px; background: var(--warm);
}
.why-list { margin-top: 30px; display: grid; gap: 26px; }
.why-list li { display: flex; gap: 18px; align-items: flex-start; }
.why-ico {
	display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 16px;
	border: 1.5px solid var(--store-accent); color: var(--store-text); background: var(--white);
}
.why-ico .icon { width: 26px; height: 26px; stroke-width: 1.6; }
.why-list h3 { font-size: 18px; }
.why-list p { margin-top: 4px; color: var(--muted); font-size: 15px; }
.why-media { position: relative; display: block; overflow: hidden; border-radius: 24px; }
.why-media img { width: 100%; aspect-ratio: 840 / 680; object-fit: cover; }
.why-cap {
	position: absolute; bottom: 18px; inset-inline-start: 18px; display: grid; max-width: calc(100% - 36px);
	padding: 12px 18px; border-radius: 14px; background: var(--white); color: var(--store-text); box-shadow: var(--shadow-sm);
}
.why-cap b { font-size: 16px; }
.why-cap span { font-size: 14px; color: var(--muted); }
body[data-show-trust-bar="false"] .why-text { display: none; }
body[data-show-trust-bar="false"] .why:not(.author-hero) { grid-template-columns: 1fr; padding: 0; background: none; }
body[data-show-trust-bar="false"] .why:not(.author-hero) .why-media img { aspect-ratio: 16 / 6; }
.why:not(:has(.why-media)) { grid-template-columns: 1fr; }
.why:not(:has(.why-media)) .why-list { grid-template-columns: repeat(3, 1fr); }

/* ---------------------------------------------------------------- الشريط العريض بعرض الصفحة */
.wide { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 470px; overflow: hidden; color: #FFFFFF; text-align: center; }
.wide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.wide::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(12, 14, 18, .42); }
.wide-body { padding-block: 60px; }
.wide-body h2 { font-size: clamp(34px, 5vw, 70px); font-weight: 800; line-height: 1.15; letter-spacing: -.015em; }
.wide-body p { max-width: 620px; margin: 14px auto 26px; font-size: 18px; color: rgba(255, 255, 255, .92); }

/* ---------------------------------------------------------------- آراء القرّاء */
.rv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rv-item { display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius-lg); background: var(--white); }
.rv-item blockquote { margin: 14px 0 22px; font-size: 16px; line-height: 1.85; flex: 1; }
.rv-who { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.rv-av { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--store-primary); color: var(--on-primary); font-weight: 800; font-size: 19px; flex: none; }
.rv-who b { display: block; font-size: 15.5px; }
.rv-who small { color: var(--muted); font-size: 13px; }
body[data-show-reviews="false"] .reviews { display: none; }

/* ---------------------------------------------------------------- شاهدتَه مؤخّرًا */
.mini-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini-card { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.mc-cover { width: 64px; flex: none; border-radius: 8px; overflow: hidden; }
.mc-cover img { aspect-ratio: 2 / 3; object-fit: cover; width: 100%; }
.mc-body { min-width: 0; display: grid; gap: 2px; justify-items: start; }
.mc-body .type-dot { width: 24px; height: 24px; box-shadow: none; }
.mc-body .type-dot .icon { width: 13px; height: 13px; }
.mc-body h3 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mc-body p { font-size: 13px; color: var(--muted); }
.mc-body .price { font-size: 14.5px; }

/* ---------------------------------------------------------------- النشرة على شريط التمييز */
.news { margin-top: 30px; background: var(--store-accent); color: var(--on-accent); overflow: hidden; }
.news-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: end; }
.news-text { padding-block: 60px; }
.news h2 { font-size: clamp(25px, 2.6vw, 36px); font-weight: 800; line-height: 1.3; max-width: 560px; }
.news p { margin: 10px 0 24px; font-size: 16.5px; max-width: 520px; }
.news-field { display: flex; gap: 8px; max-width: 520px; padding: 6px; border-radius: 999px; background: #FFFFFF; }
.news-field input { flex: 1; min-width: 0; height: 46px; padding: 0 18px; border: 0; background: transparent; outline: 0; color: var(--store-text); }
.news-field .btn { border-radius: 999px; min-height: 46px; }
.news-art { width: 100%; max-width: 420px; justify-self: center; align-self: end; }
body[data-show-newsletter="false"] .news { display: none; }

/* ---------------------------------------------------------------- التذييل */
.site-footer { background: var(--store-primary-dark); color: #CFD1D7; font-size: 15px; }
.site-footer .container { padding-block: 0; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 30px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.foot-call { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #FFFFFF; font-size: 17px; }
.fc-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); }
.foot-call a { font-weight: 800; }
.foot-social { display: flex; align-items: center; gap: 8px; }
.foot-social span { margin-inline-end: 6px; }
.foot-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.foot-social a:hover { background: var(--store-accent); color: var(--on-accent); }
.foot-social .icon { width: 17px; height: 17px; }
.foot-cols { display: grid; grid-template-columns: 1.5fr 1.2fr 1fr 1fr; gap: 40px; padding: 44px 0; }
.foot-about .brand { color: #FFFFFF; margin-bottom: 14px; }
.foot-about p { max-width: 340px; }
.site-footer h3 { margin-bottom: 14px; color: #FFFFFF; font-size: 17px; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; }
.foot-contact .icon { width: 18px; height: 18px; margin-top: 3px; color: #FFFFFF; }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.to-top {
	position: fixed; z-index: 30; bottom: 22px; inset-inline-end: 22px; display: grid; place-items: center;
	width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--store-accent); color: var(--on-accent);
	box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* ---------------------------------------------------------------- مسار الصفحة ورؤوس الصفحات */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: #A0A2AD; }
.breadcrumb a:hover { color: var(--store-text); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--store-text); font-weight: 500; }
.page-head { padding: 26px 20px 8px; }
.page-title { margin-top: 10px; font-size: clamp(28px, 3vw, 38px); font-weight: 800; }
.page-sub { margin-top: 6px; color: var(--muted); }

/* رأس التصنيف و404: صورةٌ قصيرة داكنة بالحافّة المقوّسة */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--hdr-h) + 48px) 0 104px; background: var(--store-primary-dark); color: #FFFFFF; text-align: center; }
.ph-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 14, 18, .6), rgba(12, 14, 18, .45)); }
.page-hero .breadcrumb { justify-content: center; color: #E9EAEE; }
.page-hero .breadcrumb li + li::before { color: #C9CBD2; }
.page-hero .breadcrumb a:hover, .page-hero .breadcrumb [aria-current] { color: #FFFFFF; }
.page-hero h1 { margin-top: 14px; font-size: clamp(32px, 4vw, 54px); font-weight: 800; }
.page-hero .ph-body > p { max-width: 620px; margin: 8px auto 22px; font-size: 17px; color: #EDEEF1; }
.strip { margin-top: 20px; }
.nf-hero { padding-bottom: 120px; }
.page-hero .ph-body > .nf-code { margin: 0; font-size: clamp(110px, 16vw, 210px); font-weight: 800; line-height: .95; letter-spacing: -.03em; color: #FFFFFF; }
.nf-hero h1 { margin-top: 6px; font-size: clamp(26px, 3vw, 40px); }
.nf-hero .caps { margin-top: 20px; }
.nf-hero .slide-link { margin-top: 22px; }

/* ---------------------------------------------------------------- صفحة التصنيف */
.listing { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 34px; padding-bottom: 60px; }
.filters { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 4px 20px 10px; background: var(--white); }
.filters-head { display: none; }
.f-group { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.f-group:last-child { border-bottom: 0; }
.f-group h3 { padding: 16px 0 10px; font-size: 16px; }
.f-body { display: grid; gap: 4px; }
.f-body label { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 15px; cursor: pointer; }
.f-body input[type="checkbox"], .f-body input[type="radio"] { width: 18px; height: 18px; accent-color: var(--store-primary); margin: 0; }
.f-body .type-dot { width: 24px; height: 24px; box-shadow: none; }
.f-body .type-dot .icon { width: 13px; height: 13px; }
.f-body .n { margin-inline-start: auto; padding: 0 8px; border-radius: 999px; background: #F2F2F5; color: var(--muted); font-size: 12.5px; }
.range-bar { position: relative; height: 4px; margin: 10px 0 14px; border-radius: 4px; background: var(--line); }
.range-bar span { position: absolute; inset-block: 0; inset-inline: 15% 30%; border-radius: 4px; background: var(--store-primary); }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.filters-toggle { display: none; }
.count-text { color: var(--muted); font-size: 15px; }
.count-text b { color: var(--store-text); }
.tool-end { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.view-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--store-text); }
.view-btn[aria-pressed="true"] { background: var(--store-primary); border-color: var(--store-primary); color: var(--on-primary); }
.select { height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.book-grid { display: grid; grid-template-columns: repeat(var(--grid-cols, var(--per-row)), minmax(0, 1fr)); gap: 26px var(--gap); }
.listing .book-grid { --grid-cols: 4; }
.book-grid.is-list { grid-template-columns: 1fr; }
.book-grid.is-list .bcard { flex-direction: row; }
.book-grid.is-list .bcard-media { width: 170px; flex: none; }
.book-grid.is-list .heart { bottom: 10px; inset-inline-end: 10px; }
.book-grid.is-list .bcard-desc { display: block; }
.book-grid.is-list .bcard-author { padding-inline-end: 0; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 50%; border: 1px solid var(--line); font-weight: 700; }
.pagination a:hover { border-color: var(--store-text); }
.pagination span:not([aria-current]) { border-color: transparent; }
.pagination [aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: var(--on-primary); }
.pagination-start { justify-content: flex-start; margin-top: 16px; }

/* ---------------------------------------------------------------- صفحات الكتاب */
.pdp-crumbs { padding-top: 24px; }
.pdp-head { padding-top: 16px; padding-bottom: 22px; }
.pdp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pdp-title { font-size: clamp(28px, 3.2vw, 42px); font-weight: 800; letter-spacing: -.01em; }
.pdp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 10px; }
.pdp-by { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.pdp-by .icon { width: 16px; height: 16px; }
.pdp-by a { color: var(--store-text); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.stock { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; font-size: 14.5px; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pdp { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.gallery { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; align-items: end; padding: 44px; border-radius: 28px; background: var(--warm); }
.g-main { position: relative; }
.g-main img, .g-back img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 18px 40px rgba(5, 7, 60, .2); }
.g-main > .type-dot { position: absolute; top: -12px; inset-inline-start: -12px; width: 46px; height: 46px; box-shadow: 0 0 0 4px var(--white); }
.g-main > .type-dot .icon { width: 22px; height: 22px; }
.g-back small { display: block; margin-top: 10px; text-align: center; color: var(--muted); font-size: 13px; }
.buy-box { position: sticky; top: calc(var(--hdr-h) + 20px); padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.bb-type { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.bb-type .type-dot { width: 28px; height: 28px; box-shadow: none; }
.price-row { margin-top: 14px; }
.bb-lead { margin: 12px 0 20px; color: var(--muted); font-size: 15px; }
.bb-actions { display: grid; gap: 10px; }
.bb-row { display: flex; gap: 10px; }
.bb-row .btn { flex: 1 1 0; min-width: 0; }
.buy-box > .btn-pill { width: 100%; margin-top: 12px; }
.perks { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.perks li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); }
.perks .icon { width: 18px; height: 18px; color: var(--store-text); }
.sample-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding: 12px; border-radius: 14px; background: var(--warm); }
.play { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--store-primary); color: var(--on-primary); flex: none; }
.play .icon { width: 18px; height: 18px; }
.wave-bars { display: flex; align-items: center; gap: 3px; height: 34px; flex: 1; min-width: 120px; }
.wave-bars i { flex: 1; max-width: 4px; border-radius: 2px; background: color-mix(in srgb, var(--store-primary) 55%, transparent); }
.sample-bar small { width: 100%; color: var(--muted); font-size: 13px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 40px; border: 1px solid var(--line); border-radius: 20px; }
.fact { display: flex; align-items: center; gap: 14px; padding: 20px 22px; }
.fact + .fact { border-inline-start: 1px solid var(--line); }
.f-ico { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--warm-2); }
.f-ico .icon { width: 22px; height: 22px; }
.fact small { display: block; color: var(--muted); font-size: 13px; }
.fact b { font-size: 15.5px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 50px; align-items: start; }
.prose { margin-top: 14px; }
.prose p { margin-bottom: 14px; font-size: 16.5px; line-height: 1.95; }
.sub-title { margin: 26px 0 10px; font-size: 18px; }
.about-side .sub-title { margin-top: 0; }
.spec > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 700; text-align: end; }
.about-side { padding: 26px; border: 1px solid var(--line); border-radius: 20px; }
.chapters li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.chapters li:last-child { border-bottom: 0; }
.ch-n { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--warm-2); font-weight: 800; font-size: 14px; }
.chapters b { font-size: 15.5px; }
.chapters p { color: var(--muted); font-size: 14px; }
.rv-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 22px; margin-bottom: 22px; }
.rv-summary { display: flex; align-items: center; gap: 28px; padding: 26px; border-radius: var(--radius-lg); background: var(--white); }
.rv-score { text-align: center; flex: none; }
.rv-score strong { display: block; font-size: 52px; font-weight: 800; line-height: 1; }
.rv-score p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.rv-bars { flex: 1; display: grid; gap: 7px; }
.rv-bars li { display: grid; grid-template-columns: 58px 1fr 38px; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 8px; background: #EFEFF2; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 8px; background: var(--star); }
.rv-form { padding: 24px 26px; border-radius: var(--radius-lg); background: var(--white); }
.rv-form h3 { font-size: 18px; }
.rv-form > p { color: var(--muted); font-size: 14px; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin: 10px 0 4px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { color: #D9D9DE; cursor: pointer; }
.star-input label .icon { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 2px solid var(--store-accent); border-radius: 4px; }
.field { width: 100%; margin: 8px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; resize: vertical; background: var(--white); }

/* ---------------------------------------------------------------- صفحة المؤلّف */
.author-hero { margin-top: 18px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 14.5px; }
.eyebrow .icon { width: 16px; height: 16px; }
.author-hero h1 { margin-top: 6px; font-size: clamp(30px, 3.6vw, 48px); font-weight: 800; }
.ah-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.bio p { margin-bottom: 12px; font-size: 16.5px; line-height: 1.9; }
.ah-photo img { aspect-ratio: 1; }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: start; padding-top: 14px; }
.cart-box { padding: 6px 24px; border: 1px solid var(--line); border-radius: 20px; }
.cart-cols, .cart-row { display: grid; grid-template-columns: minmax(0, 2.4fr) 1fr 1.1fr 1fr 40px; gap: 14px; align-items: center; }
.cart-cols { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.cart-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-book { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cart-thumb { width: 72px; flex: none; }
.cart-thumb img { aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; }
.cart-info h3 { font-size: 16px; }
.cart-info p { color: var(--muted); font-size: 14px; }
.cart-type { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.cart-type .type-dot { width: 24px; height: 24px; box-shadow: none; }
.cart-type .type-dot .icon { width: 13px; height: 13px; }
.cart-price { font-size: 15px; }
.qty { display: inline-flex; align-items: center; height: 42px; border: 1px solid var(--line); border-radius: 999px; width: max-content; }
.qty button { width: 38px; height: 40px; border: 0; background: none; font-size: 18px; }
.qty input { width: 40px; height: 40px; border: 0; text-align: center; 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; }
.rm { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #F3F3F6; color: var(--muted); }
.rm:hover { color: #B42318; }
.rm .icon { width: 18px; height: 18px; }
.cart-empty { padding: 50px 0; text-align: center; }
.cart-empty .icon { width: 46px; height: 46px; margin: 0 auto 10px; color: var(--muted); }
.cart-empty h2 { font-size: 22px; }
.cart-empty p { margin: 6px 0 18px; color: var(--muted); }
.cart-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 0; }
.summary { position: sticky; top: calc(var(--hdr-h) + 20px); padding: 26px; border-radius: 20px; background: var(--warm); }
.summary h2 { font-size: 21px; }
.sum-count { color: var(--muted); font-size: 14px; }
.coupon { display: flex; gap: 8px; margin: 18px 0 10px; }
.coupon input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.coupon-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; border: 1px dashed var(--store-text); background: var(--white); font-size: 13px; }
.coupon-chip button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #F3F3F6; }
.coupon-chip .icon { width: 14px; height: 14px; }
.sum-rows { margin-top: 14px; }
.sum-rows > div { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; }
.sum-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--store-text) 15%, transparent); font-size: 21px; font-weight: 800; }
.summary .btn-block { margin-top: 18px; }
.secure { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 12px; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- صفحة المكوّنات */
.kit-sec { padding: 36px 0; border-bottom: 1px solid var(--line); }
.kit-sec h2 { font-size: 21px; }
.kit-sec p { color: var(--muted); margin-top: 4px; }
.kit-sec .kit-hero .hero-fallback p { color: #E7E8EC; margin-top: 8px; }
.kit-sec .kit-hero .caps-label { color: #FFFFFF; margin: 22px 0 12px; }
.kit-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin-top: 20px; max-width: 1100px; }
.kit-lbl { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.kit-type { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; }
.kit-mix { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, .7fr); gap: 22px; align-items: start; margin-top: 18px; }
.kit-cat-row { display: grid; }
.kit-cat-row .cat-card { background: var(--warm); }
.kit-lbl-gap { margin-top: 22px; }
.kit-sec .deal { margin-top: 4px; }
.kit-deal-expired { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head"; padding-block: 30px; }
.kit-rank, .kit-posts, .kit-buy, .kit-sec .active-filters { margin-top: 18px; }
.kit-buy { max-width: 470px; }
.kit-sec .deal-author { margin-top: 0; color: #D3D5DC; }
.kit-sec .deal-desc p { margin-top: 0; color: #E4E5EA; }
.kit-sec .kit-posts { max-width: 420px; grid-template-columns: 1fr; }

/* ---------------------------------------------------------------- العروض المتوسّطة */
@media (max-width: 1240px) {
	.hdr-nav a, .hdr-nav .drop-btn { padding: 0 9px; font-size: 14.5px; }
	.hdr-nav { margin-inline-start: 6px; }
	body { --vis: min(var(--per-row), 4); }
	.listing .book-grid { --grid-cols: 3; }
	.book-grid { --grid-cols: 4; }
}
@media (max-width: 1060px) {
	.hdr-nav, .hdr-account { display: none; }
	.menu-btn { display: inline-grid; }
	.hdr { gap: 10px; }
	.brand { margin-inline-end: auto; }
	.cats-split, .why, .author-hero { grid-template-columns: 1fr; gap: 34px; }
	.why { padding: 34px; }
	.cats-intro p { max-width: none; }
	.author-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.listing { grid-template-columns: 1fr; }
	.filters {
		position: fixed; z-index: 60; top: 0; bottom: 0; inset-inline-start: 0; width: min(340px, 88vw);
		border-radius: 0; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .3s, visibility .3s;
	}
	body.filters-open .filters { transform: none; visibility: visible; }
	.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
	.filters-head b { display: inline-flex; align-items: center; gap: 8px; }
	.filters-toggle { display: inline-flex; }
	.pdp, .about-grid, .cart-layout { grid-template-columns: 1fr; }
	.buy-box, .summary { position: static; }
	.rv-top { grid-template-columns: 1fr; }
	.foot-cols { grid-template-columns: 1fr 1fr; }
	.facts { grid-template-columns: repeat(2, 1fr); }
	.fact:nth-child(3) { border-inline-start: 0; }
	.fact:nth-child(n+3) { border-top: 1px solid var(--line); }
	.kit-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kit-mix { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
	body { --vis: 3; }
	.offer-grid { grid-auto-flow: row; grid-template-columns: 1fr; }
	.offer { aspect-ratio: 16 / 7; }
	.rv-grid { grid-template-columns: 1fr; }
	.mini-row { grid-template-columns: 1fr 1fr; }
	.listing .book-grid, .book-grid { --grid-cols: 3; }
}

/* ---------------------------------------------------------------- الهاتف */
@media (max-width: 640px) {
	:root { --hdr-h: 66px; --gap: 14px; }
	.track { grid-auto-columns: 46%; }
	.section { padding-block: 44px; }
	.sec-head { align-items: center; }
	.sec-tools .track-arrows { display: none; }
	.brand-name { font-size: 18px; }
	.brand img { width: 34px; height: 34px; }
	.hide-sm { display: none !important; }
	.hero { height: 700px; }
	.slide-body { padding-top: calc(var(--hdr-h) + 40px); }
	.slide-body h2 { font-size: 34px; }
	.slide-body p { font-size: 16px; }
	.hero-over { bottom: 76px; }
	.hero-dots { bottom: 40px; }
	.edge-curve { height: 30px; }
	.search-cap-big { padding: 6px; padding-inline-start: 18px; }
	.search-cap-big input { height: 46px; font-size: 15.5px; }
	.search-cap-big .sc-go { width: 48px; height: 48px; }
	.cap { height: 40px; padding: 0 14px; font-size: 14px; }
	.caps-label { margin: 16px 0 10px; }
	.cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.author-row { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 42%; overflow-x: auto; scrollbar-width: none; }
	.why { padding: 22px; border-radius: 22px; }
	.why:not(:has(.why-media)) .why-list { grid-template-columns: 1fr; }
	.wide { min-height: 400px; }
	.wide-body p { font-size: 16px; }
	.mini-row { grid-template-columns: 1fr; }
	.news-in { grid-template-columns: 1fr; gap: 0; }
	.news-text { padding-block: 44px 10px; }
	.news-art { max-width: 260px; }
	.news-field .btn { padding: 0 16px; }
	.foot-cols { grid-template-columns: 1fr; gap: 26px; }
	.listing .book-grid, .book-grid { --grid-cols: 2; gap: 20px 14px; }
	.book-grid.is-list .bcard-media { width: 120px; }
	.toolbar .count-text { order: 3; width: 100%; }
	.page-hero { padding-bottom: 70px; }
	.gallery { padding: 24px; gap: 16px; }
	.buy-box { padding: 20px; }
	.facts { grid-template-columns: 1fr; }
	.fact + .fact { border-inline-start: 0; border-top: 1px solid var(--line); }
	.rv-summary { flex-direction: column; align-items: stretch; }
	.cart-box { padding: 4px 16px; }
	.cart-cols { display: none; }
	.cart-row { grid-template-columns: 1fr auto; grid-template-areas: "book book" "price rm" "qty total"; gap: 12px; }
	.cart-book { grid-area: book; }
	.cart-price { grid-area: price; }
	.qty { grid-area: qty; }
	.cart-total { grid-area: total; justify-self: end; }
	.rm { grid-area: rm; justify-self: end; }
	.kit-cards, .kit-mix { grid-template-columns: 1fr; }
	.kit-cards { max-width: 300px; }
}

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

/* ================= ميزات المنصّة المعتمدة (SPEC، الملحق 8) ================= */

/* تبويبات التصنيفات في «الأفضل في…» */
.sec-head > div:has(> .sec-tabs) { min-width: 0; flex: 1; }
.sec-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sec-tabs button { min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--store-text); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; transition: .2s; }
.sec-tabs button:hover { border-color: var(--store-text); }
.sec-tabs button[aria-selected="true"] { background: var(--store-primary); border-color: var(--store-primary); color: var(--on-primary); }

/* المدوّنة */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.pcard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .25s; }
.pcard:hover { box-shadow: var(--shadow); }
.pcard-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--warm-2); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard:hover .pcard-media img { transform: scale(1.04); }
.pcard-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; }
.pcard-meta, .post-date { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.pcard-meta .icon, .post-date .icon { width: 15px; height: 15px; }
.pcard h3 { font-size: 18px; font-weight: 700; line-height: 1.45; }
.pcard h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pcard-text { font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-grid { row-gap: 28px; }
.blog-grid + .pagination { margin-top: 40px; }
.post .ph-body h1 { max-width: 900px; line-height: 1.35; }
.post .post-date { color: inherit; opacity: .9; }
.post-wrap { max-width: 880px; padding-block: 36px 56px; }
.post-hero { margin: 0; overflow: hidden; border-radius: var(--radius-lg); background: var(--warm-2); }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-body { padding-top: 30px; font-size: 18px; line-height: 1.95; }
.post-body p + p { margin-top: 18px; }

/* تطبيق المتجر في التذييل */
.foot-apps { margin-top: 22px; }
.foot-apps h3 { margin-bottom: 12px; }
.app-links { display: flex; flex-wrap: wrap; gap: 10px; }
.app-badge { display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 16px 0 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, .25); transition: background .2s; }
.app-badge:hover { background: rgba(255, 255, 255, .16); }
.app-badge .icon { width: 22px; height: 22px; }
.app-badge span { display: grid; line-height: 1.15; }
.app-badge small { font-size: 11px; color: rgba(255, 255, 255, .85); }
.app-badge b { font-size: 15px; }

@media (max-width: 900px) {
	.post-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.post-grid::-webkit-scrollbar { display: none; }
	.post-grid > .pcard { flex: 0 0 min(78%, 360px); scroll-snap-align: start; }
	.blog-grid { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
	.blog-grid > .pcard { flex: none; }
}
@media (max-width: 600px) {
	.blog-grid { grid-template-columns: 1fr; }
	.post-body { font-size: 16px; padding-top: 24px; }
	.sec-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding-inline: 4px; }
	.sec-tabs::-webkit-scrollbar { display: none; }
	.sec-tabs button { flex: none; }
}

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

/* ================= الإصدار الثاني: إيقاعٌ أكثف، وعرضٌ بعدّاد، وقائمةٌ مرقّمة ================= */

/* إيقاع الأقسام: قسمان أبيضان متتاليان لا تتضاعف المسافة بينهما */
main > .section:not(.band-warm):not(.band-soft) + .section:not(.band-warm):not(.band-soft) { padding-top: 0; }
.band-soft { background: var(--soft); }
.band-soft .mini-card { background: var(--white); }
.band-soft + .news { margin-top: 0; }

/* بطاقة الكتاب: المؤلّف في سطرٍ واحد، والنظرة السريعة تطفو فوق الغلاف فوق القلب ولا تحجز مكانًا */
.bcard-author span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qv {
	position: absolute; z-index: 2; bottom: 30px; inset-inline-end: 14px; display: grid; place-items: center;
	width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--store-text);
	box-shadow: var(--shadow-sm); transition: opacity .2s, transform .2s;
}
.qv .icon { width: 19px; height: 19px; }
.qv:hover { background: var(--store-primary); border-color: var(--store-primary); color: var(--on-primary); }
.bcard.is-out .qv { bottom: 46px; }
.book-grid.is-list .qv { bottom: 58px; inset-inline-end: 10px; }
@media (hover: hover) and (pointer: fine) {
	.qv { opacity: 0; transform: translateY(6px); }
	.bcard:hover .qv, .bcard:focus-within .qv { opacity: 1; transform: none; }
}

/* «عرض الأسبوع»: لوحٌ داكن، الغلاف على طرف، والعنوان والعدّاد ثمّ الكتاب على الآخر */
.deal {
	position: relative; isolation: isolate; overflow: hidden; display: grid;
	grid-template-columns: 250px minmax(0, 1fr); grid-template-areas: "media head" "media body" "media foot"; grid-template-rows: auto auto 1fr; column-gap: 56px; row-gap: 18px; align-items: start;
	padding: 46px 54px; border-radius: 28px; background: var(--store-primary-dark); color: #FFFFFF;
}
.deal::before {
	content: ""; position: absolute; z-index: -1; inset-block-start: -40%; inset-inline-start: -8%; width: 520px; aspect-ratio: 1; border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--store-accent) 42%, transparent), transparent 68%);
}
.deal-items, .deal-book { display: contents; }
.deal-head { grid-area: head; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; }
.deal-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; color: #F3C9B2; font-size: 14px; font-weight: 700; }
.deal-eyebrow .icon { width: 17px; height: 17px; }
.deal-timer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dt-label { font-size: 14px; color: #D3D5DC; }
.dt-units { display: flex; gap: 8px; }
.dt-box { display: grid; justify-items: center; min-width: 62px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.dt-box b { font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dt-box small { font-size: 12px; color: #D3D5DC; }
.deal-media { grid-area: media; position: relative; align-self: center; }
.deal-cover { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 50px rgba(0, 0, 0, .45); transform: rotate(-2.5deg); transition: transform .4s; }
.deal-cover:hover { transform: rotate(0); }
.deal-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.deal-media > .type-dot { position: absolute; top: -10px; inset-inline-start: -10px; box-shadow: 0 0 0 4px var(--store-primary-dark); }
.deal-badge { position: absolute; bottom: 16px; inset-inline-end: -10px; height: 32px; padding: 0 14px; font-size: 14px; }
.deal-body { grid-area: body; display: grid; justify-items: start; gap: 8px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.deal-author { display: inline-flex; align-items: center; gap: 6px; color: #D3D5DC; font-size: 15px; }
.deal-author .icon { width: 16px; height: 16px; }
.deal-title { font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; }
.deal-title a:hover { text-decoration: underline; text-underline-offset: 6px; }
.deal .rating { color: #D3D5DC; font-size: 14px; }
.deal-desc { max-width: 640px; margin-top: 4px; color: #E4E5EA; font-size: 16px; line-height: 1.85; }
.deal-foot { grid-area: foot; display: flex; align-items: center; }
.deal .price { color: #FFFFFF; }
.deal .price del { color: #B9BCC6; }
.deal-actions { display: flex; align-items: center; gap: 10px; }
.deal-actions .btn { min-height: 52px; padding: 0 26px; font-size: 16px; }
.deal-heart { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #FFFFFF; }
.deal-heart:hover { background: rgba(255, 255, 255, .12); }
.deal-heart[aria-pressed="true"] .icon { fill: currentColor; }

/* «الأكثر مبيعًا»: قائمةٌ مرقّمة، رقمٌ مفرَّغ كبير ثمّ غلافٌ صغير والبيانات */
.rank-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 22px; counter-reset: rank; }
.rcard { counter-increment: rank; display: flex; align-items: center; gap: 16px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); transition: box-shadow .25s, border-color .25s; }
.rcard:hover { box-shadow: var(--shadow); border-color: transparent; }
.rcard::before {
	content: counter(rank, decimal-leading-zero); flex: none; width: 54px; text-align: center;
	font-size: 42px; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--store-text);
}
.rcard:nth-child(-n+3)::before { color: var(--store-accent); -webkit-text-stroke: 0; }
.rc-cover { position: relative; display: block; width: 82px; flex: none; border-radius: 8px; overflow: hidden; background: #F3EFE8; }
.rc-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.rc-cover .type-dot { position: absolute; top: 6px; inset-inline-start: 6px; width: 26px; height: 26px; }
.rc-cover .type-dot .icon { width: 14px; height: 14px; }
.rc-body { flex: 1; min-width: 0; display: grid; gap: 3px; justify-items: start; }
.rc-title { max-width: 100%; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rc-author { font-size: 13.5px; color: var(--muted); }
.rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin-top: 6px; }

/* صفحة التصنيف: التصفية المختارة */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 22px; }
.af-label { color: var(--muted); font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--warm-2); color: var(--store-text); font-size: 14px; font-weight: 500; }
.chip .icon { width: 14px; height: 14px; }
.chip:hover { background: color-mix(in srgb, var(--store-accent) 22%, #FFFFFF); }
.chip-clear { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* صفحات الكتاب: اختيار النسخة والكمّيّة */
.formats-box { margin: 0 0 16px; }
.formats-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.format-opt { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: border-color .2s; }
.format-opt:hover { border-color: var(--store-text); }
.format-opt.is-current { border: 2px solid var(--store-primary); padding: 9px 11px; background: var(--warm); }
.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-weight: 700; font-size: 14.5px; }
.format-price { color: var(--muted); font-size: 13px; }
.bb-actions .qty { height: 52px; }
.bb-actions .qty button { height: 50px; }
.bb-actions .qty input { height: 50px; }

/* الهاتف وما بينه */
@media (max-width: 1060px) {
	.rank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.deal { grid-template-columns: 200px minmax(0, 1fr); column-gap: 36px; padding: 36px; }
}
@media (min-width: 641px) and (max-width: 900px) {
	.offer { aspect-ratio: 3 / 1; }
}
@media (max-width: 900px) {
	.rv-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.rv-grid::-webkit-scrollbar { display: none; }
	.rv-grid > .rv-item { flex: 0 0 min(82%, 380px); scroll-snap-align: start; }
}
@media (max-width: 640px) {
	.bcard-body { padding: 14px 10px 12px; gap: 5px; }
	.bcard-title { font-size: 15px; }
	.bcard-author .icon { display: none; }
	.filters-toggle { padding-inline: 12px; }
	.toolbar .select { max-width: 136px; }
	.bcard-foot .price, .rc-foot .price { font-size: 15px; }
	.bcard-foot .price { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.3; }
	.deal { grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "head head" "media body" "foot foot"; grid-template-rows: auto; column-gap: 18px; row-gap: 18px; padding: 24px 20px; border-radius: 22px; }
	.deal-head { align-items: flex-start; flex-direction: column; }
	.deal-media { align-self: start; }
	.deal-media > .type-dot { width: 34px; height: 34px; top: -8px; inset-inline-start: -8px; }
	.deal-media > .type-dot .icon { width: 17px; height: 17px; }
	.deal-badge { inset-inline-end: -6px; bottom: 8px; height: 26px; padding: 0 9px; font-size: 12.5px; }
	.deal-body { padding-top: 0; border-top: 0; gap: 6px; }
	.deal-title { font-size: 22px; }
	.deal-desc { display: none; }
	.deal-actions { flex: 1; }
	.deal-actions .btn { flex: 1; }
	.deal .price-lg { font-size: 24px; }
	.deal-actions .btn { min-height: 46px; padding: 0 18px; font-size: 15px; }
	.deal-heart { width: 46px; height: 46px; }
	.dt-units { gap: 6px; }
	.dt-box { min-width: 58px; padding: 6px 8px; }
	.dt-box b { font-size: 20px; }
	/* القائمة المرقّمة: عمودان من كتابين يُمرَّران أفقيًّا بدل ستّة صفوفٍ طويلة */
	.rank-grid { grid-template-columns: none; grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: 86%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.rank-grid::-webkit-scrollbar { display: none; }
	.rcard { scroll-snap-align: start; }
	.cat-grid { gap: 10px; }
	.cat-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 10px; align-items: center; justify-items: start; text-align: start; padding: 12px; gap: 0 10px; }
	.cat-card .cc-img { grid-row: span 2; width: 52px; height: 52px; margin: 0; }
	.cat-card h3 { font-size: 15px; align-self: end; }
	.cat-card p { align-self: start; }
	.rcard { gap: 12px; padding: 8px 12px 8px 10px; }
	.rcard::before { width: 34px; font-size: 28px; }
	.rc-cover { width: 54px; }
	.rc-cover .type-dot { top: 4px; inset-inline-start: 4px; width: 22px; height: 22px; }
	.rc-cover .type-dot .icon { width: 12px; height: 12px; }
	.rc-title { font-size: 15px; }
	.rc-foot { margin-top: 2px; }
	/* لوح «لماذا نحن»: شريطٌ واحد يُمرَّر بدل ثلاث فقراتٍ طويلة */
	.why-list { display: flex; gap: 12px; margin-top: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.why-list::-webkit-scrollbar { display: none; }
	.why-list li { flex: 0 0 78%; scroll-snap-align: start; gap: 12px; padding: 14px; border-radius: 16px; background: var(--white); }
	.why-ico { width: 44px; height: 44px; border-radius: 12px; }
	.why-ico .icon { width: 22px; height: 22px; }
	.why-list h3 { font-size: 16px; }
	.why-list p { font-size: 14px; }
	.why { gap: 22px; grid-template-columns: minmax(0, 1fr); }
	.why-media img { aspect-ratio: 16 / 10; }
	.active-filters { margin-top: -4px; }
	.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fact { gap: 10px; padding: 14px; }
	.fact .f-ico { width: 40px; height: 40px; }
	.fact .f-ico .icon { width: 19px; height: 19px; }
	.fact + .fact { border-top: 0; border-inline-start: 1px solid var(--line); }
	.fact:nth-child(odd) { border-inline-start: 0; }
	.fact:nth-child(n+3) { border-top: 1px solid var(--line); }
	.formats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.format-opt { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 2px; padding: 8px 6px; }
	.format-opt.is-current { padding: 7px 5px; }
	.format-opt .type-dot { grid-row: auto; }
}

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