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

:root {
	--store-primary: #FD9636;
	--store-primary-dark: #E07A1B;
	--store-accent: #0E224D;
	--store-bg: #FFFFFF;
	--store-text: #425A8B;

	--ink: var(--store-text);
	--muted: #56658A;
	--line: #D5DFE4;
	--soft: #F0F3F8;
	--soft-2: #F7F9FC;
	--gold: #F2B01E;
	--hot: color-mix(in srgb, var(--store-primary-dark) 62%, #000);
	--slide: color-mix(in srgb, var(--store-accent) 62%, #6F8FD0);
	--radius: 6px;
	--radius-lg: 10px;
	--shadow: 0 10px 30px rgba(14, 34, 77, .08);
	--head-font: "Readex Pro", "Tajawal", system-ui, sans-serif;
	--body-font: "Tajawal", system-ui, sans-serif;
	--container: 1320px;
	--gutter: 24px;
	--per-row: 5;
}
body[data-corners="sharp"] { --radius: 0px; --radius-lg: 0px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
	margin: 0;
	background: var(--store-bg);
	color: var(--ink);
	font-family: var(--body-font);
	font-size: 16px;
	line-height: 1.6;
	overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--head-font); font-weight: 600; line-height: 1.3; margin: 0; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
del { color: var(--muted); font-weight: 400; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--store-primary-dark); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.icon-fill { fill: currentColor; stroke: none; }
.flip { transform: scaleX(-1); }

/* ---------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 22px; border-radius: var(--radius);
	font-weight: 700; font-size: 15px; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s;
	white-space: nowrap;
}
.btn-primary { background: var(--store-primary); color: var(--store-accent); }
.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) 82%, #fff); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--store-accent); }
.btn-lg { min-height: 52px; font-size: 16px; padding-inline: 28px; }
.btn-block { width: 100%; }
.link-u { text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); }
.icon-btn:hover { background: var(--soft); }
.icon-btn .count {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding: 0 5px;
	border-radius: 10px; background: var(--store-primary); color: var(--store-accent);
	font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
}

/* ---------------- شريط الإعلان: نصٌّ يكتبه الناشر وحده */
.ann-bar { background: var(--store-accent); color: #fff; text-align: center; font-size: 14px; padding: 7px var(--gutter); }
.ann-bar:has(> p:empty) { display: none; }

/* ---------------- شريط الخدمات: روابط، وشريط الشحن المجّانيّ، والهاتف */
.svc-bar { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); background: #fff; }
.svc { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 40px; }
.svc-links { display: flex; gap: 6px; align-items: center; }
.svc-links a { padding: 4px 8px; }
.svc-links a + a { border-inline-start: 1px solid var(--line); }
.svc-links a:hover, .svc-help a:hover { color: var(--store-accent); }
.svc-help { display: flex; gap: 14px; align-items: center; }
.svc-help a { display: inline-flex; align-items: center; gap: 6px; }
.svc-help b { color: var(--store-accent); font-weight: 700; }
.shipbar { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.shipbar .icon { color: var(--store-primary-dark); }
.shipbar b { color: var(--store-accent); }
.ship-track { width: 120px; height: 6px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.ship-fill { display: block; height: 100%; background: var(--store-primary); border-radius: 4px; }
.shipbar.is-free .ship-track { display: none; }
[data-slot="cart.free_shipping_left"][hidden] { display: none !important; }

/* ---------------- الرأس: صفٌّ واحد لاصق */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-stuck { box-shadow: 0 6px 18px rgba(14, 34, 77, .08); }
.hdr { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 44px; height: 44px; border-radius: 10px; }
.brand-name { font-family: var(--head-font); font-weight: 700; font-size: 22px; color: var(--store-accent); }
.hdr-search { flex: 1 1 320px; max-width: 420px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); height: 46px; background: #fff; }
.hdr-search select { border: 0; background: transparent; padding-inline: 12px 8px; height: 100%; max-width: 150px; border-inline-end: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.hdr-search input { flex: 1; min-width: 0; border: 0; height: 100%; padding-inline: 12px; background: transparent; outline: none; }
.hdr-search input::placeholder, .field::placeholder { color: var(--muted); }
.hdr-search button { width: 44px; height: 100%; display: grid; place-items: center; color: var(--store-accent); }
.hdr-nav ul { display: flex; gap: 4px; }
.hdr-nav a, .drop-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 10px; font-weight: 500; color: var(--ink); font-size: 15px; }
.hdr-nav a:hover, .drop-btn:hover { color: var(--store-accent); }
.drop-btn .icon { width: 14px; height: 14px; }
.has-drop { position: relative; }
.drop { position: absolute; top: 100%; inset-inline-start: 0; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: none; z-index: 5; }
.has-drop.open .drop, .has-drop:hover .drop, .has-drop:focus-within .drop { display: block; }
.drop ul { display: block; }
.drop a { display: block; padding: 8px 10px; border-radius: 4px; }
.drop a:hover { background: var(--soft); }
.hdr-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.menu-btn, .search-toggle { display: none; }
.m-search { display: none; padding: 0 var(--gutter) 12px; }
.m-search .field-wrap { display: flex; border: 1px solid var(--line); border-radius: var(--radius); height: 44px; }
.m-search input { flex: 1; min-width: 0; border: 0; padding-inline: 12px; background: transparent; outline: none; }
.m-search button { width: 46px; display: grid; place-items: center; background: var(--store-primary); color: var(--store-accent); border-radius: var(--radius); }

/* ---------------- الدرج الجانبيّ */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(14, 34, 77, .45); opacity: 0; visibility: hidden; transition: .25s; z-index: 60; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(340px, 86vw); background: #fff; z-index: 61; transform: translateX(100%); transition: transform .3s; overflow-y: auto; padding: 18px; visibility: hidden; }
.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.drawer-nav > li > a { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--soft); font-weight: 500; }
.drawer-sub { display: grid; padding: 4px 14px 10px; }
.drawer-sub a { padding: 6px 0; color: var(--muted); }
.drawer-card { margin-top: 18px; display: flex; gap: 12px; align-items: center; background: var(--soft); border-radius: var(--radius); padding: 14px; }
.drawer-card small { display: block; color: var(--muted); }
.drawer-card b { color: var(--store-accent); }

/* ---------------- رؤوس الأقسام */
.section { padding-block: 44px; }
.section-tight { padding-block: 24px; }
.band { background: var(--soft); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding-bottom: 16px; margin-bottom: 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sec-title { font-size: 30px; font-weight: 600; }
.sec-sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.sec-sub:empty { display: none; }
.sh-end { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.arrows { display: flex; gap: 8px; }
.arrow { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--ink); background: #fff; }
.arrow:hover:not(:disabled) { border-color: var(--store-accent); color: var(--store-accent); }
.arrow:disabled { opacity: .45; cursor: default; }
.arrow .icon { width: 16px; height: 16px; }
.see-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--store-accent); font-size: 15px; }

/* التبويبات: نصوصٌ كبيرة رماديّة والمختار كحليّ */
.tabs { display: flex; gap: 6px 26px; flex-wrap: wrap; }
.tab { font-family: var(--head-font); font-size: 15px; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.tab[aria-selected="true"] { color: var(--store-accent); font-weight: 600; border-bottom-color: var(--store-primary); }
.tab:hover { color: var(--store-accent); }

/* ---------------- الواجهة: سلايدر وبجانبه أربعة بانرات */
.hero-area { padding-top: 24px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 20px; }
.hero-grid:not(:has(.hero)) { grid-template-columns: 1fr; }
.hero-grid:not(:has(.side-grid)) { grid-template-columns: 1fr; }
.hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--slide); min-height: 440px; isolation: isolate; }
.slides { position: relative; height: 100%; min-height: inherit; display: grid; }
.slide { position: relative; grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.slide:first-child, .slider-ready .slide.is-active { opacity: 1; visibility: visible; }
.slider-ready .slide:not(.is-active) { opacity: 0; visibility: hidden; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.slide::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to left, color-mix(in srgb, var(--store-accent) 62%, transparent) 0%, color-mix(in srgb, var(--store-accent) 20%, transparent) 55%, transparent 75%); }
.slide-body { position: relative; max-width: 470px; padding: 92px 48px 70px; color: #fff; }
.slide-body h2 { color: #fff; font-size: 46px; font-weight: 700; line-height: 1.2; }
.slide-body p { margin-top: 14px; font-size: 17px; max-width: 400px; }
.slide-cta { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.slide-cta .link-u { color: #fff; }
.hero-burst { position: absolute; top: -70px; inset-inline-start: -70px; width: 170px; height: 170px; border-radius: 50%; background: var(--store-primary); display: grid; place-items: end center; padding-bottom: 32px; color: var(--store-accent); z-index: 2; pointer-events: none; }
.hero-burst .icon { width: 34px; height: 34px; margin-inline-start: 46px; }
.hero-dots { position: absolute; bottom: 22px; inset-inline-start: 48px; display: flex; gap: 8px; z-index: 3; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.hero-dots button[aria-current="true"] { background: var(--store-primary); width: 26px; border-radius: 6px; }
.side-grid { display: grid; gap: 20px; grid-template-rows: 1fr 1fr; }
.bgroup { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pbanner { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: #EEF3FA; min-height: 210px; isolation: isolate; display: block; }
.pbanner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.pb-text { position: relative; padding: 18px 18px 14px; color: var(--store-accent); max-width: 92%; }
.pb-text h3 { color: var(--store-accent); font-size: 20px; font-weight: 600; }
.pb-text p { font-size: 14px; margin-top: 4px; color: var(--store-accent); }
.pb-link { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; color: var(--store-accent); }
.hero-fallback { display: none; }

/* ---------------- مربّعات التصنيفات بالعدد */
.track { display: grid; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }
.tile-track { grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: calc((100% - 8 * 14px) / 9); gap: 14px; }
.ctile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 14px 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s, box-shadow .2s; }
.ctile:hover { border-color: var(--store-accent); box-shadow: var(--shadow); }
.ctile-img { width: 74px; aspect-ratio: 1; }
.ctile-img img { width: 100%; height: 100%; object-fit: contain; }
.ctile h3 { font-family: var(--body-font); font-size: 14px; font-weight: 700; }
.ctile p { font-size: 12px; color: var(--muted); }
.strip-track { grid-auto-flow: column; grid-auto-columns: calc((100% - 7 * 14px) / 8); gap: 14px; }

/* ---------------- بطاقة الكتاب */
.type-dot { position: absolute; top: 10px; inset-inline-end: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; z-index: 2; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.type-dot .icon { width: 16px; height: 16px; }
.type-dot[data-type="print"] { background: #DB7056; }
.type-dot[data-type="ebook"] { background: #5675A3; }
.type-dot[data-type="audio"] { background: #986AB0; }
.type-dot[data-type="educational"] { background: #3f8f6b; }
.badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 2; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; line-height: 1.6; }
.badge-sale { background: var(--store-primary); color: var(--store-accent); }
.badge-new { background: #5BC694; color: var(--store-accent); }
.badge-best { background: var(--store-accent); color: #fff; }
.badge-pre { background: #fff; color: var(--store-accent); border: 1px solid var(--line); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: #D9DEE8; }
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; font-family: var(--head-font); }
.price > span:first-child, .price [data-slot="book.price"] { font-weight: 600; font-size: 19px; color: var(--store-accent); }
.price del { font-size: 14px; }

.book-grid { display: grid; grid-template-columns: repeat(var(--per-row), minmax(0, 1fr)); gap: 30px 22px; }
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; }
.bcard { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); min-width: 0; }
.bcard-media { position: relative; }
.bcard-cover { display: block; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.bcard-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.bcard:hover .bcard-cover img { transform: scale(1.03); }
.bcard-tools { position: absolute; bottom: 10px; inset-inline-end: 10px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transform: translateY(6px); transition: .2s; z-index: 2; }
.bcard:hover .bcard-tools, .bcard:focus-within .bcard-tools { opacity: 1; transform: none; }
@media (hover: none) { .bcard-tools { opacity: 1; transform: none; } }
.tool { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--store-accent); box-shadow: 0 2px 8px rgba(14, 34, 77, .15); }
.tool:hover { background: var(--store-primary); }
.tool[aria-pressed="true"] { color: #C0392B; }
.tool[aria-pressed="true"] .icon { fill: currentColor; }
.tool .icon { width: 17px; height: 17px; }
.bcard-body { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; flex: 1; }
.bcard-author { font-size: 13px; color: var(--muted); }
.bcard-title { font-family: var(--head-font); font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--ink); }
.bcard-title a:hover { color: var(--store-accent); }
.bcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.cart-mini { width: 38px; height: 38px; border-radius: var(--radius); background: var(--soft); color: var(--store-accent); display: grid; place-items: center; flex: none; transition: background .2s; }
.cart-mini:hover { background: var(--store-primary); }
.cart-mini:disabled { opacity: .5; cursor: not-allowed; }
.bcard-desc { display: none; }
.deal-ribbon { display: none; }
.stock-band { position: absolute; inset-inline: 0; bottom: 0; background: rgba(14, 34, 77, .86); color: #fff; text-align: center; font-size: 13px; font-weight: 700; padding: 6px; border-radius: 0 0 var(--radius) var(--radius); z-index: 1; }
.bcard.is-out .bcard-cover img { filter: grayscale(.7); opacity: .75; }
.release { font-size: 13px; color: var(--hot); font-weight: 700; display: flex; gap: 4px; align-items: center; }

/* أشكال البطاقة */
body[data-card-style="framed"] .book-grid .bcard,
body[data-card-style="framed"] .tab-track .bcard { border: 1px solid var(--line); padding: 12px; }
body[data-card-style="shadow"] .book-grid .bcard { padding: 12px; box-shadow: 0 6px 20px rgba(14, 34, 77, .08); }

/* ---------------- صفقات اليوم: بطاقتان أفقيّتان كبيرتان ثمّ أربع */
.deals-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: stretch; }
.deals-wrap:not(:has(.deals-side)) { grid-template-columns: 1fr; }
.deal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.deal-grid > .bcard:nth-child(-n+2) {
	grid-column: span 2; flex-direction: row; gap: 20px; padding: 22px 20px 20px; overflow: hidden;
	border: 2px solid var(--store-accent); border-radius: var(--radius);
}
.deal-grid > .bcard:nth-child(-n+2) .bcard-media { width: 42%; flex: none; }
.deal-grid > .bcard:nth-child(-n+2) .bcard-body { padding-top: 0; gap: 6px; }
.deal-grid > .bcard:nth-child(-n+2) .bcard-title { font-size: 19px; font-weight: 600; }
.deal-grid > .bcard:nth-child(-n+2) .bcard-foot { margin-top: 4px; justify-content: flex-start; gap: 14px; }
.deal-grid > .bcard:nth-child(-n+2) .price [data-slot="book.price"] { font-size: 28px; }
.deal-grid > .bcard:nth-child(-n+2) .bcard-desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--muted); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.deal-grid > .bcard:nth-child(-n+2) .deal-ribbon {
	display: block; position: absolute; top: 0; inset-inline-start: 0; width: 120px; height: 120px; z-index: 3; pointer-events: none;
	background: linear-gradient(to bottom left, var(--store-accent) 50%, transparent 50%);
}
.deal-grid > .bcard:nth-child(-n+2) .deal-ribbon span { position: absolute; top: 26px; right: 6px; transform: rotate(45deg); color: #fff; font-size: 12px; font-weight: 700; width: 80px; text-align: center; line-height: 1.25; }
.deal-grid > .bcard:nth-child(-n+2) .badges { inset-inline-start: auto; inset-inline-end: 10px; top: auto; bottom: 10px; }
.deal-grid > .bcard:nth-child(-n+2) .type-dot { inset-inline-end: 10px; }
.deal-grid > .bcard:nth-child(-n+2) .bcard-tools { inset-inline-end: auto; inset-inline-start: 10px; }
.deal-grid > .bcard:nth-child(n+3) { border: 1px solid var(--line); padding: 12px; }
.deals-side .pbanner { height: 100%; min-height: 420px; }
.deals-side .pb-text { padding: 26px 22px; }
.deals-side .pb-text h3 { font-size: 24px; }

/* العدّاد: مربّعاتٌ برتقاليّة */
.countdown { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cd-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.cd-units { display: inline-flex; gap: 6px; }
.cd-unit { display: grid; justify-items: center; gap: 2px; }
.cd-unit b { min-width: 38px; height: 36px; display: grid; place-items: center; border-radius: 6px; background: var(--store-primary); color: var(--store-accent); font-family: var(--head-font); font-weight: 600; font-size: 16px; padding-inline: 4px; }
.cd-unit small { font-size: 11px; color: var(--muted); }

/* ---------------- ثلاثة بانرات، الأوسط أعرض */
.trio { display: grid; grid-template-columns: 1fr 1.45fr 1fr; gap: 22px; }
.trio .pbanner { min-height: 280px; }
.trio .pbanner:nth-child(2) .pb-text { text-align: center; margin-inline: auto; padding-top: 24px; }
.trio .pbanner:nth-child(2) .pb-text h3 { font-size: 26px; font-weight: 700; letter-spacing: .3px; }
.trio .pb-text h3 { font-size: 22px; }

/* ---------------- البطاقة الأفقيّة (الأكثر مبيعًا والقوائم) */
.hcard { position: relative; display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; min-width: 0; }
.hcard-media { position: relative; width: 74px; flex: none; }
.hcard-cover { position: relative; display: block; width: 74px; flex: none; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--soft); }
.hcard-cover img { width: 100%; height: 100%; object-fit: cover; }
.hcard .type-dot { top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; }
.hcard .type-dot .icon { width: 13px; height: 13px; }
.hcard .badge { position: absolute; bottom: 4px; inset-inline-start: 50%; transform: translateX(50%); z-index: 2; font-size: 10px; padding: 0 6px; white-space: nowrap; }
.hcard-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hcard .bcard-title { font-size: 14px; }
.hcard .price [data-slot="book.price"] { font-size: 18px; }
.top-track { grid-template-rows: repeat(3, auto); grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 20px) / 3); gap: 18px 20px; }

/* ---------------- بانرا الكوبون الكحليّان */
.coupons { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cbanner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; background: var(--store-accent); color: #fff; border-radius: var(--radius); min-height: 92px; isolation: isolate; }
.cb-pattern { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; color: color-mix(in srgb, #fff 10%, transparent); }
.cbanner h3 { color: #fff; font-size: 17px; font-weight: 600; }
.cbanner p { color: #E3E8F2; font-size: 13px; margin-top: 2px; }
.coupon { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.coupon .icon { color: var(--store-primary); }
.coupon code { font-family: var(--head-font); font-weight: 600; font-size: 17px; color: var(--store-primary); letter-spacing: .5px; }
.coupon button { font-size: 12px; font-weight: 700; color: var(--store-accent); background: var(--store-primary); border-radius: 4px; padding: 3px 10px; }

/* ---------------- بطاقات التصنيف بقائمة أبنائها */
.ccards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.ccard { display: flex; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ccard-side { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: none; width: 82px; }
.ccard-side img { width: 72px; height: 72px; object-fit: contain; }
.btn-mini { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 4px; background: var(--soft); color: var(--store-accent); white-space: nowrap; }
.ccard h3 { font-size: 16px; margin-bottom: 8px; }
.ccard-kids li a { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); padding: 3px 0; }
.ccard-kids li a::before { content: ""; border: 4px solid transparent; border-inline-start-color: var(--line); }
.ccard-kids li a:hover { color: var(--store-accent); }

/* ---------------- المؤلّفون (مكان «العلامات المميّزة» في المرجع) */
.acards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.acard { display: flex; gap: 14px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.acard-img { width: 104px; flex: none; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.acard-img img { width: 100%; height: 100%; object-fit: cover; }
.acard-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acard h3 { font-size: 16px; }
.acard-bio { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acard-count { font-family: var(--head-font); font-weight: 600; color: var(--store-accent); font-size: 18px; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.acard-more { font-size: 13px; font-weight: 700; color: var(--hot); }

/* ---------------- أربعة أعمدة مدمجة */
.lists { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.list-col .sec-head { margin-bottom: 14px; padding-bottom: 10px; }
.list-col .sec-title { font-size: 19px; }
.list-col .hcard { border: 0; padding: 10px 0; border-radius: 0; }
.list-col .hcard + .hcard { border-top: 1px solid var(--soft); }

/* ---------------- البانر العريض النحيف */
.wide-banner { position: relative; display: block; border-radius: var(--radius); overflow: hidden; min-height: 120px; isolation: isolate; background: #E2ECFA; }
.wide-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.wb-text { display: flex; align-items: center; justify-content: center; gap: 6px 20px; flex-wrap: wrap; min-height: 120px; padding: 16px 190px; text-align: center; color: var(--store-accent); }
.wb-text h3 { color: var(--store-accent); font-size: 24px; font-weight: 700; }
.wb-text p { font-size: 15px; }

/* ---------------- المقالات */
.post-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.post-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card { display: flex; flex-direction: column; gap: 10px; }
.post-media { display: block; aspect-ratio: 8 / 5; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-media img { transform: scale(1.04); }
.post-date { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.post-title { font-size: 19px; font-weight: 600; line-height: 1.4; }
.post-title a:hover { color: var(--store-accent); }
.post-excerpt { font-size: 14px; color: var(--muted); }
.post-more { font-weight: 700; color: var(--hot); font-size: 14px; }

/* ---------------- شريط الثقة */
.trust-wrap { padding-top: 20px; }
.trust { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.trust-item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft-2); }
.trust-item .icon { width: 28px; height: 28px; color: var(--store-primary-dark); stroke-width: 1.5; }
.trust-item h3 { font-size: 15px; }
.trust-item p { font-size: 13px; color: var(--muted); }
body[data-show-trust-bar="false"] .trust-wrap { display: none; }

/* ---------------- النشرة الكحليّة */
.newsband { background: var(--store-accent); color: #fff; margin-top: 30px; }
.newsband-in { display: grid; grid-template-columns: 1.15fr 1fr 200px; gap: 30px; align-items: center; min-height: 150px; padding-block: 28px; }
.newsband h2 { color: #fff; font-size: 27px; font-weight: 600; }
.newsband p { color: #E3E8F2; }
.nl-field { display: flex; height: 50px; border-radius: var(--radius); overflow: hidden; background: #fff; }
.nl-field input { flex: 1; min-width: 0; border: 0; padding-inline: 16px; outline: none; color: var(--store-accent); }
.nl-field input::placeholder { color: var(--muted); }
.nl-field button { padding-inline: 22px; background: var(--store-primary); color: var(--store-accent); font-weight: 700; }
.nl-offer { margin-top: 8px; font-size: 14px; color: #fff; display: flex; gap: 6px; align-items: center; }
.nl-offer .icon { color: var(--store-primary); }
.nl-art { height: 120px; width: 100%; }
body[data-show-newsletter="false"] .newsband { display: none; }
[data-option]:empty { display: none; }

/* ---------------- التذييل */
.site-footer { background: var(--soft); margin-top: 0; }
.foot-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.3fr; gap: 28px; padding-block: 52px 36px; }
.foot-cols h3 { font-size: 20px; margin-bottom: 16px; color: var(--store-accent); }
.foot-contact li { font-size: 14px; margin-bottom: 10px; }
.foot-contact b { color: var(--store-accent); font-weight: 700; }
.foot-links li a { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 15px; }
.foot-links li a::before { content: ""; border: 4px solid transparent; border-inline-start-color: var(--muted); }
.foot-links a:hover { color: var(--store-accent); }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #C9D3E6; color: var(--store-accent); }
.social a:hover { background: var(--store-primary); }
.social .icon { width: 17px; height: 17px; }
.app-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.app-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--store-accent); color: #fff; padding: 6px 14px; border-radius: 8px; font-weight: 700; font-size: 14px; line-height: 1.2; }
.app-badge small { display: block; font-size: 10px; font-weight: 400; color: #E3E8F2; }
.pay { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pay span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; background: #fff; border: 1px solid var(--line); padding: 4px 10px; border-radius: 4px; color: var(--store-accent); }
.foot-note { font-size: 14px; }
.affiliate { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; font-weight: 700; color: var(--hot); font-size: 14px; }
.foot-bottom { background: #fff; }
.foot-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap; padding-block: 22px; font-size: 14px; }
.foot-bottom nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-bottom a:hover { color: var(--store-accent); }
.to-top { position: fixed; bottom: 22px; inset-inline-end: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--store-accent); color: #fff; display: grid; place-items: center; opacity: 0; visibility: hidden; transition: .25s; z-index: 30; }
.to-top.show { opacity: 1; visibility: visible; }

/* ================================================================ الصفحات الداخليّة */
.page-head { padding-top: 22px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line); }
.breadcrumb a:hover { color: var(--store-accent); }
.page-title { font-size: 34px; margin-top: 8px; }
.page-sub { color: var(--muted); margin-top: 4px; }

/* التصنيف */
.listing { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 30px; align-items: start; }
.filters { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px; position: sticky; top: 96px; background: #fff; }
.f-group { border-bottom: 1px solid var(--line); padding-block: 14px; }
.f-group:last-child { border-bottom: 0; }
.f-group h3 { font-size: 16px; margin-bottom: 10px; }
.f-group label { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.f-group input[type=checkbox], .f-group input[type=radio] { accent-color: var(--store-accent); width: 16px; height: 16px; }
.f-group .n { margin-inline-start: auto; color: var(--muted); font-size: 12px; background: var(--soft); padding: 0 8px; border-radius: 10px; }
.f-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.price-in { display: flex; gap: 8px; align-items: center; }
.field { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: var(--radius); padding-inline: 12px; background: #fff; }
textarea.field { height: auto; padding-block: 10px; }
.filters-head { display: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; }
.toolbar-start { display: flex; align-items: center; gap: 10px; }
.toolbar select { height: 38px; border: 1px solid var(--line); border-radius: var(--radius); padding-inline: 10px; background: #fff; }
.view-btns { display: flex; gap: 4px; }
.view-btns button { width: 36px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); }
.view-btns button[aria-pressed="true"] { background: var(--soft); color: var(--store-accent); }
.filters-toggle { display: none; }
.listing .book-grid { --per-row: 4; }
.listing .book-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.listing .book-grid.is-list .bcard { flex-direction: row; gap: 16px; border: 1px solid var(--line); padding: 14px; }
.listing .book-grid.is-list .bcard-media { width: 118px; flex: none; }
.listing .book-grid.is-list .bcard-body { padding-top: 0; }
.listing .book-grid.is-list .bcard-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; color: var(--muted); order: 4; }
.listing .book-grid.is-list .bcard-foot { order: 5; }
.listing .book-grid.is-list .badges .badge-best { display: none; }
.listing .book-grid.is-list .badges { top: auto; bottom: 8px; inset-inline-start: 8px; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; padding-inline: 8px; }
.pagination [aria-current="page"] { background: var(--store-accent); color: #fff; border-color: var(--store-accent); }
.pagination a:hover { border-color: var(--store-accent); }

/* صفحة الكتاب */
.pdp { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr) 340px; gap: 34px; align-items: start; padding-top: 18px; }
.gallery { position: relative; }
.g-main { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--soft-2); }
.g-main img { margin-inline: auto; border-radius: 4px; box-shadow: 0 14px 30px rgba(14, 34, 77, .18); }
.g-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.g-thumbs button { width: 70px; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; background: #fff; }
.g-thumbs button[aria-pressed="true"] { border-color: var(--store-accent); border-width: 2px; }
.pdp-info { display: flex; flex-direction: column; gap: 12px; }
.pdp-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-size: 13px; padding: 2px 12px; border-radius: 20px; background: var(--soft); color: var(--store-accent); font-weight: 700; }
.pdp-title { font-size: 34px; font-weight: 600; }
.pdp-by { font-size: 15px; }
.pdp-by a { color: var(--store-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.pdp-lead { color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; border-top: 1px solid var(--line); margin-top: 6px; }
.facts li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts li span:first-child { color: var(--muted); }
.facts li b { font-weight: 700; text-align: end; }
.buy-box { border: 2px solid var(--store-accent); border-radius: var(--radius); padding: 22px; position: sticky; top: 96px; background: #fff; }
.buy-box .bb-label { font-size: 13px; color: var(--muted); }
.buy-box .price [data-slot="book.price"] { font-size: 34px; }
.save { display: inline-block; margin-top: 6px; }
.stock { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #2F7A55; margin-top: 12px; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.qty-discount { margin-top: 10px; font-size: 14px; background: var(--soft); padding: 8px 12px; border-radius: var(--radius); }
.qty-discount b { color: var(--store-accent); }
.bb-actions { display: grid; gap: 10px; margin-top: 16px; }
.bb-row { display: flex; gap: 10px; }
.bb-row .btn { flex: 1 1 0; min-width: 0; padding-inline: 12px; }
.bb-row .icon-btn { flex: none; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); height: 52px; flex: none; }
.qty button { width: 38px; height: 100%; font-size: 20px; color: var(--store-accent); }
.qty input { width: 42px; text-align: center; border: 0; height: 100%; -moz-appearance: textfield; appearance: textfield; background: transparent; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.perks { margin-top: 18px; display: grid; gap: 10px; font-size: 14px; border-top: 1px dashed var(--line); padding-top: 16px; }
.perks li { display: flex; gap: 10px; align-items: center; }
.perks .icon { color: var(--store-accent); }
.bb-type { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; }
.bb-type .type-dot { position: static; }
.sample { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius); }
.sample .play { width: 42px; height: 42px; border-radius: 50%; background: var(--store-accent); color: #fff; display: grid; place-items: center; flex: none; }
.sample .bar { flex: 1; height: 6px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.sample .bar span { display: block; width: 28%; height: 100%; background: var(--store-primary); }
.ptabs { margin-top: 40px; }
.ptab-list { display: flex; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ptab-list button { font-family: var(--head-font); font-size: 18px; color: var(--muted); padding: 12px 0; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ptab-list button[aria-selected="true"] { color: var(--store-accent); font-weight: 600; border-bottom-color: var(--store-primary); }
.ptab-panel { padding-top: 24px; }
.ptab-panel[hidden] { display: none; }
.prose p + p { margin-top: 12px; }
.prose { max-width: 820px; }
.ptab-panel > .prose { max-width: none; columns: 2; column-gap: 44px; }
.ptab-panel > .prose p { break-inside: avoid; }
.chapters { display: grid; gap: 8px; max-width: 820px; margin-top: 18px; counter-reset: ch; }
.chapters li { display: flex; gap: 12px; padding: 10px 14px; background: var(--soft-2); border-radius: var(--radius); counter-increment: ch; }
.chapters li::before { content: counter(ch); font-family: var(--head-font); font-weight: 600; color: var(--store-accent); min-width: 18px; }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec div { display: grid; grid-template-columns: 220px 1fr; border-bottom: 1px solid var(--line); }
.spec div:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.spec div:nth-last-child(-n+2):nth-child(odd), .spec div:last-child { border-bottom: 0; }
.spec dt, .spec dd { margin: 0; padding: 12px 16px; font-size: 15px; }
.spec dt { background: var(--soft); color: var(--muted); }
.rv-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }
.rv-score { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.rv-score strong { display: block; font-family: var(--head-font); font-size: 46px; color: var(--store-accent); line-height: 1.1; }
.rv-score p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.rv-bars { margin-top: 14px; display: grid; gap: 6px; font-size: 13px; }
.rv-bars li { display: grid; grid-template-columns: 52px 1fr 34px; gap: 8px; align-items: center; }
.rv-bars .bar { height: 6px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.rv-bars .bar span { display: block; height: 100%; background: var(--gold); }
.rv-items { display: grid; gap: 18px; }
.rv-card { display: flex; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rv-av { width: 44px; height: 44px; border-radius: 50%; background: var(--soft); color: var(--store-accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.rv-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rv-head small { color: var(--muted); }
.rv-card p { margin-top: 4px; }
.rv-form { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 12px; }
.rv-form h3 { font-size: 18px; }
.rv-form > p { color: var(--muted); font-size: 14px; }
.star-input { border: 0; padding: 0; margin: 0; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { color: #D9DEE8; cursor: pointer; }
.star-input label .icon { width: 26px; height: 26px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.rv-form .btn { justify-self: start; }

/* المؤلّف */
.author-box { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; border: 2px solid var(--store-accent); border-radius: var(--radius); padding: 26px; margin-top: 18px; position: relative; overflow: hidden; }
.author-box img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.author-box h1 { font-size: 34px; }
.author-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.author-meta .pill b { font-weight: 700; }
.author-box .prose { margin-top: 14px; }

/* السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: start; padding-top: 18px; }
.cart-table { border: 1px solid var(--line); border-radius: var(--radius); }
.cart-head-row, .cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px 130px 120px 44px; gap: 14px; align-items: center; padding: 14px 18px; }
.cart-head-row { background: var(--soft); font-weight: 700; font-size: 14px; color: var(--store-accent); border-radius: var(--radius) var(--radius) 0 0; }
.cart-row { border-top: 1px solid var(--line); }
.cart-prod { display: flex; gap: 14px; align-items: center; min-width: 0; }
.cart-thumb { position: relative; width: 70px; flex: none; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-prod h3 { font-size: 16px; }
.cart-prod p { font-size: 13px; color: var(--muted); }
.cart-type { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.cart-type .type-dot { position: static; width: 22px; height: 22px; box-shadow: none; }
.cart-type .type-dot .icon { width: 12px; height: 12px; }
.cart-row .qty { height: 42px; }
.cart-row .price [data-slot="book.price"] { font-size: 16px; }
.cart-total { font-family: var(--head-font); font-weight: 600; color: var(--store-accent); }
.cart-foot { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--hot); }
.summary { border: 2px solid var(--store-accent); border-radius: var(--radius); padding: 22px; position: sticky; top: 96px; }
.summary h2 { font-size: 22px; margin-bottom: 14px; }
.coupon-in { display: flex; gap: 8px; }
.coupon-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; background: var(--soft); padding: 4px 10px; border-radius: 20px; color: var(--store-accent); font-weight: 700; }
.sum-rows { display: grid; gap: 10px; margin-top: 16px; padding-block: 14px; border-block: 1px solid var(--line); }
.sum-rows div { display: flex; justify-content: space-between; font-size: 15px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-block: 14px; font-family: var(--head-font); font-weight: 600; color: var(--store-accent); font-size: 20px; }
.secure { display: flex; gap: 6px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); margin-top: 12px; }
.cart-empty { text-align: center; padding: 50px 20px; display: grid; justify-items: center; gap: 10px; }
.cart-empty .icon { width: 48px; height: 48px; color: var(--store-accent); }

/* 404 */
.nf { text-align: center; padding-block: 50px 20px; display: grid; justify-items: center; gap: 14px; }
.nf-num { font-family: var(--head-font); font-size: 150px; font-weight: 700; line-height: 1; color: var(--store-accent); display: flex; align-items: center; gap: 6px; }
.nf-num .zero { width: 130px; height: 130px; border-radius: 50%; background: var(--store-primary); display: grid; place-items: center; color: var(--store-accent); }
.nf-num .zero .icon { width: 60px; height: 60px; }
.nf h1 { font-size: 30px; }
.nf p { color: var(--muted); max-width: 520px; }
.nf .hdr-search { width: 100%; max-width: 520px; flex: none; }
.nf-banner { max-width: 760px; margin-inline: auto; }

/* المقال */
.post-narrow { max-width: 820px; margin-inline: auto; }
.post-hero { width: 100%; border-radius: var(--radius); margin-bottom: 26px; }
.post-content p { margin-bottom: 16px; font-size: 17px; line-height: 1.9; }

/* components.html */
.kit-sec { padding-block: 30px; border-bottom: 1px dashed var(--line); }
.kit-sec > .container > h2 { font-size: 18px; margin-bottom: 18px; color: var(--muted); }
.kit-sec h2 code { font-size: 13px; background: var(--soft); padding: 1px 6px; border-radius: 4px; color: var(--store-accent); }
.kit-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.kit-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

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

/* ================================================================ العروض */
@media (max-width: 1240px) {
	.hdr-nav { display: none; }
	.menu-btn { display: inline-grid; }
	.tile-track { grid-auto-columns: calc((100% - 6 * 14px) / 7); }
	.trust { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pdp { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
	.buy-box { grid-column: 1 / -1; position: static; }
	.acards, .ccards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.newsband-in { grid-template-columns: 1fr 1fr; }
	.nl-art { display: none; }
	body[data-books-per-row="6"] { --per-row: 5; }
}
@media (max-width: 1024px) {
	:root { --gutter: 20px; }
	.hero-grid { grid-template-columns: 1fr; }
	.hero { min-height: 400px; }
	.deals-wrap { grid-template-columns: 1fr; }
	.deals-side .pbanner { min-height: 220px; }
	.book-grid, body[data-books-per-row] .book-grid { --per-row: 3; }
	.top-track { grid-auto-columns: calc((100% - 20px) / 2); }
	.trio { grid-template-columns: 1fr 1fr; }
	.trio .pbanner:nth-child(2) { grid-column: 1 / -1; order: -1; }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.listing { grid-template-columns: 1fr; }
	.filters { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(330px, 88vw); z-index: 61; overflow-y: auto; border-radius: 0; transform: translateX(100%); transition: transform .3s; visibility: hidden; }
	.filters-open .filters { transform: none; visibility: visible; }
	.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head { display: flex; justify-content: space-between; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); }
	.filters-toggle { display: inline-flex; }
	.cart-layout { grid-template-columns: 1fr; }
	.summary { position: static; }
	.strip-track { grid-auto-columns: calc((100% - 4 * 14px) / 5); }
	.rv-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	:root { --gutter: 16px; }
	body { font-size: 15px; }
	.svc-links, .svc-help .hide-sm { display: none; }
	.svc { justify-content: center; min-height: 36px; }
	.svc-help { display: none; }
	.svc-bar:not(:has(.shipbar:not([hidden]))) { display: none; }
	.hdr { min-height: 64px; gap: 6px; }
	.hdr-search { display: none; }
	.search-toggle { display: inline-grid; }
	.search-open .m-search { display: block; }
	.brand img { width: 38px; height: 38px; }
	.brand-name { font-size: 19px; }
	.hdr-actions .hide-sm { display: none; }
	.icon-btn { width: 38px; height: 38px; }
	.section { padding-block: 32px; }
	.sec-title { font-size: 24px; }
	.sec-head { margin-bottom: 18px; }
	.hero { min-height: 380px; }
	.slide::before { background: linear-gradient(to top, color-mix(in srgb, var(--store-accent) 70%, transparent) 0%, color-mix(in srgb, var(--store-accent) 30%, transparent) 70%, transparent 100%); }
	.slide-body { padding: 70px 22px 56px; }
	.slide-body h2 { font-size: 30px; }
	.slide-body p { font-size: 15px; }
	.hero-burst { width: 130px; height: 130px; top: -56px; inset-inline-start: -56px; padding-bottom: 22px; }
	.hero-burst .icon { width: 26px; height: 26px; margin-inline-start: 36px; }
	.hero-dots { inset-inline-start: 22px; }
	.side-grid, .bgroup { gap: 12px; }
	.pbanner { min-height: 170px; }
	.pb-text { padding: 14px; }
	.pb-text h3 { font-size: 16px; }
	.pb-text p { font-size: 13px; }
	.tile-track { grid-auto-columns: calc((100% - 2 * 12px) / 3); gap: 12px; }
	.deal-grid { gap: 16px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.deal-grid > .bcard:nth-child(-n+2) { flex-direction: column; padding: 16px; }
	.deal-grid > .bcard:nth-child(-n+2) .bcard-media { width: 64%; margin-inline: auto; }
	.deal-grid > .bcard:nth-child(-n+2) .price [data-slot="book.price"] { font-size: 24px; }
	.deal-grid > .bcard:nth-child(n+3) { padding: 8px; }
	.book-grid, body[data-books-per-row] .book-grid { --per-row: 2; gap: 24px 14px; }
	.listing .book-grid { --per-row: 2; }
	.trio { grid-template-columns: 1fr; }
	.trio .pbanner { min-height: 220px; }
	.top-track { grid-auto-columns: 88%; }
	.coupons { grid-template-columns: 1fr; }
	.cbanner { flex-direction: column; align-items: flex-start; padding: 18px; }
	.ccards, .acards, .lists { grid-template-columns: 1fr; }
	.post-grid, .post-grid-3 { grid-template-columns: 1fr; }
	.trust { grid-template-columns: 1fr 1fr; }
	.trust-item { padding: 12px; flex-direction: column; align-items: flex-start; }
	.wb-text { padding: 14px 70px; }
	.wb-text h3 { font-size: 18px; }
	.newsband-in { grid-template-columns: 1fr; gap: 16px; }
	.newsband h2 { font-size: 24px; }
	.foot-cols { grid-template-columns: 1fr 1fr; padding-block: 36px 20px; }
	.foot-cols > div:first-child, .foot-cols > div:last-child { grid-column: 1 / -1; }
	.page-title, .pdp-title, .author-box h1 { font-size: 26px; }
	.pdp { grid-template-columns: 1fr; }
	.gallery { max-width: 300px; margin-inline: auto; width: 100%; }
	.facts { grid-template-columns: 1fr; }
	.spec div { grid-template-columns: 120px 1fr; }
	.author-box { grid-template-columns: 1fr; padding: 18px; }
	.author-box img { max-width: 200px; }
	.cart-head-row { display: none; }
	.cart-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "p p" "pr q" "t rm"; padding: 14px; }
	.cart-row .cart-prod { grid-area: p; }
	.cart-row .qty { grid-area: q; justify-self: end; }
	.cart-row .cart-total { grid-area: t; }
	.cart-row .cart-unit { grid-area: pr; }
	.cart-row .rm { grid-area: rm; justify-self: end; }
	.nf-num { font-size: 96px; }
	.nf-num .zero { width: 86px; height: 86px; }
	.nf-num .zero .icon { width: 40px; height: 40px; }
	.strip-track { grid-auto-columns: calc((100% - 2 * 12px) / 3); gap: 12px; }
	.kit-cards { grid-template-columns: 1fr 1fr; }
	.toolbar { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ================================================================ تطوير 2026-10: الرئيسيّة */
/* رائج الآن: صفوفٌ كاملة لكلّ عددٍ في الصفّ (12 بطاقة؛ 10 حين يكون الصفّ خمسة) */
body[data-books-per-row="5"] .trend-grid > .bcard:nth-child(n+11) { display: none; }
.deal-grid > .bcard:nth-child(-n+2) .bcard-media { align-self: flex-start; }
.price [data-slot="book.price"] { white-space: nowrap; }

/* آراء القرّاء على الكتب، وتقييم المتجر في إطارٍ كحليّ كصندوق الشراء */
body[data-show-reviews="false"] .home-reviews { display: none; }
.reviews-wrap { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: stretch; }
.store-score { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px 18px; background: #fff; border: 2px solid var(--store-accent); border-radius: var(--radius); }
.store-score strong { font-family: var(--head-font); font-size: 54px; line-height: 1; color: var(--store-accent); }
.store-score .stars .icon { width: 20px; height: 20px; }
.store-score p { font-size: 14px; color: var(--muted); }
.store-score b { color: var(--store-accent); }
.store-score .btn { margin-top: 6px; }
.qcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.qcard { position: relative; margin: 0; display: flex; flex-direction: column; gap: 10px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.qcard .qmark { position: absolute; top: 16px; inset-inline-end: 16px; width: 30px; height: 30px; color: var(--store-primary); stroke-width: 2.2; }
.qcard blockquote { margin: 0; font-size: 15px; color: var(--ink); }
.qcard figcaption { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.qcard figcaption b { display: block; color: var(--store-accent); font-size: 15px; }
.qcard figcaption small { color: var(--muted); font-size: 13px; }
.qcard .rv-av { width: 38px; height: 38px; }

/* ================================================================ تطوير 2026-10: التصنيف */
.listing:has(> .listing-side) { align-items: stretch; }
.listing-side { display: flex; flex-direction: column; gap: 18px; }
.listing-side .filters { position: static; }
.side-banner { position: relative; display: block; overflow: hidden; border-radius: var(--radius); min-height: 420px; flex: 1; background: #FCEBD8; isolation: isolate; }
.side-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: bottom; z-index: -1; }
.side-banner .pb-text { padding: 22px 20px; }
.side-banner .pb-text h3 { font-size: 22px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 20px; }
.active-label { font-size: 14px; color: var(--muted); }
.active-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 12px; border-radius: 20px; background: var(--soft); color: var(--store-accent); font-size: 13px; font-weight: 700; }
.active-chip .icon { width: 14px; height: 14px; }
.active-chip:hover { background: var(--store-primary); }
.active-clear { font-size: 13px; font-weight: 700; color: var(--hot); text-decoration: underline; text-underline-offset: 3px; }

/* ================================================================ تطوير 2026-10: صفحة الكتاب */
.formats-box { display: grid; gap: 8px; }
.opt-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.format-opt { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.format-opt:hover { border-color: var(--store-accent); }
.format-opt.is-current { border: 2px solid var(--store-accent); padding: 7px 13px; }
.format-opt .type-dot { position: static; width: 26px; height: 26px; box-shadow: none; }
.format-opt .type-dot .icon { width: 14px; height: 14px; }
.format-name { font-weight: 700; color: var(--store-accent); font-size: 14px; }
.format-price { font-family: var(--head-font); font-size: 14px; color: var(--ink); }
.pdp-toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--soft-2); }
.pdp-toc h2 { font-size: 16px; margin-bottom: 8px; }
.pdp-toc .chapters { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; max-width: none; }
.pdp-toc .chapters li { padding: 4px 0; background: none; font-size: 14px; }
.pdp-sample { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.pdp-sample p { flex: 1 1 220px; font-size: 14px; color: var(--muted); }
.pdp-sample p b { color: var(--store-accent); }

/* ================================================================ تطوير 2026-10: المؤلّف */
.works-track { grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 22px) / 5); gap: 22px; }
.author-box .prose p + p { margin-top: 10px; }

/* ================================================================ تطوير 2026-10: العروض */
@media (max-width: 1240px) {
	body[data-books-per-row="6"] .trend-grid > .bcard:nth-child(n+11) { display: none; }
	.reviews-wrap { grid-template-columns: 1fr; }
	.store-score { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 18px; padding: 16px; }
	.store-score strong { font-size: 40px; }
	.store-score .btn { margin-top: 0; }
	.trust { grid-template-columns: repeat(5, minmax(190px, 1fr)); overflow-x: auto; scrollbar-width: none; }
	.trust::-webkit-scrollbar { display: none; }
	.works-track { grid-auto-columns: calc((100% - 3 * 22px) / 4); }
}
@media (max-width: 1024px) {
	body[data-books-per-row] .trend-grid > .bcard:nth-child(n+11) { display: flex; }
	.deals-side .pbanner { min-height: 200px; background: #DCE8F7; }
	.deal-grid > .bcard:nth-child(-n+2) .price [data-slot="book.price"] { font-size: 22px; }
	.deal-grid > .bcard:nth-child(-n+2) .bcard-desc { -webkit-line-clamp: 3; }
	.deals-side .pbanner > img { inset-inline-start: auto; width: 46%; object-position: center 72%; }
	.deals-side .pb-text { max-width: 54%; }
	.listing-side { display: contents; }
	.side-banner { display: none; }
	.ptab-panel > .prose { columns: 1; }
	.works-track { grid-auto-columns: calc((100% - 2 * 22px) / 3); }
	.qcards { grid-template-columns: repeat(3, minmax(240px, 1fr)); overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 760px) {
	/* شرائط تُمرَّر بالإصبع بدل أعمدةٍ طويلة */
	.m-strip { display: grid !important; grid-template-columns: none !important; grid-template-rows: none; grid-auto-flow: column; grid-auto-columns: 82%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
	.m-strip::-webkit-scrollbar { display: none; }
	.m-strip > * { scroll-snap-align: start; }
	.side-grid.m-strip { grid-auto-columns: 64%; }
	.side-grid.m-strip > .bgroup { display: contents; }
	.side-grid .pbanner { min-height: 132px; }
	.tile-track { grid-template-rows: auto; grid-auto-columns: 30%; }
	.ctile { padding: 10px 6px; }
	.ctile-img { width: 58px; }
	.trust.m-strip { grid-auto-columns: max-content; }
	.trust-wrap { padding-top: 14px; }
	.trust-item { flex-direction: row; align-items: center; padding: 10px 14px; }
	.trust-item .icon { width: 24px; height: 24px; }
	.trust-item h3 { font-size: 14px; }
	.trust-item p { font-size: 12px; }
	.lists.m-strip { grid-auto-columns: 86%; }
	.qcards.m-strip { grid-auto-columns: 84%; }
	body[data-books-per-row] .trend-grid > .bcard:nth-child(n+9) { display: none; }

	/* السلايدر: الصورة شريطٌ فوق النصّ لا خلفه */
	.hero { min-height: 0; }
	.slide > img { position: relative; inset: auto; height: 156px; object-position: left center; z-index: 0; }
	.slide::before { display: none; }
	.slide-body { padding: 18px 20px 44px; max-width: none; }
	.slide-body h2 { font-size: 26px; }
	.slide-body p { margin-top: 8px; }
	.slide-cta { margin-top: 16px; }
	.hero-dots { bottom: 18px; inset-inline-start: 20px; }

	/* صفقات اليوم: البطاقتان الكبيرتان أفقيّتان مدمجتان */
	.deal-grid > .bcard:nth-child(-n+2) { flex-direction: row; padding: 12px; gap: 12px; }
	.deal-grid > .bcard:nth-child(-n+2) .bcard-media { width: 40%; margin: 0; }
	.deal-grid > .bcard:nth-child(-n+2) .bcard-title { font-size: 16px; }
	.deal-grid > .bcard:nth-child(-n+2) .price [data-slot="book.price"] { font-size: 20px; }
	.deal-grid > .bcard:nth-child(-n+2) .bcard-desc { display: none; }
	.deal-grid > .bcard:nth-child(-n+2) .bcard-foot { flex-wrap: wrap; }
	.deal-grid > .bcard:nth-child(-n+2) .deal-ribbon { width: 84px; height: 84px; }
	.deal-grid > .bcard:nth-child(-n+2) .deal-ribbon span { top: 16px; right: -2px; font-size: 10px; width: 64px; }
	.deal-grid > .bcard:nth-child(-n+2) .bcard-tools { inset-inline-start: 6px; bottom: 6px; }
	.deals-side .pbanner { min-height: 170px; }
	.countdown { gap: 6px; }

	.listing .book-grid.is-list { grid-template-columns: 1fr; }
	.listing .book-grid.is-list .bcard-media { width: 96px; }
	.pdp { gap: 14px; }
	.formats { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
	.format-opt { flex-wrap: wrap; gap: 4px 8px; padding: 8px 10px; }
	.format-opt.is-current { padding: 7px 9px; }
	.format-price { flex-basis: 100%; }
	.pdp-info { display: contents; }
	.pdp > .gallery { order: 0; margin-bottom: 6px; }
	.pdp-info > * { order: 1; }
	.pdp > .buy-box { order: 2; margin-block: 6px; }
	.pdp-info > .facts, .pdp-info > .pdp-toc { order: 3; }
	.active-filters { margin-top: -6px; }
	.ptab-panel > .prose { columns: 1; }
	.spec { grid-template-columns: 1fr; }
	.spec div:nth-child(odd) { border-inline-end: 0; }
	.spec div:nth-last-child(-n+2):nth-child(odd) { border-bottom: 1px solid var(--line); }
	.pdp-toc .chapters { grid-template-columns: 1fr; }
	.works-track { grid-auto-columns: 46%; gap: 14px; }
	.wb-text { padding: 14px 70px; }
}

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