/* ==========================================================================
   نَدوة — قالب متجر ومقهى كتب أدبيّ لمنصّة «ناشر»
   مبنيّ ومطابق بالكامل لنموذج Ambaz Coffee (مرجع #96)
   ========================================================================== */

:root {
	/* ألوان Ambaz Coffee الأصلية */
	--store-bg: #F9F6F2;            /* خلفية الورق الكريمي الدافئ */
	--store-text: #3A3A3B;          /* لون النص والحبر الإسبريسو */
	--store-primary: #78350F;       /* البن المحمص المتوازن */
	--store-primary-dark: #3A2312;  /* الإسبريسو الداكن */
	--store-accent: #DB9457;        /* لون أزرار أمباز الذهبي الكراميلي (RGB: 219, 148, 87) */
	--store-accent-dark: #B45309;   /* عسل كراميل غني */
	--store-accent-light: #F8E7D6;  /* مسحة اللاتيه الخفيفة */
	--ink-on-accent: #FFFFFF;

	/* محايدات متناسقة */
	--sand: #F5EFEB;
	--beige: #EFE4D7;
	--line: rgba(58, 58, 59, 0.09);
	--line-strong: rgba(58, 58, 59, 0.16);
	--soft: #FFFFFF;
	--muted: #786558;
	--gold: #DB9457;
	--new-bg: #F8E7D6;
	--new-ink: #78350F;

	--font-head: "Tajawal", Tahoma, sans-serif;
	--font-body: "Tajawal", Tahoma, sans-serif;
	--r: 12px;
	--r-lg: 16px;
	--cols: 5;
	--gutter: 24px;
	--shadow: 0 10px 25px -12px rgba(58, 35, 18, 0.15);
	--shadow-hover: 0 16px 36px -12px rgba(58, 35, 18, 0.22);

	--tr-fast: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
	--tr-base: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	--tr-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-corners="sharp"] { --r: 0px; --r-lg: 0px; }
[data-books-per-row="4"] { --cols: 4; }
[data-books-per-row="5"] { --cols: 5; }
[data-books-per-row="6"] { --cols: 6; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--store-bg);
	color: var(--store-text);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.65;
	overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--tr-fast); }
a:hover { color: var(--store-accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--store-primary-dark); margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--store-accent); outline-offset: 2px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--store-primary-dark); color: #fff; padding: 8px 14px; border-radius: var(--r); }
.skip-link:focus { top: 12px; color: #fff; }
.container { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
[hidden] { display: none !important; }

/* قاعدة إلزامية للشحن المجاني */
[data-slot="cart.free_shipping_left"][hidden] { display: none !important; }

/* ---------- الأزرار ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 24px; border-radius: var(--r); border: 1px solid transparent;
	font-family: var(--font-head); font-weight: 600; font-size: 14.5px; white-space: nowrap;
	transition: all var(--tr-fast);
}
.btn .icon { width: 18px; height: 18px; }
.btn-accent { background: var(--store-accent); color: var(--ink-on-accent); }
.btn-accent:hover { background: var(--store-accent-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 18px -4px rgba(219, 148, 87, .4); }
.btn-primary { background: var(--store-primary-dark); color: #fff; }
.btn-primary:hover { background: var(--store-primary); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 18px -4px rgba(58, 35, 18, .35); }
.btn-line { background: #fff; color: var(--store-primary-dark); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--store-accent); color: var(--store-accent); }
.btn-soft { background: var(--sand); color: var(--store-primary-dark); }
.btn-soft:hover { background: var(--beige); }
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 16px; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13px; }
.btn-xs { min-height: 30px; padding: 0 12px; font-size: 12px; font-weight: 500; }
.btn-block { width: 100%; }
.btn:active, .round-btn:active { transform: scale(0.97); }

.round-btn {
	width: 42px; height: 42px; border-radius: 50%; border: 0; display: inline-grid; place-items: center;
	background: #fff; color: var(--store-primary-dark); box-shadow: 0 4px 14px -4px rgba(58, 35, 18, .2);
	transition: all var(--tr-fast);
}
.round-btn:hover { background: var(--store-accent); color: #fff; transform: scale(1.08); }
.round-btn[aria-pressed="true"] .icon { fill: var(--store-accent); stroke: var(--store-accent); }
.round-btn-line { box-shadow: none; border: 1px solid var(--line-strong); width: 44px; height: 44px; }
.arrow-btn {
	width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff;
	display: inline-grid; place-items: center; color: var(--store-primary);
	transition: all var(--tr-fast);
}
.arrow-btn:hover:not(:disabled) { border-color: var(--store-accent); color: var(--store-accent); transform: scale(1.06); }
.arrow-btn:disabled { opacity: .45; cursor: default; }

/* ==========================================================================
   الهيدر وشريط الإعلان (Ambaz Header Architecture)
   ========================================================================== */

/* شريط الإعلان العلوي (3 أعمدة كما في أمباز بالضبط) */
.announcement-bar {
	background: #fff;
	border-bottom: 1px solid var(--line);
	font-size: 13px;
	color: var(--muted);
	padding-block: 8px;
}
.announcement-bar-inner {
	display: grid;
	grid-template-columns: 25% 50% 25%;
	align-items: center;
}
@media (max-width: 991px) {
	.announcement-bar-inner { grid-template-columns: 1fr; gap: 6px; text-align: center; }
	.announcement-social, .announcement-extra { display: none !important; }
}
.announcement-social {
	display: flex;
	align-items: center;
	gap: 12px;
}
.announcement-social a {
	color: var(--muted);
	display: inline-grid;
	place-items: center;
}
.announcement-social a:hover {
	color: var(--store-accent);
}
.announcement-center {
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.announcement-msg {
	font-weight: 600;
	color: var(--store-primary-dark);
}
.announcement-extra {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
}
.announcement-extra a {
	color: var(--muted);
}
.announcement-extra a:hover {
	color: var(--store-accent);
}

/* الهيدر الرئيسي (Logo Left / Menu Center / Actions Right) */
.site-header {
	background: #fff;
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 90;
	transition: box-shadow var(--tr-fast);
}
.header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 80px;
	gap: 20px;
}
.header-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: none;
}
.header-brand img {
	height: 42px;
	width: auto;
}
.header-brand-title {
	font-size: 22px;
	font-weight: 800;
	color: var(--store-primary-dark);
	letter-spacing: -0.02em;
}

/* القائمة الأفقية في المنتصف */
.header-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
}
@media (max-width: 991px) {
	.header-nav { display: none; }
}
.header-nav-list {
	display: flex;
	align-items: center;
	gap: 28px;
}
.header-nav-list > li > a, .header-nav-list > li > button {
	font-size: 15px;
	font-weight: 600;
	color: var(--store-text);
	padding: 10px 4px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	position: relative;
	transition: color var(--tr-fast);
}
.header-nav-list > li > a:hover, .header-nav-list > li > button:hover {
	color: var(--store-accent);
}
.header-nav-list > li > a::after {
	content: "";
	position: absolute;
	bottom: 0;
	inset-inline: 0;
	height: 2px;
	background: var(--store-accent);
	transform: scaleX(0);
	transition: transform var(--tr-fast);
}
.header-nav-list > li > a:hover::after {
	transform: scaleX(1);
}

/* القوائم المنسدلة */
.has-drop { position: relative; }
.has-drop .drop {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	min-width: 220px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r);
	box-shadow: 0 14px 34px -10px rgba(58, 35, 18, 0.15);
	padding: 10px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all var(--tr-fast);
	z-index: 100;
}
.has-drop.open .drop, .has-drop:hover .drop {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.drop li a {
	display: block;
	padding: 8px 14px;
	border-radius: 6px;
	font-size: 14px;
	color: var(--store-text);
	transition: all var(--tr-fast);
}
.drop li a:hover {
	background: var(--sand);
	color: var(--store-primary-dark);
}

/* أيقونات الإجراءات في الرأس */
.header-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: none;
}
.header-action-btn {
	width: 42px;
	height: 42px;
	display: inline-grid;
	place-items: center;
	border-radius: 50%;
	color: var(--store-primary-dark);
	position: relative;
	transition: all var(--tr-fast);
}
.header-action-btn:hover {
	background: var(--sand);
	color: var(--store-accent);
}
.header-action-btn .badge-count {
	position: absolute;
	top: 2px;
	inset-inline-end: 2px;
	min-width: 18px;
	height: 18px;
	border-radius: 999px;
	background: var(--store-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: grid;
	place-items: center;
	padding-inline: 4px;
}
.mobile-menu-toggle {
	display: none;
}
@media (max-width: 991px) {
	.mobile-menu-toggle { display: inline-grid; }
}

/* شريط الشحن المجاني الأنيق */
.free-shipping-bar {
	background: var(--sand);
	border-bottom: 1px solid var(--line);
	padding-block: 8px;
	font-size: 13.5px;
	text-align: center;
}
.ship-inner {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}
.ship-track {
	width: 140px;
	height: 6px;
	background: var(--line-strong);
	border-radius: 999px;
	overflow: hidden;
	display: inline-block;
}
.ship-fill {
	height: 100%;
	background: var(--store-accent);
	display: block;
	border-radius: 999px;
}

/* ==========================================================================
   بطاقة المنتج (Ambaz Product Card Style 2) - تمركز كامل وأناقة
   ========================================================================== */

.book-grid {
	display: grid;
	grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
	gap: 32px 24px;
}
@media (max-width: 1199px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; } }

/* بطاقة المنتج المطابقة لأمباز: .product__card */
.bcard, .product__card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	transition: transform var(--tr-base);
}

/* الحاوية المصورة للغلاف: .product__card__thumbnail */
.bcard-media, .product__card__thumbnail {
	position: relative;
	border-radius: var(--r);
	overflow: hidden;
	background: var(--beige);
	box-shadow: 0 4px 14px -6px rgba(58, 35, 18, 0.12);
	transition: box-shadow var(--tr-base);
}
.bcard:hover .bcard-media, .product__card:hover .product__card__thumbnail {
	box-shadow: var(--shadow-hover);
}
.bcard-cover img, .product__card--link img {
	width: 100%;
	aspect-ratio: 1 / 1.4;
	object-fit: cover;
	transition: transform var(--tr-smooth);
}
.bcard:hover .bcard-cover img, .product__card:hover .product__card--link img {
	transform: scale(1.05);
}

/* الشارات الطافية على الصورة: .product__card__badges */
.product-badges {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	z-index: 4;
	display: flex;
	flex-direction: column;
	gap: 6px;
	pointer-events: none;
}
.badge {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	font-family: var(--font-head);
	white-space: nowrap;
}
.badge-sale { background: var(--store-accent); color: #fff; }
.badge-new { background: var(--new-bg); color: var(--new-ink); }
.badge-best { background: var(--store-primary-dark); color: #fff; }
.stock-flag {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 6px;
	text-align: center;
	background: rgba(58, 35, 18, 0.9);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	z-index: 5;
}

/* دوائر نوع الإصدار */
.type-dot {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: inline-grid;
	place-items: center;
	color: #fff;
	z-index: 4;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.type-dot .icon { width: 16px; height: 16px; }
.type-dot-sm { width: 22px; height: 22px; }
.type-dot-sm .icon { width: 12px; height: 12px; }
.type-dot[data-type="print"] { background: var(--store-primary); }
.type-dot[data-type="ebook"] { background: var(--store-accent); }
.type-dot[data-type="audio"] { background: var(--store-primary-dark); }
.type-dot[data-type="educational"] { background: var(--store-accent-dark); }

/* أزرار الإجراءات الطافية عند التحويم على الغلاف (Ambaz Action Buttons) */
.product-card-actions {
	position: absolute;
	bottom: 14px;
	inset-inline: 14px;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 5;
	opacity: 0;
	transform: translateY(10px);
	transition: all var(--tr-fast);
}
.bcard:hover .product-card-actions, .product__card:hover .product-card-actions {
	opacity: 1;
	transform: translateY(0);
}
@media (hover: none) {
	.product-card-actions { opacity: 1; transform: none; }
}

/* محتوى البطاقة في المنتصف بالكامل (Ambaz Style 2 Centered Content) */
.product-card-content, .bcard-content {
	padding-top: 14px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}
.bcard-author {
	font-size: 13px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
.bcard-title {
	font-size: 15.5px;
	font-weight: 700;
	color: var(--store-primary-dark);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-block: 2px;
}
.bcard-title a:hover {
	color: var(--store-accent);
}
.rate {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
}
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars .icon { width: 13px; height: 13px; fill: var(--gold); stroke: var(--gold); }
.stars .icon.off { fill: #E0D5C9; stroke: #E0D5C9; }
.rate .count { color: var(--muted); font-size: 12px; }

/* السعر في المنتصف */
.price {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
	margin-top: 4px;
}
.price .now {
	font-size: 17px;
	font-weight: 800;
	color: var(--store-primary-dark);
}
.price del {
	font-size: 13.5px;
	color: var(--muted);
}
.price-lg .now { font-size: 20px; }
.price-xl .now { font-size: 26px; }

/* ==========================================================================
   المكوّن الاستثنائي: قائمة القراءة (Ambaz Menu Board)
   ========================================================================== */

.menu-board-section {
	padding-block: 60px;
}
.menu-board-frame {
	background: #fff;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-lg);
	padding: 40px;
	box-shadow: var(--shadow);
	position: relative;
}
@media (max-width: 767px) {
	.menu-board-frame { padding: 24px 16px; }
}
.menu-board-header {
	text-align: center;
	margin-bottom: 36px;
}
.menu-board-subtitle {
	font-size: 14px;
	color: var(--muted);
	margin-top: 6px;
}
.menu-board-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 36px 48px;
}
@media (max-width: 991px) {
	.menu-board-grid { grid-template-columns: 1fr; }
}
.menu-board-category-header {
	background: var(--sand);
	padding: 12px 18px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}
.menu-board-category-header h3 {
	font-size: 18px;
	color: var(--store-primary-dark);
	margin: 0;
}
.menu-board-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-block: 14px;
	border-bottom: 1px dashed var(--line-strong);
	transition: all var(--tr-fast);
}
.menu-board-item:last-child {
	border-bottom: 0;
}
.menu-board-item:hover {
	transform: translateX(-4px);
}
.menu-board-thumb {
	width: 68px;
	height: 68px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
	box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
.menu-board-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.menu-board-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--store-primary-dark);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.menu-board-title:hover {
	color: var(--store-accent);
}
.menu-board-author {
	font-size: 13px;
	color: var(--muted);
}
.menu-board-leader {
	flex: 1 1 20px;
	height: 1px;
	border-bottom: 2px dotted var(--line-strong);
	margin-inline: 8px;
	opacity: .7;
}
.menu-board-price {
	flex-shrink: 0;
	white-space: nowrap;
}
.menu-board-price .now {
	font-size: 17px;
	font-weight: 800;
	color: var(--store-primary-dark);
}
.menu-board-actions {
	flex-shrink: 0;
}

/* ==========================================================================
   الواجهة والبانرات (Ambaz Hero & Banners)
   ========================================================================== */

/* السلايدر الترحيبي الكبير */
.hero-slider-section {
	position: relative;
	background: var(--sand);
	border-radius: var(--r-lg);
	overflow: hidden;
	margin-top: 24px;
}
.hero-slide {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	padding: 50px 60px;
	min-height: 480px;
	gap: 30px;
}
@media (max-width: 991px) {
	.hero-slide { grid-template-columns: 1fr; text-align: center; padding: 40px 24px; }
	.hero-slide img { margin-inline: auto; max-height: 320px; }
}
.hero-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: flex-start;
}
@media (max-width: 991px) {
	.hero-content { align-items: center; }
}
.hero-subtitle {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: #fff;
	color: var(--store-accent-dark);
	font-weight: 700;
	font-size: 13px;
}
.hero-title {
	font-size: 42px;
	font-weight: 800;
	color: var(--store-primary-dark);
	line-height: 1.25;
}
@media (max-width: 767px) { .hero-title { font-size: 28px; } }
.hero-desc {
	font-size: 16px;
	color: var(--muted);
	max-width: 48ch;
}
.slider-dots {
	position: absolute;
	bottom: 20px;
	inset-inline: 0;
	display: flex;
	justify-content: center;
	gap: 8px;
}
.dot {
	width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); transition: all var(--tr-fast); border: 0;
}
.dot.on {
	width: 28px; border-radius: 999px; background: var(--store-accent);
}

/* بطاقتا الترويج المزدوجتان (Ambaz Banner List) */
.promo-pair-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-block: 48px;
}
@media (max-width: 767px) { .promo-pair-grid { grid-template-columns: 1fr; } }
.promo-card {
	position: relative;
	border-radius: var(--r);
	overflow: hidden;
	min-height: 240px;
	display: flex;
	align-items: center;
	background: #000;
}
.promo-card img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.85;
	transition: transform var(--tr-smooth);
}
.promo-card:hover img {
	transform: scale(1.05);
}
.promo-content {
	position: relative;
	z-index: 2;
	padding: 36px;
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-start;
}
.promo-title {
	font-size: 24px;
	color: #fff;
}
.promo-text {
	font-size: 14px;
	opacity: 0.9;
}
.promo-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	font-weight: 700;
	margin-top: 6px;
	border-bottom: 2px solid var(--store-accent);
	padding-bottom: 2px;
}

/* شريط النص المتحرك (Ambaz Scrolling Text Marquee) */
.marquee-bar {
	background: var(--store-primary-dark);
	color: #fff;
	padding-block: 16px;
	overflow: hidden;
	white-space: nowrap;
	margin-block: 40px;
}
.marquee-inner {
	display: inline-flex;
	gap: 40px;
	animation: marquee 25s linear infinite;
	font-size: 17px;
	font-weight: 700;
}
@keyframes marquee {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

/* بطاقة الكاتب / الراوي */
.author-row {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 20px;
}
@media (max-width: 991px) { .author-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575px) { .author-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.author-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r);
	padding: 24px 16px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	transition: all var(--tr-fast);
}
.author-card:hover {
	transform: translateY(-4px);
	border-color: var(--store-accent);
	box-shadow: var(--shadow-hover);
}
.author-card img {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--sand);
	transition: transform var(--tr-smooth);
}
.author-card:hover img {
	transform: scale(1.08);
}

/* تبويبات الأقسام */
.tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 28px; flex-wrap: wrap; }
.tab {
	min-height: 42px; padding: 0 22px; border-radius: 999px;
	border: 1px solid var(--line-strong); background: #fff;
	color: var(--store-text); font-weight: 600; font-size: 14px;
	transition: all var(--tr-fast);
}
.tab:hover { border-color: var(--store-accent); color: var(--store-accent); }
.tab[aria-selected="true"] { background: var(--store-primary-dark); color: #fff; border-color: var(--store-primary-dark); box-shadow: 0 4px 12px -4px rgba(58, 35, 18, 0.35); }

/* البطاقة الأفقية والمصغرة */
.hcard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 991px) { .hcard-grid { grid-template-columns: 1fr; } }
.hcard {
	display: flex; gap: 16px; padding: 16px;
	background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r);
	position: relative; transition: all var(--tr-fast);
}
.hcard:hover { transform: translateY(-3px); border-color: var(--store-accent); box-shadow: var(--shadow-hover); }
.hcard-cover { width: 90px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
.hcard-cover img { width: 100%; aspect-ratio: 1 / 1.4; object-fit: cover; }
.hcard-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hcard-cart { position: absolute; bottom: 14px; inset-inline-end: 14px; }

.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 991px) { .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .mini-grid { grid-template-columns: 1fr; } }
.mcard { display: flex; gap: 14px; padding: 12px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); transition: all var(--tr-fast); }
.mcard:hover { transform: translateX(-3px); border-color: var(--store-accent); }
.mcard-cover { width: 64px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }
.mcard-cover img { width: 100%; aspect-ratio: 1 / 1.4; object-fit: cover; }

/* بطاقة الصفقة الكبيرة */
.deal-card {
	display: flex; gap: 28px; padding: 32px;
	background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-lg);
	position: relative; box-shadow: var(--shadow);
}
@media (max-width: 767px) { .deal-card { flex-direction: column; align-items: center; text-align: center; } }
.deal-cover { width: 200px; flex-shrink: 0; border-radius: var(--r); overflow: hidden; }
.deal-body { display: flex; flex-direction: column; gap: 8px; justify-content: center; }

/* آراء القرّاء */
.rcard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 820px) { .rcard-grid { grid-template-columns: 1fr; } }
.rcard {
	background: #fff; border: 1px solid var(--line); border-radius: var(--r);
	padding: 24px; display: flex; flex-direction: column; gap: 14px;
	box-shadow: 0 4px 14px -6px rgba(58, 35, 18, 0.08);
}
.rcard-by { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-strong); }

/* تذييل المتجر الشامل (Ambaz Footer) */
.site-footer {
	background: #fff;
	border-top: 1px solid var(--line);
	padding-top: 60px;
	margin-top: 60px;
}
.foot-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
	gap: 36px 24px;
	padding-bottom: 50px;
	border-bottom: 1px solid var(--line);
}
@media (max-width: 991px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-col h2 { font-size: 17px; margin-bottom: 18px; color: var(--store-primary-dark); }
.foot-col p { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.foot-links li a { display: inline-block; padding-block: 5px; font-size: 14px; color: var(--muted); transition: color var(--tr-fast); }
.foot-links li a:hover { color: var(--store-accent); }
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--store-primary-dark); transition: all var(--tr-fast); }
.social a:hover { background: var(--store-accent); color: #fff; border-color: var(--store-accent); }
.foot-bottom { padding-block: 22px; font-size: 13.5px; color: var(--muted); }
.foot-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
@media (max-width: 767px) { .foot-bottom-row { flex-direction: column; text-align: center; } }

/* صندوق النشرة البريدية */
.newsletter {
	background: var(--sand);
	border-radius: var(--r-lg);
	padding: 48px;
	text-align: center;
	margin-block: 40px;
}
.nl-inner { max-width: 620px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.nl-field { display: flex; gap: 10px; width: 100%; margin-top: 10px; }
.nl-field input { flex: 1; min-height: 48px; border-radius: var(--r); border: 1px solid var(--line-strong); padding-inline: 16px; background: #fff; }
.nl-offer { font-size: 13px; color: var(--muted); }

/* الدرج الجانبي */
.drawer { position: fixed; inset: 0; z-index: 1000; visibility: hidden; pointer-events: none; transition: visibility var(--tr-fast); }
.drawer-panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(340px, 85vw); background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.15); padding: 24px; transform: translateX(100%); transition: transform var(--tr-fast); display: flex; flex-direction: column; gap: 20px; }
[dir="rtl"] .drawer-panel { transform: translateX(-100%); }
body.drawer-open .drawer { visibility: visible; pointer-events: auto; }
body.drawer-open .drawer-panel { transform: translateX(0); }
body.drawer-open::before { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 999; }

/* تفاصيل المنتج PDP */
.pdp-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; padding-top: 36px; }
@media (max-width: 820px) { .pdp-grid { grid-template-columns: 1fr; } }
.pdp-cover { width: 100%; border-radius: var(--r); box-shadow: var(--shadow); }
.pdp-thumbs { display: flex; gap: 12px; margin-top: 14px; }
.pdp-thumbs button { width: 68px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; padding: 0; }
.pdp-thumbs button[aria-pressed="true"] { border-color: var(--store-accent); }
.pdp-info { display: flex; flex-direction: column; gap: 14px; }
.pdp-title { font-size: 32px; font-weight: 800; color: var(--store-primary-dark); }
.pdp-buy { display: flex; gap: 12px; align-items: center; margin-block: 16px; flex-wrap: wrap; }
.qty { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; height: 46px; align-items: center; }
.qty button { width: 38px; height: 100%; font-size: 18px; }
.qty input { width: 44px; text-align: center; border: 0; background: none; font-weight: 700; }
.spec-table { width: 100%; border-collapse: collapse; margin-block: 20px; font-size: 14px; }
.spec-table th, .spec-table td { padding: 12px 14px; border: 1px solid var(--line); text-align: start; }
.spec-table th { background: var(--sand); width: 30%; color: var(--store-primary-dark); }

/* التصنيف والتصفية */
.cat-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; padding-top: 30px; }
@media (max-width: 991px) { .cat-layout { grid-template-columns: 1fr; } }
.filter-box { background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 22px; margin-bottom: 20px; }
.filter-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--store-primary-dark); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 14px; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.page-btn { min-width: 40px; height: 40px; border-radius: var(--r); border: 1px solid var(--line-strong); display: grid; place-items: center; font-weight: 700; background: #fff; }
.page-btn[aria-current="page"] { background: var(--store-primary-dark); color: #fff; border-color: var(--store-primary-dark); }

/* السلة */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 36px; padding-top: 36px; }
@media (max-width: 991px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-summary { background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r); padding: 26px; }

/* المدوّنة والمقالات */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
@media (max-width: 820px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: all var(--tr-fast); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--store-accent); }
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }

/* شريط الثقة */
.trust-bar { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 28px; margin-block: 40px; }
.trust-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 767px) { .trust-list { grid-template-columns: repeat(2, 1fr); } }
.trust-list li { display: flex; align-items: center; gap: 14px; }
.trust-list .icon { width: 32px; height: 32px; color: var(--store-accent); }

/* ترويسة الأقسام */
.sec-head { text-align: center; margin-bottom: 32px; }
.sec-head h2 { font-size: 28px; color: var(--store-primary-dark); margin-bottom: 6px; }
.sec-sub { font-size: 14px; color: var(--muted); }

/* تبويبات صف الكتب */
[data-slot="section.tabs"]:not(:has([data-repeat="tab"] ~ [role="tab"])) { display: none; }

/* قاعدة إلزامية لرأي المشتري في نهاية الملف */
[data-slot="review.text"] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }

/* SPEC.md Appendix 3 toggles */
[data-show-trust-bar="false"] .trust-bar { display: none !important; }
[data-show-newsletter="false"] .newsletter { display: none !important; }
[data-show-reviews="false"] .reviews-sec,
[data-show-reviews="false"] .home-reviews,
[data-show-reviews="false"] .section-reviews { display: none !important; }
