/* ==========================================================================
   قالب رَقيم — متجر كتبٍ بطابع السوق الرقميّ
   كلّ التنسيق هنا، بلا Tailwind ولا مكتبات. ألوان الهويّة في :root فقط.
   ========================================================================== */

:root {
	/* ألوان الهويّة (يختارها الناشر) */
	--store-primary: #6E4FF6;
	--store-primary-dark: #5236D6;
	--store-accent: #1DC9B7;
	--store-bg: #FFFFFF;
	--store-text: #2A2D3E;

	/* محايدات */
	--ink: #121519;
	--muted: #5B6080;
	--line: #E7E8EF;
	--soft: #F1F2F7;
	--foot-bg: #ECEDF3;
	--on-dark: #FFFFFF;
	--on-dark-muted: #B9BCCB;
	--gold: #F5B301;
	--star-off: #D5D7E2;

	/* مشتقّات من ألوان الهويّة */
	--primary-soft: color-mix(in srgb, var(--store-primary) 10%, #FFFFFF);
	--primary-ink: color-mix(in srgb, var(--store-primary-dark) 82%, #000000);
	--accent-soft: color-mix(in srgb, var(--store-accent) 14%, #FFFFFF);
	--panel: linear-gradient(150deg, color-mix(in srgb, var(--store-primary) 9%, #FFFFFF), color-mix(in srgb, var(--store-accent) 12%, #FFFFFF));

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

	--radius: 6px;
	--radius-lg: 10px;
	--shadow-sm: 0 1px 2px rgba(18, 21, 40, .05);
	--shadow: 0 2px 6px rgba(18, 21, 40, .04), 0 14px 34px -14px rgba(18, 21, 40, .16);
	--shadow-lg: 0 20px 50px -18px rgba(18, 21, 40, .28);
	--font: "Readex Pro", Tajawal, system-ui, sans-serif;
	--header-h: 72px;
}

body[data-corners="sharp"] {
	--radius: 0px;
	--radius-lg: 0px;
}

/* ---------------------------------------------------------------- الأساس */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.75;
	color: var(--store-text);
	background: var(--store-bg);
	overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 500; color: var(--store-text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
del { text-decoration: line-through; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--store-primary); outline-offset: 2px; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }

.icon {
	width: 20px; height: 20px; flex: none;
	fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- الأزرار */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 26px; border: 1px solid transparent; border-radius: var(--radius);
	font-size: 15px; font-weight: 500; line-height: 1.2; white-space: nowrap;
	transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--store-primary); color: #FFFFFF; }
.btn-primary:hover { background: var(--store-primary-dark); }
.btn-accent { background: var(--store-accent); color: var(--ink); }
.btn-accent:hover { background: color-mix(in srgb, var(--store-accent) 85%, #000000); }
.btn-dark { background: var(--ink); color: #FFFFFF; }
.btn-outline { background: #FFFFFF; color: var(--store-text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--store-primary); color: var(--primary-ink); }
.btn-ghost-light { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .45); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { background: var(--soft); color: var(--muted); border-color: var(--line); cursor: not-allowed; }

.icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
	border: 0; background: transparent; color: var(--store-text); border-radius: var(--radius); position: relative;
}
.icon-btn:hover { color: var(--store-primary-dark); }
.icon-btn.boxed { border: 1px solid var(--line); background: #FFFFFF; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm .icon { width: 17px; height: 17px; }
[data-action="wishlist"][aria-pressed="true"] { color: var(--store-primary-dark); }
[data-action="wishlist"][aria-pressed="true"] .icon { fill: currentColor; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-ink); font-weight: 500; }
.link-arrow:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- الرأس */
.site-header {
	position: sticky; top: 0; z-index: 60;
	background: #FFFFFF; border-bottom: 1px solid var(--line);
}
.hdr-row { display: flex; align-items: center; gap: 0; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-size: 21px; font-weight: 600; color: var(--store-text); letter-spacing: -.2px; }
.hdr-row > .brand { padding-inline-end: 24px; margin-inline-end: 8px; border-inline-end: 1px solid var(--line); height: 100%; }
.menu-toggle { display: none; }

.main-nav { display: flex; align-items: stretch; height: 100%; }
.main-nav > ul { display: flex; align-items: stretch; gap: 4px; }
.main-nav > ul > li { position: relative; display: flex; align-items: center; }
.main-nav > ul > li > a,
.main-nav > ul > li > button {
	white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; height: 100%;
	background: none; border: 0; font-size: 15px; color: var(--store-text);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > button:hover,
.main-nav [aria-current="page"] { color: var(--primary-ink); }
.main-nav .icon { width: 14px; height: 14px; }
.drop {
	position: absolute; top: 100%; inset-inline-start: 0; min-width: 230px; padding: 10px;
	background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.has-drop:hover .drop, .has-drop:focus-within .drop, .has-drop > [aria-expanded="true"] + .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: block; padding: 8px 12px; border-radius: var(--radius); font-size: 14.5px; }
.drop a:hover { background: var(--primary-soft); color: var(--primary-ink); }

.hdr-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.hdr-search { display: flex; align-items: center; width: 270px; height: 42px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.hdr-search input { flex: 1; min-width: 0; height: 100%; padding: 0 14px; border: 0; background: transparent; outline: none; font-size: 14px; }
.hdr-search input::placeholder { color: var(--muted); }
.hdr-search button { display: grid; place-items: center; width: 42px; height: 100%; border: 0; background: none; color: var(--muted); }
.search-toggle { display: none; }
.hdr-sep { width: 1px; height: 32px; background: var(--line); margin-inline: 8px; }
.count-bubble {
	position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--store-primary); color: #FFFFFF; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600;
}
.account-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); }

.hdr-search-row { border-top: 1px solid var(--line); padding: 10px 0; background: #FFFFFF; }
.hdr-search-row .hdr-search { width: 100%; }

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

/* ---------------------------------------------------------------- الأقسام */
.section { padding: 88px 0; }
.section-soft { background: var(--soft); }
.section-tight { padding: 56px 0; }
.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; max-width: 660px; margin-inline: auto; }
.section-title { font-size: 32px; font-weight: 500; letter-spacing: -.3px; }
.section-sub { margin-top: 12px; color: var(--muted); font-size: 15.5px; }
.section-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head.split .section-title { font-size: 26px; }
.section-cta { text-align: center; margin-top: 40px; }

/* ---------------------------------------------------------------- البطل */
.hero { position: relative; background: var(--ink); color: #FFFFFF; }
.slider { position: relative; overflow: hidden; }
.slides { display: grid; }
.slide { grid-area: 1 / 1; position: relative; min-height: 560px; display: grid; align-items: center; opacity: 0; visibility: hidden; transition: opacity .6s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 46% 70% at 50% 45%, rgba(18, 21, 25, .82), rgba(18, 21, 25, .5) 70%, rgba(18, 21, 25, .3)); }
.slide-in { position: relative; z-index: 1; text-align: center; padding-top: 40px; padding-bottom: 120px; }
.slide-in h1, .slide-in h2 { color: #FFFFFF; font-size: 46px; font-weight: 500; line-height: 1.3; max-width: 760px; margin: 0 auto; }
.slide-in p { max-width: 640px; margin: 18px auto 0; font-size: 17px; color: #FFFFFF; }
.slide-in .btn { margin-top: 28px; }
.slider-dots { position: absolute; bottom: 100px; inset-inline: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.slider-dots button { width: 10px; height: 10px; padding: 0; border-radius: 5px; border: 0; background: rgba(255, 255, 255, .45); transition: width .25s; }
.slider-dots button[aria-current="true"] { width: 26px; background: var(--store-accent); }

.hero-search-wrap { position: relative; z-index: 3; margin-top: 32px; }
.hero + .hero-search-wrap { margin-top: -78px; }
.hero-search {
	max-width: 920px; margin-inline: auto; padding: 22px; background: #FFFFFF;
	border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.hero-search-row { display: flex; gap: 12px; }
.hero-search-row .field { flex: 1; }
.hero-search-row select.field { flex: 0 0 210px; background-color: var(--soft); }
.search-types { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.type-link { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 99px; background: var(--soft); color: var(--store-text); }
.type-link:hover { background: var(--primary-soft); }
.type-link .type-dot { position: static; width: 24px; height: 24px; border-width: 0; }
.type-link .type-dot .icon { width: 13px; height: 13px; }

/* الحقول */
.field {
	width: 100%; height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius);
	background: #FFFFFF; font-size: 15px; outline: none; transition: border-color .2s;
}
.field:focus { border-color: var(--store-primary); }
.field::placeholder { color: var(--muted); }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6080' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 16px; background-position: left 14px center; padding-inline-end: 40px; }
textarea.field { height: auto; padding: 12px 16px; }

/* ---------------------------------------------------------------- نوع الكتاب والتقييم والسعر */
.type-dot {
	position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2;
	display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
	border: 2px solid #FFFFFF; color: #FFFFFF; box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.type-dot .icon { width: 16px; height: 16px; stroke-width: 1.9; }
.type-dot[data-type="print"] { background: var(--type-print); }
.type-dot[data-type="ebook"] { background: var(--type-ebook); }
.type-dot[data-type="audio"] { background: var(--type-audio); }
.type-dot[data-type="educational"] { background: var(--type-edu); }

.rating { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .icon { width: 14px; height: 14px; }
.stars .off { color: var(--star-off); }
.rating-lg .stars .icon { width: 18px; height: 18px; }

.price-chip {
	display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; padding: 3px 10px;
	border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; font-size: 14.5px;
}
.price-chip del { color: var(--muted); font-weight: 400; font-size: 12.5px; }

/* ---------------------------------------------------------------- بطاقة الكتاب */
.book-grid { --per: 4; display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); gap: 24px; }
body[data-books-per-row="3"] .book-grid { --per: 3; }
body[data-books-per-row="5"] .book-grid { --per: 5; }
body[data-books-per-row="6"] .book-grid { --per: 6; }
/* صفوف الرئيسيّة والاقتراحات بلا صفٍّ ناقص في آخرها */
body[data-books-per-row="3"] .book-grid:not(.in-listing) > :nth-child(n+7),
body[data-books-per-row="3"] .book-grid:not(.in-listing) > :nth-child(4):last-child,
body[data-books-per-row="5"] .book-grid:not(.in-listing) > :nth-child(n+6),
body[data-books-per-row="6"] .book-grid:not(.in-listing) > :nth-child(n+7) { display: none; }
.book-grid.in-listing { --per: 3; }
body[data-books-per-row="5"] .book-grid.in-listing, body[data-books-per-row="6"] .book-grid.in-listing { --per: 4; }

.book-card {
	display: flex; flex-direction: column; min-width: 0; position: relative;
	background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s;
}
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.book-media { position: relative; padding: 16px 16px 0; }
.book-cover { display: block; position: relative; aspect-ratio: 2 / 3; border-radius: calc(var(--radius) - 2px); overflow: hidden; background: var(--panel); }
.book-cover::before { content: ""; position: absolute; inset: 0; background: var(--panel); }
.book-cover img { position: relative; width: 100%; height: 100%; object-fit: cover; box-shadow: 0 8px 18px -8px rgba(18, 21, 40, .45); }
.book-media .type-dot { top: 24px; inset-inline-start: 24px; }
.book-badges { position: absolute; top: 26px; inset-inline-end: 24px; z-index: 2; display: grid; gap: 6px; justify-items: end; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 1.7; }
.badge-sale { background: var(--store-primary); color: #FFFFFF; }
.badge-new { background: var(--store-accent); color: var(--ink); }
.badge-pre { background: var(--ink); color: #FFFFFF; }
.stock-band {
	position: absolute; inset-inline: 16px; bottom: 0; z-index: 2; padding: 6px; text-align: center;
	background: rgba(18, 21, 25, .82); color: #FFFFFF; font-size: 13px; font-weight: 500;
}
.book-card.is-out .book-cover img { filter: grayscale(.7); opacity: .75; }
.cover-tools {
	position: absolute; bottom: 12px; inset-inline-end: 28px; z-index: 3; display: grid; gap: 8px;
	opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
.book-card.is-out .cover-tools { bottom: 46px; }
.cover-btn {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0;
	background: #FFFFFF; color: var(--store-text); box-shadow: var(--shadow);
}
.cover-btn:hover { color: var(--primary-ink); }
.book-card:hover .cover-tools, .cover-tools:focus-within, .cover-tools:has([aria-pressed="true"]) { opacity: 1; transform: none; }
@media (hover: none) { .cover-tools { opacity: 1; transform: none; } }

.book-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.book-title { font-size: 16px; font-weight: 500; line-height: 1.5; margin-bottom: 4px; }
.book-title a:hover { color: var(--primary-ink); }
.book-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.pen-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--store-primary); color: #FFFFFF; flex: none; }
.pen-dot .icon { width: 11px; height: 11px; stroke-width: 2.2; }
.book-meta .in { opacity: .9; }
.book-meta [data-slot="book.category"] { color: var(--primary-ink); }
.book-body > .rating { margin-bottom: 6px; }
.book-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
/* زرّ السلّة: زرّ «رقيم» الأصليّ، أيقونةٌ هادئة في مربّعٍ ليّن عند طرف صفّ السعر تتلوّن عند التحويم */
.cart-btn {
	display: grid; place-items: center; width: 34px; height: 34px; flex: none; margin-inline-start: auto; padding: 0;
	border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); transition: background-color .2s, color .2s;
}
.cart-btn .icon { width: 17px; height: 17px; }
.cart-btn:hover { color: var(--primary-ink); background: var(--primary-soft); }
.cart-btn[disabled] { background: transparent; color: var(--muted); opacity: .45; cursor: not-allowed; }
body[data-corners="sharp"] .cart-btn, body[data-corners="sharp"] .cover-btn { border-radius: 0; }
.foot-actions { display: flex; gap: 2px; margin-inline-start: auto; }
.foot-actions .icon-btn { color: var(--muted); }
.foot-actions .icon-btn:hover { color: var(--primary-ink); background: var(--primary-soft); }

/* أشكال البطاقة */
body[data-card-style="elevated"] .book-card { border-color: transparent; box-shadow: var(--shadow); }
body[data-card-style="minimal"] .book-card { background: transparent; border-color: transparent; box-shadow: none; }
body[data-card-style="minimal"] .book-card:hover { transform: none; }
body[data-card-style="minimal"] .book-media { padding: 0; }
body[data-card-style="minimal"] .book-media .type-dot { top: 10px; inset-inline-start: 10px; }
body[data-card-style="minimal"] .book-badges { top: 12px; inset-inline-end: 10px; }
body[data-card-style="minimal"] .stock-band { inset-inline: 0; }
body[data-card-style="minimal"] .cover-tools { inset-inline-end: 10px; }
body[data-card-style="minimal"] .book-body { padding: 12px 0 0; }
body[data-card-style="minimal"] .book-foot { border-top: 0; padding-top: 4px; }

/* ---------------------------------------------------------------- المميّزة (بطاقة أفقيّة) */
.feat-wrap { position: relative; }
.feat-track {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 30px) / 2); gap: 30px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 2px 24px;
}
.feat-track::-webkit-scrollbar { display: none; }
.feat-card {
	position: relative; overflow: hidden; scroll-snap-align: start;
	display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; padding: 26px;
	background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow);
}
.feat-card .book-cover { box-shadow: 0 14px 28px -12px rgba(18, 21, 40, .45); }
.feat-card .type-dot { top: 10px; inset-inline-start: auto; inset-inline-end: 10px; }
.feat-media { position: relative; }
.ribbon {
	position: absolute; top: 24px; inset-inline-start: -44px; z-index: 4; width: 170px; padding: 3px 0;
	transform: rotate(45deg); text-align: center; font-size: 12px; font-weight: 600;
	background: var(--store-accent); color: var(--ink); box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
}
.feat-body { display: flex; flex-direction: column; min-width: 0; padding-top: 8px; }
.feat-body .book-title { font-size: 20px; margin-bottom: 6px; }
.feat-body .rating { margin: 2px 0 10px; }
.book-desc { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feat-body .book-foot { margin-top: auto; padding-top: 16px; flex-wrap: wrap; }
.feat-body .price-chip { font-size: 16px; padding: 5px 12px; }
.car-btn {
	display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0;
	background: #FFFFFF; color: var(--store-text); box-shadow: var(--shadow);
}
.car-btn:hover { color: var(--primary-ink); }
.car-nav { display: none; justify-content: center; gap: 12px; margin-top: 6px; }
.feat-wrap > .car-btn { position: absolute; top: calc(50% - 32px); z-index: 2; }
.feat-wrap > .car-prev { inset-inline-start: -64px; }
.feat-wrap > .car-next { inset-inline-end: -64px; }

/* ---------------------------------------------------------------- التبويبات */
.tabs-box {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 16px;
	margin-bottom: 30px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius);
}
.tab {
	display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border: 0; border-radius: 4px;
	background: var(--soft); color: var(--store-text); font-size: 14px; transition: .2s;
}
.tab img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.tab:hover { background: var(--primary-soft); }
.tab[aria-selected="true"] { background: var(--store-primary); color: #FFFFFF; }
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* ---------------------------------------------------------------- شريط الثقة */
.trust-bar { padding: 28px 0 30px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.trust-item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 2px 14px; align-items: center; padding: 4px 22px; border-inline-start: 1px solid var(--line); }
.trust-item:first-child { border-inline-start: 0; padding-inline-start: 0; }
.trust-item .ic { grid-row: span 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); }
.trust-item:nth-child(even) .ic { background: var(--accent-soft); color: var(--ink); }
.trust-item .icon { width: 22px; height: 22px; stroke-width: 1.6; }
.trust-item h3 { font-size: 15.5px; line-height: 1.4; }
.trust-item p { font-size: 13px; line-height: 1.55; color: var(--muted); }
body[data-show-trust-bar="false"] .trust-bar { display: none; }

/* ---------------------------------------------------------------- التصنيفات (شريطٌ داكن) */
.cats-band { position: relative; padding: 80px 0; background: var(--ink) url("assets/pattern-dark.jpg") center / cover no-repeat; color: #FFFFFF; }
.cats-band .section-title { color: #FFFFFF; }
.cats-band .section-sub { color: var(--on-dark-muted); }
.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.cat-tile { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 10px; border-radius: var(--radius); transition: background-color .2s; }
.cat-tile:hover { background: rgba(255, 255, 255, .06); }
.cat-icon { position: relative; width: 84px; height: 84px; border-radius: 50%; padding: 5px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); }
.cat-icon img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.cat-tile h3 { color: #FFFFFF; font-size: 17px; }
.cat-tile .cat-count { color: var(--on-dark-muted); font-size: 13.5px; }
.cat-tile:nth-child(6n+1) .cat-icon { border-color: color-mix(in srgb, var(--store-primary) 70%, #FFFFFF); }
.cat-tile:nth-child(6n+2) .cat-icon { border-color: var(--store-accent); }
.cat-tile:nth-child(6n+3) .cat-icon { border-color: color-mix(in srgb, var(--store-primary) 40%, var(--store-accent)); }

/* ---------------------------------------------------------------- خطوات الشراء */
.steps { position: relative; counter-reset: step; display: grid; gap: 6px; }
.steps::before { content: ""; position: absolute; top: 0; bottom: 56px; inset-inline-start: 50%; width: 1px; background: var(--line); }
.steps::after {
	content: ""; position: relative; justify-self: center; width: 48px; height: 48px; border-radius: 50%;
	background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121519' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.step { counter-increment: step; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 120px; align-items: center; padding-top: 44px; }
.step::before {
	content: "الخطوة " counter(step); position: absolute; top: 0; inset-inline-start: 50%; transform: translateX(50%);
	padding: 2px 16px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-ink); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.step:nth-child(3n+2)::before { background: var(--accent-soft); color: var(--ink); }
.step-text h3 { font-size: 22px; margin-bottom: 12px; }
.step-text p { color: var(--muted); font-size: 14.5px; max-width: 440px; }
.step-art { position: relative; height: 200px; }
.step:nth-child(even) .step-text { order: 2; }
.step:nth-child(even) .step-art { order: 1; }
.art-back { position: absolute; width: 150px; height: 160px; border-radius: var(--radius); }
.art-back.a { top: 10px; inset-inline-end: 40px; background: color-mix(in srgb, var(--type-print) 22%, #FFFFFF); }
.art-back.b { top: 40px; inset-inline-start: 30px; background: color-mix(in srgb, var(--store-primary) 22%, #FFFFFF); }
.art-card {
	position: absolute; top: 0; inset-inline: 0; margin-inline: auto; width: 210px; background: #FFFFFF;
	border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.art-top { height: 120px; display: grid; place-items: center; background: linear-gradient(135deg, var(--store-accent), color-mix(in srgb, var(--store-accent) 30%, #FFFFFF)); }
.step:nth-child(3n+2) .art-top { background: linear-gradient(135deg, var(--store-primary), color-mix(in srgb, var(--store-primary) 35%, #FFFFFF)); }
.step:nth-child(3n) .art-top { background: linear-gradient(135deg, var(--type-audio), color-mix(in srgb, var(--type-audio) 35%, #FFFFFF)); }
.art-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: #FFFFFF; color: var(--store-text); box-shadow: var(--shadow); }
.art-icon .icon { width: 30px; height: 30px; display: none; }
.step:nth-child(3n+1) .art-icon .i1, .step:nth-child(3n+2) .art-icon .i2, .step:nth-child(3n) .art-icon .i3 { display: block; }
.art-lines { padding: 14px; display: grid; gap: 8px; }
.art-lines span { display: block; height: 8px; border-radius: 4px; background: var(--soft); }
.art-lines span:first-child { width: 70%; background: color-mix(in srgb, var(--store-primary) 30%, #FFFFFF); }
.art-lines span:nth-child(2) { width: 45%; }
.art-lines .art-row { display: flex; gap: 6px; align-items: center; height: auto; background: none; }
.art-lines .art-row i { display: block; width: 36px; height: 16px; border-radius: 3px; background: var(--store-primary); }
.art-lines .art-row b { display: block; width: 50px; height: 8px; border-radius: 4px; background: var(--gold); margin-inline-start: auto; }
.steps-section:not(:has(.steps > li)) { display: none; }

/* ---------------------------------------------------------------- آراء القرّاء */
.reviews-band { position: relative; padding: 90px 0 0; background: #1C1A2C url("assets/reviews-bg.jpg") center / cover no-repeat; color: #FFFFFF; }
.reviews-band .section-title { color: #FFFFFF; }
.reviews-band .section-sub { color: var(--on-dark-muted); }
.rv-stage { position: relative; max-width: 760px; margin: 0 auto; text-align: center; padding-bottom: 70px; }
.rv { display: none; }
.rv.is-active { display: block; animation: rvIn .5s; }
@keyframes rvIn { from { opacity: 0; transform: translateY(8px); } }
.rv-quote { width: 34px; height: 34px; margin: 0 auto 14px; color: #FFFFFF; }
.rv .rating { justify-content: center; margin-bottom: 14px; }
.rv-text { font-size: 19px; line-height: 1.9; color: #FFFFFF; }
.rv-name { display: block; margin-top: 22px; font-size: 18px; font-weight: 600; color: var(--store-accent); }
.rv-book { display: block; font-size: 14px; color: var(--on-dark-muted); }
.rv-book [data-slot="book.title"] { color: #FFFFFF; }
.rv-arrows { position: absolute; top: 40%; inset-inline: -90px; display: flex; justify-content: space-between; pointer-events: none; }
.rv-arrows button { pointer-events: auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #FFFFFF; }
.rv-avatars { position: relative; display: flex; justify-content: center; gap: 14px; transform: translateY(50%); margin-top: -10px; }
.rv-avatars button {
	width: 64px; height: 64px; border-radius: 50%; border: 4px solid #FFFFFF; padding: 0;
	background: var(--store-primary-dark); color: #FFFFFF; font-size: 22px; font-weight: 600; box-shadow: var(--shadow);
	transition: transform .2s;
}
.rv-avatars button:nth-child(3n+2) { background: var(--ink); }
.rv-avatars button:nth-child(3n) { background: color-mix(in srgb, var(--store-primary-dark) 70%, #000000); }
.rv-avatars button[aria-current="true"] { transform: scale(1.15); border-color: var(--store-accent); }
.reviews-band + .section { padding-top: 120px; }
body[data-show-reviews="false"] .reviews-band { display: none; }
body[data-show-reviews="false"] .reviews-band + .section { padding-top: 88px; }

/* ---------------------------------------------------------------- المؤلّفون */
.author-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.author-card { display: grid; justify-items: center; text-align: center; gap: 4px; }
.author-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #FFFFFF; box-shadow: var(--shadow); margin-bottom: 10px; transition: transform .25s; }
.author-card:hover img { transform: translateY(-4px); }
.author-card h3 { font-size: 16px; }
.author-card span { color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- بانران متجاوران */
.join-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 120px; }
.join-grid::after {
	content: "أو"; position: absolute; top: 50%; inset-inline-start: 50%; transform: translate(50%, -50%);
	width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
	background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; box-shadow: 0 0 0 8px color-mix(in srgb, var(--store-primary) 5%, #FFFFFF);
}
.join-grid:not(:has([data-repeat="banner"] ~ .join-card))::after { display: none; }
.join-card { display: grid; justify-items: center; text-align: center; gap: 12px; }
.join-card img { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; box-shadow: var(--shadow); }
.join-card h3 { font-size: 22px; }
.join-card p { color: var(--muted); max-width: 420px; }
.join-card .btn { margin-top: 8px; }
.join-card:nth-child(even) .btn { background: var(--store-accent); color: var(--ink); }

/* ---------------------------------------------------------------- النشرة */
.newsletter { padding: 80px 0; background: var(--ink) url("assets/pattern-dark.jpg") center / cover no-repeat; color: #FFFFFF; text-align: center; }
.nl-icon { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--store-accent); stroke-width: 1.3; }
.newsletter h2 { color: #FFFFFF; font-size: 26px; margin-bottom: 8px; }
.newsletter p { color: var(--on-dark-muted); max-width: 540px; margin-inline: auto; }
.nl-box { display: flex; max-width: 520px; margin: 26px auto 0; }
.nl-box .field { border-radius: 0; border: 0; height: 52px; border-start-start-radius: var(--radius); border-end-start-radius: var(--radius); }
.nl-box .btn { min-height: 52px; border-radius: 0; border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
.newsletter .nl-offer { margin-top: 14px; color: var(--store-accent); font-size: 14px; }

/* ---------------------------------------------------------------- التذييل */
.site-footer { background: var(--foot-bg); color: var(--muted); font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 70px 0 56px; }
.footer-grid h3 { font-size: 17px; color: var(--store-text); margin-bottom: 18px; }
.footer-about .brand { margin-bottom: 16px; }
.footer-about p { margin-bottom: 16px; max-width: 300px; }
.footer-contact { display: grid; gap: 8px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 10px; }
.footer-contact b { color: var(--primary-ink); font-weight: 500; }
.footer-links { display: grid; gap: 9px; }
.footer-links a:hover { color: var(--primary-ink); }
.social { display: flex; gap: 8px; margin-top: 18px; }
.social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #FFFFFF; color: var(--store-text); }
.social a:hover { color: var(--primary-ink); }
.footer-bottom { background: var(--ink); color: var(--on-dark-muted); text-align: center; padding: 18px 0; font-size: 13.5px; }
.footer-bottom b { color: #FFFFFF; font-weight: 500; }

/* ---------------------------------------------------------------- رأس الصفحات الداخليّة */
.page-hero { position: relative; padding: 56px 0 60px; background: var(--ink) url("assets/pattern-dark.jpg") center / cover no-repeat; color: #FFFFFF; text-align: center; }
.page-hero h1 { color: #FFFFFF; font-size: 36px; }
.page-hero p { color: var(--on-dark-muted); margin-top: 8px; }
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 13.5px; color: var(--on-dark-muted); margin-bottom: 12px; }
.crumbs a:hover { color: #FFFFFF; }
.crumbs-light { justify-content: flex-start; color: var(--muted); margin: 0; }
.crumbs-light a:hover { color: var(--primary-ink); }
.page-search { display: flex; max-width: 560px; margin: 24px auto 0; background: #FFFFFF; border-radius: var(--radius); padding: 6px; }
.page-search .field { border: 0; height: 46px; }
.page-search .btn { min-height: 46px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; padding: 4px 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .25); color: #FFFFFF; font-size: 14px; }
.chip:hover { background: rgba(255, 255, 255, .1); }

/* ---------------------------------------------------------------- التصنيف */
.listing { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 30px; align-items: start; }
.filters { display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 16px); }
.filters-head { display: none; }
.f-box { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.f-box h3 { font-size: 16px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--store-primary); }
.check .n { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.check .type-dot { position: static; width: 22px; height: 22px; border-width: 0; box-shadow: none; }
.check .type-dot .icon { width: 12px; height: 12px; }
.price-range { display: flex; gap: 10px; align-items: center; }
.price-range .field { height: 42px; font-size: 14px; }
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 24px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); }
.list-bar p { color: var(--muted); font-size: 14px; }
.list-bar p b { color: var(--store-text); font-weight: 500; }
.sort { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sort > span { font-size: 14px; color: var(--muted); margin-inline-end: 4px; }
.sort button { padding: 4px 12px; border: 0; border-radius: 4px; background: var(--soft); font-size: 13.5px; }
.sort button[aria-pressed="true"] { background: var(--store-primary); color: #FFFFFF; }
.filters-toggle { display: none; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.pagination a, .pagination span {
	display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 8px; border-radius: var(--radius);
	background: #FFFFFF; border: 1px solid var(--line); font-size: 14.5px;
}
.pagination a:hover { border-color: var(--store-primary); color: var(--primary-ink); }
.pagination [aria-current="page"] { background: var(--store-primary); border-color: var(--store-primary); color: #FFFFFF; }
.pagination .gap { border: 0; background: none; }
.pagination .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- صفحة الكتاب */
.crumb-strip { background: var(--soft); padding: 16px 0; border-bottom: 1px solid var(--line); }
.pdp { display: grid; grid-template-columns: 330px minmax(0, 1fr) 320px; gap: 30px; align-items: start; padding-block: 40px 70px; }
.pdp-media { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.pdp-media .book-cover { box-shadow: 0 18px 34px -16px rgba(18, 21, 40, .5); }
.pdp-media .type-dot { top: 32px; inset-inline-start: auto; inset-inline-end: 32px; width: 40px; height: 40px; }
.pdp-media .type-dot .icon { width: 19px; height: 19px; }
.pdp-media .ribbon { top: 26px; inset-inline-start: -40px; }
.pdp-info { min-width: 0; }
.cat-chip { display: inline-flex; padding: 2px 12px; border-radius: 4px; background: var(--primary-soft); color: var(--primary-ink); font-size: 13.5px; margin-bottom: 12px; }
.pdp-info h1 { font-size: 32px; font-weight: 500; margin-bottom: 8px; }
.byline { color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.byline a { color: var(--primary-ink); font-weight: 500; }
.pdp-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pdp-rating a { color: var(--primary-ink); }
.pdp-lead { color: var(--muted); font-size: 15.5px; margin-bottom: 24px; }
.spec-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.spec-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; }
.spec-tile .ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-ink); flex: none; }
.spec-tile small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.spec-tile b { font-weight: 500; font-size: 14.5px; }
.buybox {
	position: sticky; top: calc(var(--header-h) + 16px); padding: 24px; background: #FFFFFF;
	border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.buy-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.buy-price [data-slot="book.price"] { font-size: 30px; font-weight: 600; color: var(--store-text); }
.buy-price del { color: var(--muted); font-size: 16px; }
.buy-price .badge { align-self: center; }
.qty-deal { margin-top: 8px; font-size: 13.5px; color: var(--primary-ink); background: var(--primary-soft); padding: 6px 10px; border-radius: var(--radius); }
.stock-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.stock-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--type-edu); }
.buy-label { display: block; font-size: 13.5px; color: var(--muted); margin: 18px 0 8px; }
.formats { display: grid; gap: 8px; }
.format-opt {
	display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14.5px;
}
.format-opt:hover { border-color: var(--store-primary); }
.format-opt[aria-current="page"] { border-color: var(--store-primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--store-primary); }
.format-opt .type-dot { position: static; width: 26px; height: 26px; border-width: 0; box-shadow: none; }
.format-opt .type-dot .icon { width: 13px; height: 13px; }
.format-opt [data-slot="book.price"] { margin-inline-start: auto; font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); height: 46px; }
.qty button { width: 40px; height: 100%; border: 0; background: none; font-size: 18px; color: var(--store-text); }
.qty input { width: 46px; height: 100%; border: 0; text-align: center; background: transparent; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row { display: flex; gap: 8px; margin-top: 18px; }
.buy-row .qty button { width: 32px; }
.buy-row .qty input { width: 34px; }
.buy-row .btn { flex: 1; min-width: 0; padding-inline: 12px; }
.buy-stack { display: grid; gap: 10px; margin-top: 12px; }
.buy-notes { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.buy-notes div { display: flex; align-items: center; gap: 10px; }
.buy-notes .icon { width: 18px; height: 18px; color: var(--store-primary); }
.wave { display: flex; align-items: center; gap: 3px; height: 40px; margin-top: 14px; padding: 0 12px; border-radius: var(--radius); background: var(--soft); }
.wave i { flex: 1; border-radius: 2px; background: color-mix(in srgb, var(--type-audio) 55%, #FFFFFF); }
.wave i:nth-child(-n+9) { background: var(--type-audio); }
.wave-time { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.pdp-tabs-wrap { border-top: 1px solid var(--line); padding: 50px 0 70px; }
.pdp-tablist { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.pdp-tablist button { padding: 10px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; font-size: 15px; }
.pdp-tablist button[aria-selected="true"] { background: var(--store-primary); border-color: var(--store-primary); color: #FFFFFF; }
.pdp-panel { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.pdp-panel [data-slot="book.description"] { display: grid; gap: 14px; max-width: 820px; color: var(--store-text); }
.spec-table { width: 100%; border-collapse: collapse; max-width: 760px; }
.spec-table th, .spec-table td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-table th { width: 200px; color: var(--muted); font-weight: 400; background: var(--soft); }
.rv-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 30px; align-items: start; }
.rv-summary { text-align: center; padding: 24px; background: var(--soft); border-radius: var(--radius); }
.rv-summary .big { font-size: 46px; font-weight: 600; line-height: 1.1; }
.rv-summary .rating { justify-content: center; margin: 8px 0; }
.rv-summary .btn { margin-top: 14px; }
.review-form { margin-top: 18px; text-align: start; display: grid; gap: 12px; padding: 18px; background: #FFFFFF; border-radius: var(--radius); }
.review-form h3 { font-size: 16px; }
.review-form p { font-size: 13px; color: var(--muted); }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; border: 0; padding: 0; margin: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { color: var(--star-off); cursor: pointer; }
.star-input label .icon { width: 24px; height: 24px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--gold); }
.review-list { display: grid; gap: 14px; }
.review-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; }
.review-card .rating { margin-bottom: 8px; }
.review-card p { font-size: 14.5px; }
.review-who { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.review-who b { color: var(--store-text); font-weight: 500; }
.review-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }

.recent-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.mini-card { display: grid; gap: 8px; }
.mini-card .book-cover { box-shadow: var(--shadow); }
.mini-card h3 { font-size: 14px; font-weight: 500; line-height: 1.5; }
.mini-card .price-chip { justify-self: start; font-size: 13px; }

/* ---------------------------------------------------------------- المؤلّف */
.author-hero { padding: 64px 0; background: linear-gradient(130deg, var(--store-primary-dark), var(--store-primary) 60%, color-mix(in srgb, var(--store-primary) 60%, var(--store-accent))); color: #FFFFFF; }
.author-hero .container { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: center; }
.author-hero img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 6px solid rgba(255, 255, 255, .3); }
.author-hero .crumbs { justify-content: flex-start; color: #FFFFFF; }
.author-hero h1 { color: #FFFFFF; font-size: 38px; }
.author-hero .a-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 16px; }
.a-stat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 99px; background: rgba(18, 21, 25, .28); font-size: 14px; color: #FFFFFF; }
.author-hero [data-slot="author.bio"] { max-width: 720px; color: #FFFFFF; font-size: 16px; }

/* ---------------------------------------------------------------- السلّة */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; align-items: start; padding-block: 40px 80px; }
.cart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cart-head h1 { font-size: 28px; }
.cart-head p { color: var(--muted); }
.cart-list { display: grid; gap: 14px; }
.cart-item {
	display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto auto; gap: 20px; align-items: center;
	padding: 16px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius);
}
.cart-item .book-cover { width: 92px; }
.cart-item .type-dot { top: 6px; inset-inline-start: 6px; width: 26px; height: 26px; border-width: 1.5px; }
.cart-item .type-dot .icon { width: 13px; height: 13px; }
.ci-info h3 { font-size: 16px; font-weight: 500; }
.ci-info p { color: var(--muted); font-size: 13.5px; }
.ci-info .price-chip { margin-top: 8px; font-size: 13.5px; }
.ci-total { font-weight: 600; min-width: 96px; text-align: end; }
.cart-tools { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 18px; }
.coupon { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.coupon .field { height: 46px; }
.coupon-applied { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 3px 6px 3px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--ink); font-size: 13.5px; }
.coupon-applied button { border: 0; background: none; display: grid; place-items: center; width: 24px; height: 24px; color: var(--ink); }
.coupon-applied .icon { width: 14px; height: 14px; }
.text-btn { border: 0; background: none; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.text-btn:hover { color: var(--primary-ink); }
.summary { position: sticky; top: calc(var(--header-h) + 16px); padding: 24px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.summary h2 { font-size: 19px; margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14.5px; color: var(--muted); }
.sum-row b { color: var(--store-text); font-weight: 500; }
.sum-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 16px; font-size: 17px; color: var(--store-text); font-weight: 600; }
.summary .btn { margin-top: 18px; }
.pay-note { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 12px; color: var(--muted); font-size: 13px; }
.pay-note .icon { width: 16px; height: 16px; }

.ship-goal { margin-bottom: 18px; padding: 14px; border-radius: var(--radius); background: var(--accent-soft); }
.ship-goal p { font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.ship-goal p .icon { width: 18px; height: 18px; }
.ship-track { height: 8px; margin-top: 10px; border-radius: 4px; background: #FFFFFF; overflow: hidden; }
.ship-track > span { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--store-accent); transition: width .5s; }
.ship-goal.is-free .ship-track > span { width: 100%; }
[data-slot="cart.free_shipping_left"][hidden] { display: none !important; }

.empty-cart { text-align: center; padding: 50px 20px; background: #FFFFFF; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-cart .icon { width: 54px; height: 54px; color: var(--store-primary); margin: 0 auto 12px; stroke-width: 1.3; }
.empty-cart h2 { font-size: 21px; margin-bottom: 6px; }
.empty-cart p { color: var(--muted); margin-bottom: 18px; }

/* ---------------------------------------------------------------- 404 */
.nf-hero { padding: 100px 0 110px; background: var(--ink) url("assets/pattern-dark.jpg") center / cover no-repeat; color: #FFFFFF; text-align: center; }
.nf-code { font-size: 140px; font-weight: 600; line-height: 1; color: var(--store-accent); letter-spacing: 4px; }
.nf-hero h1 { color: #FFFFFF; font-size: 30px; margin-top: 10px; }
.nf-hero p { color: var(--on-dark-muted); margin-top: 10px; }
.nf-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------------------------------------------------------------- صفحة المكوّنات */
.kit-intro { padding: 56px 0 30px; background: var(--soft); }
.kit-intro h1 { font-size: 32px; margin: 4px 0 8px; }
.kit-intro p { color: var(--muted); max-width: 720px; }
.eyebrow { display: inline-block; font-size: 13.5px; color: var(--primary-ink); font-weight: 500; }
.kit-block { padding: 46px 0; border-bottom: 1px solid var(--line); }
.kit-block > .container > h2 { font-size: 22px; margin-bottom: 6px; }
.kit-note { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.kit-note code, .kit-note b { font-family: inherit; color: var(--store-text); }
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.kit-row + .kit-row { margin-top: 14px; }
.kit-label { font-size: 14px; color: var(--muted); min-width: 110px; }
.kit-types { display: flex; flex-wrap: wrap; gap: 28px; }
.kit-types figure { margin: 0; display: grid; justify-items: center; gap: 8px; font-size: 14px; }
.kit-types .type-dot { position: static; width: 44px; height: 44px; }
.kit-types .type-dot .icon { width: 20px; height: 20px; }
.kit-dark { padding: 18px; border-radius: var(--radius); background: var(--ink); }
.kit-ship { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.kit-ship > div > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.kit-feat { max-width: 640px; }
.kit-steps { max-width: 980px; }

/* ---------------------------------------------------------------- الحركة */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------- العروض */
@media (max-width: 1300px) {
	.feat-wrap > .car-btn { display: none; }
	.car-nav { display: flex; }
}
@media (max-width: 1280px) {
	.hdr-tools .hdr-search { display: none; }
	.search-toggle { display: inline-grid; }
	.hdr-row > .brand { padding-inline-end: 16px; }
}
@media (max-width: 1100px) {
	.main-nav > ul > li > a, .main-nav > ul > li > button { padding: 0 8px; font-size: 14.5px; }
	.book-grid { --per: 3 !important; }
	.pdp { grid-template-columns: 280px minmax(0, 1fr); }
	.buybox { grid-column: 1 / -1; position: static; }
	.pdp-media { position: sticky; top: calc(var(--header-h) + 16px); }
	.formats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
	.buy-row, .buy-stack { max-width: 520px; }
	.cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.author-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.recent-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.recent-row > :nth-child(n+5) { display: none; }
	.feat-track { grid-auto-columns: 78%; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.rv-arrows { inset-inline: -10px; }
}
@media (max-width: 960px) {
	:root { --header-h: 64px; }
	.menu-toggle { display: inline-grid; }
	.main-nav, .hdr-tools .hdr-search, .hdr-sep, .hide-sm { display: none; }
	.search-toggle { display: inline-grid; }
	.hdr-row > .brand { border: 0; padding: 0; margin-inline-start: 4px; }
	.hdr-tools { gap: 2px; }
	.listing { grid-template-columns: minmax(0, 1fr); }
	.filters-toggle { display: inline-flex; }
	.filters {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 90; width: min(340px, 88vw); overflow-y: auto;
		padding: 18px; background: var(--soft); transform: translateX(100%); visibility: hidden; transition: .3s;
	}
	body.filters-open .filters { transform: none; visibility: visible; }
	body.filters-open .drawer-backdrop { opacity: 1; visibility: visible; }
	.filters-head { display: flex; align-items: center; justify-content: space-between; }
	.cart-layout { grid-template-columns: minmax(0, 1fr); }
	.summary { position: static; }
	.step { gap: 0 60px; }
	.join-grid { gap: 80px; }
}
@media (max-width: 760px) {
	.container { padding-inline: 16px; }
	.section { padding: 60px 0; }
	.section-head { margin-bottom: 28px; }
	.section-title { font-size: 25px; }
	.slide { min-height: 0; display: block; }
	.slide > img { position: relative; height: 200px; object-position: 78% 50%; }
	.slide::after { inset: 0 0 auto; height: 200px; background: linear-gradient(180deg, rgba(18, 21, 25, 0) 55%, rgba(18, 21, 25, .9)); }
	.slide-in { padding-top: 6px; padding-bottom: 130px; }
	.slide-in h1, .slide-in h2 { font-size: 25px; }
	.slide-in br { display: none; }
	.slide-in p { font-size: 15px; }
	.slider-dots { bottom: 116px; }
	.hero + .hero-search-wrap { margin-top: -96px; }
	.hero-search { padding: 16px; }
	.hero-search-row { flex-direction: column; gap: 10px; }
	.hero-search-row select.field { flex: none; }
	.hero-search-row .field { height: 46px; flex: none; }
	.book-grid { --per: 2 !important; gap: 12px; }
	.book-media { padding: 10px 10px 0; }
	.book-media .type-dot { top: 16px; inset-inline-start: 16px; width: 30px; height: 30px; }
	.book-media .type-dot .icon { width: 14px; height: 14px; }
	.book-badges { top: 18px; inset-inline-end: 16px; }
	.stock-band { inset-inline: 10px; font-size: 12px; }
	.cover-tools { inset-inline-end: 16px; bottom: 8px; gap: 6px; }
	.book-card.is-out .cover-tools { bottom: 38px; }
	.cover-btn { width: 32px; height: 32px; }
	.cover-btn .icon { width: 16px; height: 16px; }
	.book-body { padding: 10px 10px 12px; }
	.book-title { font-size: 14.5px; }
	.book-meta { font-size: 12px; }
	.pen-dot { display: none; }
	.book-body > .rating { margin-bottom: 6px; font-size: 12px; }
	.stars .icon { width: 12px; height: 12px; }
	.book-foot { padding-top: 5px; gap: 4px; }
	.price-chip { font-size: 13px; padding: 2px 7px; }
	.price-chip del { font-size: 11.5px; }
	.cart-btn { width: 40px; height: 40px; margin-block: -3px; }
	.feat-track { grid-auto-columns: 92%; gap: 14px; }
	.feat-card { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 18px; }
	.feat-body { padding-top: 0; }
	.feat-body .book-title { font-size: 17px; }
	.book-desc { -webkit-line-clamp: 2; font-size: 13.5px; }
	.feat-body .book-foot .btn { width: 100%; order: 3; min-height: 40px; }
	.ribbon { width: 140px; top: 16px; inset-inline-start: -42px; font-size: 11px; }
	.tabs-box { padding: 12px; gap: 6px; }
	.tab { font-size: 13.5px; padding: 4px 11px; }
	.trust-bar { padding: 18px 0 20px; }
	.trust-grid { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
	.trust-grid::-webkit-scrollbar { display: none; }
	.trust-item, .trust-item:first-child { flex: 0 0 74%; scroll-snap-align: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); grid-template-columns: 40px minmax(0, 1fr); gap: 0 10px; }
	.trust-item .ic { width: 40px; height: 40px; }
	.trust-item h3 { font-size: 14.5px; }
	.trust-item p { font-size: 12.5px; }
	.cats-band { padding: 60px 0; }
	.cat-grid { gap: 8px; }
	.cat-icon { width: 70px; height: 70px; }
	.cat-tile h3 { font-size: 15px; }
	.steps::before { inset-inline-start: 23px; bottom: 48px; }
	.steps { gap: 0; }
	.steps::after { justify-self: start; }
	.step { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 42px; padding-bottom: 14px; padding-inline-start: 56px; }
	.step::before { inset-inline-start: 0; transform: none; }
	.step:nth-child(even) .step-text { order: 0; }
	.step:nth-child(even) .step-art { order: 1; }
	.step-art { display: none; }
	.reviews-band { padding-top: 60px; }
	.rv-text { font-size: 16px; }
	.rv-arrows { display: none; }
	.rv-avatars { gap: 8px; }
	.rv-avatars button { width: 52px; height: 52px; font-size: 18px; border-width: 3px; }
	.reviews-band + .section { padding-top: 90px; }
	.author-grid { gap: 18px 10px; }
	.author-card img { width: 92px; height: 92px; }
	.author-card h3 { font-size: 14px; }
	.join-grid { grid-template-columns: minmax(0, 1fr); gap: 90px; }
	.join-grid::after { top: 50%; inset-inline-start: 50%; }
	.join-card h3 { font-size: 19px; }
	.newsletter { padding: 60px 0; }
	.nl-box { flex-direction: column; gap: 10px; }
	.nl-box .field, .nl-box .btn { border-radius: var(--radius); }
	.footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 50px 0 40px; }
	.page-hero { padding: 40px 0 44px; }
	.page-hero h1 { font-size: 27px; }
	.list-bar { padding: 12px; }
	.pdp { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 22px 50px; }
	.pdp-media { grid-row: auto; position: static; max-width: 340px; width: 100%; margin-inline: auto; }
	.buybox { grid-column: auto; }
	.pdp-info h1 { font-size: 25px; }
	.spec-tiles { grid-template-columns: minmax(0, 1fr); }
	.pdp-panel { padding: 18px; }
	.spec-table th { width: 120px; }
	.rv-layout { grid-template-columns: minmax(0, 1fr); }
	.recent-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
	.recent-row > :nth-child(n+4) { display: none; }
	.author-hero { padding: 44px 0; }
	.author-hero .container { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 20px; }
	.author-hero img { width: 150px; height: 150px; }
	.author-hero .crumbs, .author-hero .a-stats { justify-content: center; }
	.author-hero h1 { font-size: 28px; }
	.cart-item { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px; }
	.cart-item .book-cover { width: 70px; }
	.cart-item > .book-cover { grid-row: span 2; }
	.cart-item .qty { grid-column: 2; justify-self: start; height: 40px; }
	.cart-item .ci-total { grid-column: 3; grid-row: 2; min-width: 0; }
	.cart-item [data-action="remove-from-cart"] { grid-column: 3; grid-row: 1; align-self: start; }
	.coupon { max-width: none; flex-basis: 100%; }
	.nf-code { font-size: 96px; }
	.nf-hero { padding: 70px 0 80px; }
	.kit-ship { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
	.brand-name { font-size: 18px; }
	.brand img { width: 34px; height: 34px; }
	.hdr-tools .icon-btn { width: 36px; }
	.cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.author-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- استمع في طريقك (قائمةٌ مدمجة) */
.audio-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; }
.audio-item {
	display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: center; min-width: 0;
	padding: 12px; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s;
}
.audio-item:hover { border-color: color-mix(in srgb, var(--type-audio) 45%, #FFFFFF); box-shadow: var(--shadow); }
.audio-cover { position: relative; }
.audio-cover .book-cover { box-shadow: 0 8px 16px -8px rgba(18, 21, 40, .45); }
.audio-cover .type-dot { top: -6px; inset-inline-start: -6px; width: 26px; height: 26px; border-width: 2px; }
.audio-cover .type-dot .icon { width: 13px; height: 13px; }
.audio-body { min-width: 0; display: grid; gap: 2px; }
.audio-body .book-title { font-size: 15.5px; margin: 0; }
.audio-body .book-meta { margin: 0; }
.audio-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; font-size: 12.5px; color: var(--muted); }
.audio-meta .icon { width: 14px; height: 14px; color: var(--type-audio); }
.audio-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.audio-foot .rating { font-size: 12px; }
.audio-foot .stars .icon { width: 12px; height: 12px; }
.audio-foot .price-chip { margin-inline-start: auto; font-size: 13.5px; }
.audio-foot .cart-btn { margin-inline-start: 0; }

/* ---------------------------------------------------------------- عرضٌ لفترةٍ محدودة (عدّادٌ واحد للقسم) */
.deal-section { background: var(--panel); }
.deal-box {
	display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 0; overflow: hidden;
	background: #FFFFFF; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.deal-head {
	position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 40px 34px;
	background: var(--ink) url("assets/pattern-dark.jpg") center / cover no-repeat; color: #FFFFFF;
}
.deal-head .section-title { color: #FFFFFF; font-size: 30px; }
.deal-head .section-sub { color: var(--on-dark-muted); margin-top: 6px; }
.deal-kicker { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-bottom: 10px; padding: 3px 12px; border-radius: 99px; background: var(--store-accent); color: var(--ink); font-size: 13px; font-weight: 500; }
.deal-kicker .icon { width: 15px; height: 15px; }
.countdown { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.cd-label { flex-basis: 100%; font-size: 13.5px; color: var(--on-dark-muted); }
.cd-unit { display: grid; justify-items: center; min-width: 58px; padding: 8px 4px 6px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); }
.cd-unit b { font-size: 24px; font-weight: 600; line-height: 1.1; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 12px; color: var(--store-accent); }
.countdown[hidden] { display: none !important; }
.deal-items { min-width: 0; }
.deal-book { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px; align-items: center; padding: 34px 40px; }
.deal-media { position: relative; }
.deal-media .book-cover { box-shadow: 0 20px 36px -16px rgba(18, 21, 40, .55); }
.deal-media .type-dot { top: 10px; inset-inline-start: 10px; }
.deal-media .book-badges { top: 12px; inset-inline-end: 10px; }
.deal-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.deal-body .book-title { font-size: 26px; margin: 0; }
.deal-body .rating { margin: 2px 0 6px; }
.deal-desc { display: grid; gap: 8px; -webkit-line-clamp: unset; overflow: visible; }
.deal-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.deal-price { display: inline-flex; align-items: baseline; gap: 10px; margin-inline-end: auto; }
.deal-price [data-slot="book.price"] { font-size: 28px; font-weight: 600; color: var(--primary-ink); }
.deal-price del { color: var(--muted); font-size: 15px; }
.deal-buy .icon-btn.boxed { width: 46px; height: 46px; }

/* ---------------------------------------------------------------- المدوّنة */
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { display: flex; flex-direction: column; min-width: 0; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s, transform .25s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-media img { transform: scale(1.03); }
.post-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 18px 20px 20px; }
.post-date { font-size: 13px; color: var(--muted); }
.post-title { font-size: 17.5px; line-height: 1.5; }
.post-title a:hover { color: var(--primary-ink); }
.post-excerpt { color: var(--muted); font-size: 14.5px; }
.post-body .link-arrow { margin-top: auto; padding-top: 6px; font-size: 14.5px; }
.posts-grid.is-blog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.posts-grid.is-blog > :first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.posts-grid.is-blog > :first-child .post-media { aspect-ratio: auto; min-height: 100%; }
.posts-grid.is-blog > :first-child .post-body { justify-content: center; padding: 34px 36px; }
.posts-grid.is-blog > :first-child .post-title { font-size: 25px; }
.posts-grid.is-blog > :first-child .post-body .link-arrow { margin-top: 10px; }

.article { max-width: 800px; padding-block: 44px 64px; }
.article-head { margin-bottom: 22px; }
.article-head h1 { font-size: 34px; line-height: 1.4; margin-top: 6px; }
.article-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 28px; }
.article-body { display: grid; gap: 16px; font-size: 16.5px; line-height: 1.95; }
.article-body h2 { font-size: 22px; margin-top: 10px; }
.article-body blockquote { margin: 6px 0; padding: 18px 22px; border-inline-start: 4px solid var(--store-accent); background: var(--accent-soft); border-radius: var(--radius); font-size: 17.5px; color: var(--ink); }
.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- صفحة الكتاب: المعرض والمواصفات والتوصيل */
.pdp-thumbs { display: flex; gap: 10px; margin-top: 14px; }
.pdp-thumbs button { width: 58px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; }
.pdp-thumbs button[aria-current="true"] { border-color: var(--store-primary); box-shadow: inset 0 0 0 1px var(--store-primary); }
.pdp-thumbs img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; }
.pdp-thumbs:not(:has([data-slot="book.cover_back"])) { display: none; }
.spec-tiles.six { gap: 10px; }
.spec-tiles.six .spec-tile { padding: 12px; gap: 10px; }
.spec-tiles.six .spec-tile .ic { width: 36px; height: 36px; }
.spec-tiles.six .spec-tile b { font-size: 14px; }
.pdp-assure { display: grid; gap: 8px; margin-top: 14px; padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--store-primary) 35%, #FFFFFF); border-radius: var(--radius); background: var(--primary-soft); }
.pdp-assure div { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--store-text); }
.pdp-assure .icon { width: 20px; height: 20px; color: var(--primary-ink); }

/* ---------------------------------------------------------------- التصنيف: التصفيات المختارة وطريقة العرض */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -10px 0 22px; }
.active-filters > span { font-size: 13.5px; color: var(--muted); }
.af-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 12px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-ink); font-size: 13.5px; border: 0; }
.af-chip .icon { width: 14px; height: 14px; }
.af-clear { border: 0; background: none; color: var(--muted); font-size: 13.5px; text-decoration: underline; padding: 3px 6px; }
.view-switch { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--radius); background: var(--soft); }
.view-switch button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); }
.view-switch button[aria-pressed="true"] { background: #FFFFFF; color: var(--primary-ink); box-shadow: var(--shadow-sm); }
.view-switch .icon { width: 18px; height: 18px; }
.list-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.book-grid.is-list { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
.book-grid.is-list .book-card { flex-direction: row; align-items: stretch; }
.book-grid.is-list .book-media { flex: 0 0 150px; padding: 14px 0 14px 0; padding-inline-start: 14px; }
.book-grid.is-list .book-media .type-dot { top: 20px; inset-inline-start: 20px; }
.book-grid.is-list .book-badges { top: 22px; inset-inline-end: 6px; }
.book-grid.is-list .stock-band { inset-inline: 14px 0; bottom: 14px; }
.book-grid.is-list .cover-tools { inset-inline-end: 6px; bottom: 22px; }
.book-grid.is-list .book-body { padding: 18px 22px; justify-content: center; }
.book-grid.is-list .book-title { font-size: 18px; }
.book-grid.is-list .book-foot { margin-top: 12px; max-width: 360px; }

/* ---------------------------------------------------------------- صفحة المؤلّف: أعماله صفٌّ يُمرَّر */
.works-wrap { position: relative; }
.works-track {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 72px) / 4); gap: 24px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px;
}
.works-track::-webkit-scrollbar { display: none; }
.works-track > * { scroll-snap-align: start; }
.works-wrap .car-nav { display: flex; justify-content: flex-start; }
.works-head-nav { display: flex; gap: 10px; }
.works-head-nav .car-btn { width: 42px; height: 42px; }

@media (max-width: 1100px) {
	.audio-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.deal-box { grid-template-columns: minmax(0, 1fr); }
	.deal-head { padding: 28px 30px; }
	.deal-head .countdown { margin-top: 14px; }
	.cd-label { flex-basis: auto; margin-inline-end: 6px; }
	.posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.posts-grid > :nth-child(3):last-child { display: none; }
	.posts-grid.is-blog > :nth-child(3):last-child { display: flex; }
	.works-track { grid-auto-columns: calc((100% - 48px) / 3); }
	.trust-item { padding-inline: 14px; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 10px; }
	.trust-item .ic { width: 40px; height: 40px; }
	.trust-item p { display: none; }
}
@media (min-width: 761px) and (max-width: 1100px) {
	/* ثلاثة كتبٍ في الصفّ: لا صفّ ناقص في آخر الشبكة */
	.book-grid:not(.in-listing) > :nth-child(n+7), .book-grid:not(.in-listing) > :nth-child(4):last-child { display: none; }
}
@media (max-width: 760px) {
	body[data-books-per-row] .book-grid:not(.in-listing) > .book-card { display: flex; }
	.audio-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.audio-list > :nth-child(n+5) { display: none; }
	.audio-item { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 10px; }
	.deal-head { padding: 24px 20px; }
	.deal-head .section-title { font-size: 24px; }
	.cd-label { flex-basis: 100%; }
	.cd-unit { min-width: 0; flex: 1; }
	.cd-unit b { font-size: 20px; }
	.deal-book { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr auto auto; gap: 0 16px; padding: 20px; align-items: start; }
	.deal-media { grid-row: 1 / span 4; }
	.deal-body { display: contents; }
	.deal-body > * { grid-column: 2; }
	.deal-body .book-title { font-size: 20px; }
	.deal-body .deal-desc, .deal-body .deal-buy { grid-column: 1 / -1; }
	.deal-desc { margin-top: 12px; }
	.deal-desc p + p { display: none; }
	.deal-buy { margin-top: 10px; padding-top: 12px; gap: 8px; }
	.deal-price { flex-basis: 100%; }
	.deal-price [data-slot="book.price"] { font-size: 23px; }
	.deal-buy .btn { flex: 1; }
	.posts-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.posts-grid > :nth-child(3):last-child { display: flex; }
	.posts-grid:not(.is-blog) .post-card { flex-direction: row; align-items: center; }
	.posts-grid:not(.is-blog) .post-media { flex: 0 0 116px; aspect-ratio: 1 / 1; }
	.posts-grid:not(.is-blog) .post-body { padding: 10px 14px; gap: 2px; }
	.posts-grid:not(.is-blog) .post-excerpt, .posts-grid:not(.is-blog) .post-body .link-arrow { display: none; }
	.posts-grid:not(.is-blog) .post-title { font-size: 15px; }
	.posts-grid.is-blog > :first-child { display: flex; }
	.posts-grid.is-blog > :first-child .post-media { aspect-ratio: 16 / 9; }
	.posts-grid.is-blog > :first-child .post-body { padding: 18px 20px 20px; }
	.posts-grid.is-blog > :first-child .post-title { font-size: 19px; }
	.post-title { font-size: 16.5px; }
	.article { padding-block: 26px 44px; }
	.article-head h1 { font-size: 25px; }
	.article-body { font-size: 15.5px; }
	.trust-item p { display: block; }
	.works-track { grid-auto-columns: calc((100% - 12px) / 2.15); gap: 12px; }
	.spec-tiles.six { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
	.spec-tiles.six .spec-tile { padding: 10px; gap: 8px; }
	.spec-tiles.six .spec-tile .ic { width: 34px; height: 34px; }
	.pdp-assure div { font-size: 13.5px; }
	.pdp-thumbs { justify-content: center; }
	.list-tools { width: 100%; justify-content: space-between; }
	.book-grid.is-list .book-media { flex-basis: 112px; padding: 10px 0; padding-inline-start: 10px; }
	.book-grid.is-list .book-body { padding: 12px 14px; }
	.book-grid.is-list .book-title { font-size: 15.5px; }
}

/* سطر المؤلّف والتصنيف سطرٌ واحد، ويُختصر اسم المؤلّف الطويل */
.book-meta { flex-wrap: nowrap; white-space: nowrap; min-width: 0; }
.book-meta [data-slot="book.author"] { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.book-meta .in, .book-meta [data-slot="book.category"] { flex: none; }

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