/* ════════════════════════════════════════════════════════════
   AL MAJD — Single Product  (v3.0 — Refined Design)
   Modern Arabic bookstore UI with refined typography & layout
═══════════════════════════════════════════════════════════════ */

:root {
	--w-navy:        #11274a;
	--w-navy-deep:   #0b1c35;
	--w-navy-mid:    #1d3f6e;
	--w-red:         #9d1f2f;
	--w-red-soft:    #fdf0f2;
	--w-teal:        #0ea5a0;
	--w-teal-deep:   #0c8580;
	--w-gold:        #c49a46;
	--w-gold-mid:    #d9b96a;
	--w-gold-soft:   #fdf6e7;
	--w-cream:       #f7f3eb;
	--w-cream-lt:    #fdfaf5;
	--w-cream-mid:   #ede6d8;
	--w-white:       #ffffff;
	--w-ink:         #172033;
	--w-muted:       #52607a;
	--w-light:       #8a94a8;
	--w-border:      #e8e1d5;
	--w-border-soft: #f2ece3;
	--w-shadow-sm:   0 4px 16px rgba(17,39,74,.06);
	--w-shadow:      0 12px 40px rgba(17,39,74,.09);
	--w-shadow-lg:   0 20px 56px rgba(17,39,74,.13);
	--w-radius:      18px;
	--w-radius-sm:   12px;
}

body.single-product {
	background: var(--w-cream-lt);
}

.majd-sp, .majd-sp * { box-sizing: border-box; }

.majd-sp {
	font-family: Cairo, Tajawal, "Noto Kufi Arabic", Arial, sans-serif;
	color: var(--w-ink);
}

.majd-sp a {
	color: var(--w-navy);
	text-decoration: none;
	transition: color .18s, background .18s, border-color .18s, transform .18s;
}

.majd-sp a:hover { color: var(--w-red); }

.majd-sp__container {
	max-width: 1300px;
	margin: 0 auto;
	padding: 28px 20px 80px;
	direction: rtl;
}

/* ─── BREADCRUMBS ─── */
.majd-sp__crumbs {
	font-size: 13px;
	color: var(--w-muted);
	margin-bottom: 18px;
	padding: 10px 16px;
	background: var(--w-white);
	border: 1px solid var(--w-border-soft);
	border-radius: 10px;
	box-shadow: var(--w-shadow-sm);
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.majd-sp__crumbs a { color: var(--w-light); }
.majd-sp__crumbs a:hover { color: var(--w-navy); }
.majd-sp__crumbs .sep { color: var(--w-border); font-size: 11px; }

/* ─── HERO GRID ─── */
.majd-sp__hero {
	display: grid;
	grid-template-columns: 280px minmax(0,1fr) 320px;
	gap: 24px;
	align-items: start;
	background: var(--w-white);
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius);
	padding: 24px;
	box-shadow: var(--w-shadow);
	margin-bottom: 24px;
}

/* ─── COVER ─── */
.majd-sp__cover-shell {
	background: linear-gradient(160deg, #fdfaf5, #f5edd9);
	border: 1px solid var(--w-border-soft);
	border-radius: 14px;
	padding: 20px;
	position: relative;
	text-align: center;
}

.majd-sp__cover-shell::after {
	content: "";
	display: block;
	width: 60%;
	height: 18px;
	margin: 16px auto 0;
	background: radial-gradient(ellipse, rgba(17,39,74,.2), transparent 65%);
	filter: blur(6px);
}

.majd-sp__media .woocommerce-product-gallery {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 !important;
}

.majd-sp__media img.wp-post-image,
.majd-sp__media .woocommerce-product-gallery__image img {
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: 400px;
	margin: 0 auto !important;
	border-radius: 10px;
	box-shadow: 2px 6px 20px rgba(17,39,74,.14), 0 22px 40px rgba(17,39,74,.18);
	display: block;
	object-fit: contain;
	transition: transform .3s, box-shadow .3s;
}
.majd-sp__media img.wp-post-image:hover,
.majd-sp__media .woocommerce-product-gallery__image img:hover {
	transform: translateY(-4px);
	box-shadow: 2px 10px 28px rgba(17,39,74,.16), 0 30px 50px rgba(17,39,74,.22);
}

.majd-sp__media .flex-control-thumbs {
	list-style: none;
	padding: 0;
	margin: 14px 0 0 !important;
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
}
.majd-sp__media .flex-control-thumbs li { width: 48px !important; float: none !important; }
.majd-sp__media .flex-control-thumbs img {
	border-radius: 8px;
	border: 2px solid transparent;
	opacity: .6;
	cursor: pointer;
	transition: opacity .18s, border-color .18s;
}
.majd-sp__media .flex-control-thumbs img.flex-active,
.majd-sp__media .flex-control-thumbs img:hover {
	opacity: 1;
	border-color: var(--w-gold);
}

.majd-sp__media .onsale {
	position: absolute;
	top: 12px; right: 12px;
	z-index: 3;
	background: var(--w-red) !important;
	color: #fff !important;
	border-radius: 999px !important;
	padding: 5px 12px !important;
	font-weight: 800;
	font-size: 12px;
	line-height: 1;
}

/* Trust badges under cover */
.majd-sp__trust { margin-top: 16px; display: grid; gap: 8px; }
.majd-sp__trust-item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: var(--w-cream-lt);
	border: 1px solid var(--w-border-soft);
	border-radius: 10px;
	padding: 10px 12px;
}
.majd-sp__trust-icon {
	width: 28px; height: 28px;
	border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: #e6f7f4;
	color: var(--w-teal-deep);
	font-weight: 800;
	flex: 0 0 28px;
	font-size: 13px;
}
.majd-sp__trust strong { display: block; font-size: 13px; color: var(--w-ink); margin-bottom: 2px; }
.majd-sp__trust small  { display: block; font-size: 11.5px; line-height: 1.5; color: var(--w-light); }

/* ─── MAIN DETAILS ─── */
.majd-sp__main { min-width: 0; padding: 6px 6px; }

.majd-sp__cats {
	display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px;
}
.majd-sp__cats a {
	display: inline-flex; align-items: center;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--w-red-soft);
	color: var(--w-red);
	font-size: 12px;
	font-weight: 800;
	border: 1px solid rgba(157,31,47,.10);
	transition: background .18s, color .18s;
}
.majd-sp__cats a:hover { background: var(--w-red); color: #fff; }

.majd-sp__header {
	border-bottom: 1px solid var(--w-border-soft);
	padding-bottom: 16px;
	margin-bottom: 18px;
}
.majd-sp__title {
	font-size: clamp(24px, 2.8vw, 36px);
	line-height: 1.35;
	font-weight: 900;
	letter-spacing: -.025em;
	color: var(--w-navy-deep);
	margin: 0 0 10px;
}
.majd-sp__author {
	font-size: 15px;
	color: var(--w-muted);
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.majd-sp__author a {
	font-weight: 800;
	border-bottom: 1px dashed rgba(196,154,70,.5);
	padding-bottom: 1px;
}

.majd-sp__ratingline {
	display: flex; align-items: center; gap: 10px; min-height: 24px;
}
.majd-sp__ratingline .woocommerce-product-rating {
	margin: 0 !important;
	display: flex; align-items: center; gap: 8px;
	font-size: 13px; color: var(--w-muted);
}
.majd-sp__ratingline .star-rating { float: none !important; margin: 0 !important; color: var(--w-gold); }

.majd-sp__lead {
	font-size: 15px;
	line-height: 1.95;
	color: var(--w-muted);
	background: var(--w-gold-soft);
	border-right: 3px solid var(--w-gold);
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 18px;
}
.majd-sp__lead p { margin: 0 0 8px; }
.majd-sp__lead p:last-child { margin: 0; }

.majd-sp__quick-specs {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin: 14px 0 22px;
}
.majd-sp__quick-specs div {
	background: var(--w-white);
	border: 1px solid var(--w-border-soft);
	border-radius: 12px;
	padding: 12px 14px;
	box-shadow: var(--w-shadow-sm);
}
.majd-sp__quick-specs span {
	display: block; font-size: 11px; color: var(--w-light); margin-bottom: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.majd-sp__quick-specs strong {
	display: block; font-size: 13.5px; color: var(--w-ink); font-weight: 900; line-height: 1.5;
}

.majd-sp__section-title {
	display: flex; align-items: center; gap: 12px; margin: 12px 0 14px; font-weight: 900; color: var(--w-navy);
}
.majd-sp__section-title::after { content: ""; height: 1px; background: var(--w-border); flex: 1; }
.majd-sp__section-title span { padding-bottom: 4px; border-bottom: 3px solid var(--w-red); }

.majd-sp__prose { font-size: 15.5px; line-height: 2.05; color: var(--w-muted); }
.majd-sp__prose p { margin: 0 0 14px; }
.majd-sp__prose h2,.majd-sp__prose h3,.majd-sp__prose h4 { color: var(--w-navy); margin: 18px 0 8px; font-weight: 900; }
.majd-sp__prose--intro { max-height: 240px; overflow: hidden; position: relative; }
.majd-sp__prose--intro::after {
	content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 60px;
	background: linear-gradient(180deg, rgba(255,255,255,0), #fff 85%); pointer-events: none;
}

/* ─── BUY CARD ─── */
.majd-sp__buycard {
	background: var(--w-white);
	border: 1px solid var(--w-border);
	border-radius: var(--w-radius);
	padding: 20px;
	box-shadow: var(--w-shadow);
	position: sticky !important;
	top: 92px;
	align-self: start;
}

.majd-sp__buy-status {
	display: inline-flex; align-items: center; gap: 7px;
	font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.majd-sp__buy-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.majd-sp__buy-status.is-instock  { background: #ecfdf5; color: var(--w-teal-deep); }
.majd-sp__buy-status.is-outstock { background: var(--w-red-soft); color: var(--w-red); }

.majd-sp__price {
	font-size: 30px; line-height: 1.2; font-weight: 900; color: var(--w-navy); margin: 0 0 12px;
}
.majd-sp__price .price { color: inherit !important; margin: 0; }
.majd-sp__price del  { font-size: 16px; color: var(--w-light); font-weight: 700; margin-inline-start: 8px; opacity: .8; }
.majd-sp__price ins  { text-decoration: none; background: transparent; color: var(--w-red); }

.majd-sp__stock { font-size: 13px; color: var(--w-muted); margin-bottom: 14px; }
.majd-sp__stock .stock { margin: 0; font-weight: 800; }
.majd-sp__stock .in-stock    { color: var(--w-teal-deep); }
.majd-sp__stock .out-of-stock{ color: var(--w-red); }

.majd-sp__cartbox { margin: 14px 0 12px; }
.majd-sp__cartbox form.cart {
	margin: 0 !important; display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch;
}
.majd-sp__cartbox form.cart::before,.majd-sp__cartbox form.cart::after { display: none !important; }
.majd-sp__cartbox .quantity { float: none !important; margin: 0 !important; display: flex; align-items: stretch; min-width: 88px; }
.majd-sp__cartbox .quantity .qty {
	width: 88px !important; height: 46px;
	border: 1.5px solid var(--w-border); border-radius: 10px;
	text-align: center; font-weight: 900; color: var(--w-navy); background: #fff;
	transition: border-color .18s;
}
.majd-sp__cartbox .quantity .qty:focus { border-color: var(--w-navy); outline: none; }

.majd-sp__cartbox .single_add_to_cart_button,
.majd-sp__cartbox button.button,
.majd-sp__cartbox .button.alt {
	flex: 1 1 160px; min-height: 46px;
	border: 0 !important; border-radius: 12px !important;
	background: linear-gradient(135deg, var(--w-teal), var(--w-teal-deep)) !important;
	color: #fff !important;
	font-family: inherit; font-size: 15px !important; font-weight: 900 !important;
	padding: 12px 20px !important; line-height: 1.25 !important;
	box-shadow: 0 8px 20px rgba(14,165,160,.28);
	transition: transform .18s, filter .18s;
}
.majd-sp__cartbox .single_add_to_cart_button:hover,
.majd-sp__cartbox button.button:hover,
.majd-sp__cartbox .button.alt:hover {
	transform: translateY(-2px); filter: brightness(1.05);
}
.majd-sp__cartbox .single_add_to_cart_button.disabled,
.majd-sp__cartbox .single_add_to_cart_button:disabled {
	opacity: .5 !important; cursor: not-allowed; transform: none;
}

.majd-sp__cartbox table.variations {
	width: 100%; margin: 0 0 14px !important; border: 0; border-collapse: separate; border-spacing: 0 8px;
}
.majd-sp__cartbox table.variations tr,
.majd-sp__cartbox table.variations td,
.majd-sp__cartbox table.variations th {
	display: block; padding: 0 !important; background: transparent !important; border: 0 !important; text-align: right;
}
.majd-sp__cartbox table.variations label {
	display: block; font-size: 12px; font-weight: 800; color: var(--w-muted); margin-bottom: 5px;
}
.majd-sp__cartbox table.variations select {
	width: 100%; min-height: 42px;
	border: 1.5px solid var(--w-border); border-radius: 10px; padding: 0 12px;
	font-family: inherit; background: #fff; color: var(--w-ink);
	transition: border-color .18s;
}
.majd-sp__cartbox table.variations select:focus { border-color: var(--w-navy); outline: none; }
.majd-sp__cartbox .reset_variations { display: inline-block; font-size: 12px; margin-top: 5px; color: var(--w-red); }
.majd-sp__cartbox .single_variation_wrap,
.majd-sp__cartbox .woocommerce-variation-add-to-cart { width: 100%; }
.majd-sp__cartbox .woocommerce-variation-price { font-size: 20px; font-weight: 900; color: var(--w-navy); margin-bottom: 10px; }

.majd-sp__vat-note {
	margin: 12px 0 14px; font-size: 11.5px; color: var(--w-light); font-style: italic; text-align: center;
}

.majd-sp__buy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.majd-sp__mini-action {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 38px; border-radius: 10px;
	background: var(--w-cream-lt); border: 1px solid var(--w-border);
	font-size: 12px; font-weight: 800; color: var(--w-navy) !important;
	gap: 5px; transition: background .18s, color .18s;
}
.majd-sp__mini-action:hover { background: var(--w-navy); color: #fff !important; border-color: var(--w-navy); }

.majd-sp__side-meta { margin: 16px 0 0; border: 1px solid var(--w-border-soft); border-radius: 12px; overflow: hidden; }
.majd-sp__side-meta div { display: grid; grid-template-columns: 92px 1fr; border-bottom: 1px solid var(--w-border-soft); }
.majd-sp__side-meta div:last-child { border-bottom: 0; }
.majd-sp__side-meta dt,.majd-sp__side-meta dd { margin: 0; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.majd-sp__side-meta dt { background: #f6f2eb; color: var(--w-muted); font-weight: 800; }
.majd-sp__side-meta dd { background: #fff; color: var(--w-ink); font-weight: 700; word-break: break-word; }

/* ─── TABS ─── */
.majd-sp__tabs,.majd-sp__author-bio,.majd-sp__tags,.majd-sp__related {
	background: var(--w-white); border: 1px solid var(--w-border); border-radius: var(--w-radius);
	box-shadow: var(--w-shadow-sm); margin-bottom: 22px; overflow: hidden;
}
.majd-sp__tabs-nav {
	display: flex; overflow-x: auto; background: #f5f1e9; border-bottom: 1px solid var(--w-border);
	scrollbar-width: none;
}
.majd-sp__tabs-nav::-webkit-scrollbar { display: none; }
.majd-sp__tab {
	appearance: none; border: 0; background: transparent; font-family: inherit;
	padding: 15px 22px; font-size: 14px; font-weight: 800; color: var(--w-muted); cursor: pointer;
	white-space: nowrap; border-bottom: 3px solid transparent; transition: background .18s, color .18s, border-color .18s;
}
.majd-sp__tab:hover { color: var(--w-navy); background: rgba(255,255,255,.6); }
.majd-sp__tab.is-active { background: #fff; color: var(--w-navy); border-bottom-color: var(--w-red); }
.majd-sp__tabs-body { padding: 26px; }
.majd-sp__tab-pane { display: none; }
.majd-sp__tab-pane.is-active { display: block; animation: majdFade .22s ease; }
@keyframes majdFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.majd-sp__specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.majd-sp__spec-row {
	display: grid; grid-template-columns: 130px 1fr;
	border: 1px solid var(--w-border-soft); border-radius: 10px; overflow: hidden;
}
.majd-sp__spec-row dt,.majd-sp__spec-row dd { margin: 0; padding: 12px 14px; font-size: 13px; line-height: 1.65; }
.majd-sp__spec-row dt { background: #f6f2ea; color: var(--w-muted); font-weight: 800; }
.majd-sp__spec-row dd { font-weight: 700; color: var(--w-ink); word-break: break-word; }

.majd-sp__shipping-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.majd-sp__shipping-grid div,.majd-sp__reviews-note,.majd-sp__empty {
	background: var(--w-cream-lt); border: 1px solid var(--w-border-soft); border-radius: 14px;
	padding: 18px; color: var(--w-muted); line-height: 1.8;
}
.majd-sp__shipping-grid strong,.majd-sp__reviews-note strong { display: block; font-size: 15px; color: var(--w-navy); margin-bottom: 8px; }
.majd-sp__shipping-grid p,.majd-sp__reviews-note p { margin: 0; }

.majd-sp__author-bio,.majd-sp__tags { padding: 24px 26px; }
.majd-sp__author-bio h2 { font-size: 20px; color: var(--w-navy); margin: 0 0 12px; }

.majd-sp__tags {
	display: flex; gap: 9px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--w-muted);
}
.majd-sp__tags strong { color: var(--w-navy); }
.majd-sp__tags a {
	display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
	background: var(--w-cream-lt); color: var(--w-muted); font-size: 12px; font-weight: 700;
	border: 1px solid var(--w-border-soft); transition: background .18s, color .18s;
}
.majd-sp__tags a:hover { background: var(--w-navy); color: #fff; }

/* ─── RELATED BOOKS ─── */
.majd-sp__related { padding: 24px 26px 28px; }
.majd-sp__related-title {
	font-size: 20px; font-weight: 900; color: var(--w-navy); margin: 0 0 20px;
	padding-right: 14px; border-right: 4px solid var(--w-gold);
}
.majd-sp__related-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }

.majd-sp__r-card {
	border: 1px solid var(--w-border-soft); border-radius: 14px; padding: 10px;
	background: var(--w-white); transition: transform .22s, box-shadow .22s, border-color .22s; min-width: 0;
}
.majd-sp__r-card:hover { transform: translateY(-5px); box-shadow: var(--w-shadow); border-color: rgba(196,154,70,.5); }

.majd-sp__r-cover {
	display: block; aspect-ratio: 2/3; background: var(--w-cream); border-radius: 10px; overflow: hidden; margin-bottom: 10px;
}
.majd-sp__r-cover img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .28s; image-rendering: auto; }
.majd-sp__r-card:hover .majd-sp__r-cover img { transform: scale(1.04); }

.majd-sp__r-title {
	font-size: 13px; font-weight: 800; line-height: 1.45; margin: 0 0 4px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.majd-sp__r-auth { font-size: 11px; color: var(--w-light); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.majd-sp__r-price { font-size: 13px; font-weight: 900; color: var(--w-red); margin-top: 4px; }

/* ─── WOO OVERRIDES ─── */
.aw-product__layout-3col,.aw-product__attr-strip,.aw-product__author-bio,
.aw-product__attr-slider,.aw-product__specs-sidebar,.product_meta { display: none !important; }

.majd-sp .woocommerce-product-gallery__trigger { left: 12px !important; right: auto !important; z-index: 4; }
.majd-sp .woocommerce-Price-amount { font-weight: inherit; }
.majd-sp .screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1140px) {
	.majd-sp__hero { grid-template-columns: 260px 1fr; }
	.majd-sp__buycard {
		grid-column: 1 / -1;
		position: static !important;
		display: grid;
		grid-template-columns: 1fr 1.3fr 1fr;
		gap: 16px; align-items: start;
	}
	.majd-sp__vat-note,.majd-sp__buy-actions { grid-column: 2; }
	.majd-sp__related-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 840px) {
	.majd-sp__container { padding: 16px 14px 60px; }
	.majd-sp__hero { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
	.majd-sp__media { max-width: 300px; margin: 0 auto; width: 100%; }
	.majd-sp__main { padding: 0; }
	.majd-sp__title { font-size: 24px; }
	.majd-sp__buycard { display: block; position: static !important; }
	.majd-sp__quick-specs,.majd-sp__specs,.majd-sp__shipping-grid { grid-template-columns: 1fr; }
	.majd-sp__spec-row { grid-template-columns: 115px 1fr; }
	.majd-sp__tabs-body,.majd-sp__author-bio,.majd-sp__related { padding: 18px; }
	.majd-sp__related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
	.majd-sp__quick-specs { grid-template-columns: 1fr 1fr; }
	.majd-sp__cartbox form.cart { display: block; }
	.majd-sp__cartbox .quantity { margin-bottom: 10px !important; width: 100%; }
	.majd-sp__cartbox .quantity .qty { width: 100% !important; }
	.majd-sp__cartbox .single_add_to_cart_button,.majd-sp__cartbox button.button,.majd-sp__cartbox .button.alt { width: 100%; }
	.majd-sp__related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.majd-sp__tabs-nav { scroll-snap-type: x mandatory; }
	.majd-sp__tab { padding: 12px 15px; font-size: 13px; scroll-snap-align: start; }
}

body.majd-app-mode .majd-sp__crumbs,
body.majd-app-mode .majd-sp__related,
body.majd-app-mode .majd-sp__trust { display: none; }

/* ═══════════════════════════════════════════════════════════════
   رومنة العناوين والمؤلفين — المؤسسة الجامعية للدراسات (مجد)
═══════════════════════════════════════════════════════════════ */

/* الكتلة الثنائية اللغة */
.majd-bilingual {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}
.majd-bilingual__ar {
  font-family: 'Cairo', 'Tajawal', 'Amiri', serif;
  font-size: 1em;
  color: inherit;
}
.majd-bilingual__rom {
  font-family: 'Garamond', 'Georgia', 'EB Garamond', serif;
  font-size: 0.72em;
  color: var(--gold, #c49a46);
  letter-spacing: 0.03em;
  font-style: italic;
  opacity: 0.9;
  direction: ltr;
  text-align: right;
}

/* رومنة العنوان الرئيسي في صفحة المنتج */
.majd-product-romanize {
  display: block;
  font-family: 'EB Garamond', 'Garamond', 'Georgia', serif;
  font-style: italic;
  font-size: 0.82em;
  color: var(--gold, #c49a46);
  letter-spacing: 0.04em;
  margin-top: 4px;
  margin-bottom: 2px;
  direction: ltr;
  text-align: right;
  opacity: 0.88;
}

/* رومنة اسم المؤلف */
.majd-author-romanize {
  display: inline-block;
  font-family: 'EB Garamond', 'Garamond', 'Georgia', serif;
  font-style: italic;
  font-size: 0.80em;
  color: var(--gold-lt, #d9b96a);
  letter-spacing: 0.03em;
  direction: ltr;
  margin-inline-start: 6px;
  opacity: 0.85;
}

/* شارة الرومنة بجانب المؤلف */
.majd-romanize-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px 2px 8px;
  background: rgba(196, 154, 70, 0.08);
  border: 1px solid rgba(196, 154, 70, 0.22);
  border-radius: 20px;
  font-style: italic;
  font-family: 'EB Garamond', 'Garamond', 'Georgia', serif;
  font-size: 0.78em;
  color: var(--gold, #c49a46);
  direction: ltr;
  letter-spacing: 0.025em;
}
.majd-romanize-badge .majd-icon {
  opacity: 0.7;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   أيقونات مجد — تحسينات عامة
═══════════════════════════════════════════════════════════════ */

.majd-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

/* أيقونات خصائص الكتاب */
.majd-sp__specs .majd-icon,
.aw-product__attr-icon .majd-icon {
  color: var(--gold, #c49a46);
  opacity: 0.9;
}

/* أيقونة قسم */
.majd-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(196, 154, 70, 0.1);
  color: var(--gold, #c49a46);
  margin-inline-end: 10px;
  flex-shrink: 0;
}

/* أيقونات الهيدر — تكبير طفيف عند التمرير */
.aw-nav__link:hover .majd-icon,
.aw-nav__link:focus .majd-icon {
  transform: scale(1.12);
  opacity: 1;
}

/* بطاقة المؤلف — أيقونة الترجمة */
.majd-author-translate-icon {
  color: var(--gold, #c49a46);
  opacity: 0.75;
  margin-inline-start: 4px;
}

/* أيقونات الفوتر */
.aw-footer__contact-item .majd-icon {
  color: rgba(196, 154, 70, 0.8);
  margin-inline-end: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   MAJD — Spec Cards with Gradient Icon Badges
   أيقونات الخصائص الببليوغرافية — تصميم إبداعي
═══════════════════════════════════════════════════════════════ */

/* الشبكة الرئيسية للخصائص */
.majd-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* بطاقة خاصية واحدة */
.majd-spec-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--w-border-soft, #f2ece3);
  border-radius: 14px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s;
  position: relative;
  overflow: hidden;
}

.majd-spec-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--g1, #c49a46) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.majd-spec-card:hover {
  box-shadow: 0 6px 24px rgba(17,39,74,.10);
  transform: translateY(-2px);
  border-color: var(--w-border, #e8e1d5);
}
.majd-spec-card:hover::before { opacity: 0.04; }

/* الشارة الدائرية بالأيقونة */
.majd-spec-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--g1, #c49a46) 0%, var(--g2, #f0c96e) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--g1, #c49a46) 35%, transparent);
  position: relative;
}

/* وهج خفيف خلف الشارة */
.majd-spec-card__icon::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--g1, #c49a46), var(--g2, #f0c96e));
  opacity: 0.15;
  z-index: -1;
  filter: blur(4px);
}

/* منطقة النص */
.majd-spec-card__body {
  min-width: 0;
  flex: 1;
}

.majd-spec-card__label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--w-light, #8a94a8);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.majd-spec-card__value {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--w-ink, #172033);
  line-height: 1.45;
  word-break: break-word;
  margin: 0;
}

.majd-spec-card__value a {
  color: var(--w-navy, #11274a);
  text-decoration: none;
  border-bottom: 1px solid rgba(17,39,74,.15);
  transition: color .15s, border-color .15s;
}
.majd-spec-card__value a:hover {
  color: var(--w-gold, #c49a46);
  border-color: var(--w-gold, #c49a46);
}

/* الاستجابة للشاشات الصغيرة */
@media (max-width: 600px) {
  .majd-specs-grid { grid-template-columns: 1fr; }
  .majd-spec-card { padding: 10px 12px; }
  .majd-spec-card__icon { width: 38px; height: 38px; border-radius: 10px; }
}
