:root {
	--ap-teal: #2fa4a5;
	--ap-teal-dark: #085041;
	--ap-teal-light: #e1f5ee;
	--ap-coral: #db786b;
	--ap-coral-dark: #712b13;
	--ap-coral-light: #faece7;
	--ap-text: #201f1c;
	--ap-text-muted: #6b6a66;
	--ap-radius: 12px;
	--ap-border: #ece9e2;
}

/* حماية عامة على مستوى الموقع كله: تمنع ظهور فراغ أبيض أو حاجة
   لعمل Scroll أفقي بسبب أي عنصر بيتمدد أعرض من الشاشة (خصوصًا
   على الموبايل)، سواء كان العنصر ده من الثيم أو من تصميم مخصص
   على أي صفحة. */
html, body {
	overflow-x: hidden;
	max-width: 100%;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	font-family: 'Cairo', Tahoma, Arial, sans-serif;
	color: var(--ap-text);
	background: #fff;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.ap-btn {
	display: inline-block;
	padding: 13px 28px;
	border-radius: var(--ap-radius);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: transform .15s ease, opacity .15s ease;
}
.ap-btn:hover { opacity: .92; transform: translateY(-1px); }
.ap-btn--primary { background: var(--ap-teal); color: #fff; }
.ap-btn--coral { background: var(--ap-coral); color: #fff; }

.ap-header {
	background: #fff;
	border-bottom: 1px solid var(--ap-border);
	position: sticky;
	top: 0;
	z-index: 50;
}
.ap-header__inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.ap-header__logo img { height: 42px; width: auto; }

.ap-header__nav ul {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
}
.ap-header__nav a {
	font-size: 15px;
	font-weight: 600;
	color: var(--ap-text);
	transition: color .15s ease;
}
.ap-header__nav a:hover { color: var(--ap-teal); }

.ap-header__toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 38px;
	height: 38px;
	background: var(--ap-teal-light);
	border: none;
	border-radius: 8px;
	cursor: pointer;
}
.ap-header__toggle span { display: block; width: 18px; height: 2.5px; background: var(--ap-teal-dark); border-radius: 2px; }

.ap-hero-slider {
	position: relative;
	width: 100%;
	height: 420px;
	overflow: hidden;
}
.ap-hero-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease;
}
.ap-hero-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.ap-hero-slide__inner {
	max-width: 1320px;
	width: 100%;
	margin: 0 auto;
	padding: 0 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
}
.ap-hero-slide__text { flex: 1; max-width: 560px; }
.ap-hero-slide__visual { flex: 0 0 auto; display: flex; justify-content: center; align-items: center; min-width: 220px; }

.ap-badge {
	display: inline-block;
	background: var(--ap-teal);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 6px 16px;
	border-radius: 20px;
	margin-bottom: 18px;
}
.ap-hero-slide h1 {
	font-size: 40px;
	font-weight: 700;
	color: var(--ap-teal-dark);
	margin: 0 0 16px;
	line-height: 1.3;
}
.ap-hero-slide p {
	font-size: 17px;
	line-height: 1.8;
	color: var(--ap-teal-dark);
	opacity: .85;
	margin: 0 0 28px;
}

.ap-book-stack {
	position: relative;
	width: 260px;
	height: 300px;
}
.ap-book-stack__item {
	position: absolute;
	width: 150px;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 14px 34px rgba(0,0,0,.18);
}
.ap-book-stack__item img { aspect-ratio: 2/3; object-fit: cover; }
.ap-book-stack__item--1 { top: 30px; right: 90px; transform: rotate(-8deg); z-index: 2; }
.ap-book-stack__item--2 { top: 0; right: 10px; transform: rotate(6deg); z-index: 3; }
.ap-book-stack__item--3 { top: 55px; right: 0; transform: rotate(16deg); z-index: 1; opacity: .9; }

.ap-hero-dots {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 3;
}
.ap-hero-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(0,0,0,.2);
	border: none;
	padding: 0;
	cursor: pointer;
}
.ap-hero-dot.is-active { background: var(--ap-teal-dark); width: 22px; border-radius: 5px; transition: all .2s ease; }

.ap-page-inner { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

.ap-section { margin: 56px 0; }
.ap-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 22px;
	border-bottom: 3px solid var(--ap-teal);
	padding-bottom: 12px;
}
.ap-section__head h2 {
	font-size: 26px;
	font-weight: 700;
	margin: 0;
	color: var(--ap-text);
	position: relative;
}

.ap-row-arrows { display: flex; gap: 8px; }
.ap-arrow {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--ap-border);
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ap-text);
	transition: all .15s ease;
}
.ap-arrow:hover { background: var(--ap-teal); border-color: var(--ap-teal); color: #fff; }

.ap-row {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding: 6px 6px 16px;
	scrollbar-width: none;
}
.ap-row::-webkit-scrollbar { display: none; }

.ap-book-card {
	flex: 0 0 190px;
	display: block;
	background: #fff;
	border-radius: var(--ap-radius);
	border: 1px solid var(--ap-border);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}
.ap-book-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 32px rgba(0,0,0,.1);
	border-color: transparent;
}
.ap-book-card__cover {
	aspect-ratio: 2 / 3;
	background: #f4f3ef;
	overflow: hidden;
}
.ap-book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.ap-book-card__body { padding: 14px 14px 16px; }
.ap-book-card__title {
	font-size: 14.5px;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ap-book-card__price {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	color: var(--ap-coral-dark);
	background: var(--ap-coral-light);
	padding: 3px 12px;
	border-radius: 20px;
	margin: 0;
}

.ap-authors-cta {
	text-align: center;
	background: var(--ap-coral-light);
	border-radius: 20px;
	padding: 54px 24px;
	margin-bottom: 60px;
}
.ap-authors-cta h2 { color: var(--ap-coral-dark); font-size: 26px; margin: 0 0 10px; font-weight: 700; }
.ap-authors-cta p { color: var(--ap-coral-dark); margin: 0 0 24px; font-size: 16px; opacity: .85; }

.ap-footer { background: #f7f6f2; border-top: 1px solid var(--ap-border); margin-top: 40px; }
.ap-footer__inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 32px 24px;
	text-align: center;
}
.ap-footer__links { display: flex; justify-content: center; gap: 24px; margin-bottom: 18px; flex-wrap: wrap; }
.ap-footer__links a { font-size: 14px; color: var(--ap-text-muted); font-weight: 600; }
.ap-footer__links a:hover { color: var(--ap-teal); }
.ap-footer__social { display: flex; justify-content: center; gap: 14px; margin-bottom: 18px; }
.ap-footer__social a {
	width: 36px; height: 36px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid var(--ap-border);
	display: flex; align-items: center; justify-content: center;
	color: var(--ap-text-muted);
}
.ap-footer__social a:hover { background: var(--ap-teal); color: #fff; border-color: var(--ap-teal); }
.ap-footer__copy { font-size: 13px; color: var(--ap-text-muted); margin: 0; }

@media (max-width: 860px) {
	.ap-header__nav { display: none; }
	.ap-header__nav.is-open {
		display: block;
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		background: #fff;
		border-top: 1px solid var(--ap-border);
		border-bottom: 1px solid var(--ap-border);
		box-shadow: 0 12px 24px rgba(0,0,0,.08);
		padding: 16px 24px 24px;
		z-index: 60;
	}
	.ap-header__nav.is-open ul { flex-direction: column; gap: 14px; }
	.ap-header__toggle { display: flex; }

	.ap-hero-slider { height: 560px; }
	.ap-hero-slide__inner { flex-direction: column; text-align: center; padding: 32px 24px 0; justify-content: center; height: 100%; }
	.ap-hero-slide h1 { font-size: 25px; }
	.ap-hero-slide p { font-size: 14.5px; }
	.ap-hero-slide__visual { margin-top: 18px; transform: scale(.8); }
	.ap-page-inner { padding: 0 16px; }
	.ap-section__head h2 { font-size: 21px; }

	.ap-row-arrows { display: none; }
	.ap-row {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
		overflow: visible;
		padding: 6px 0 4px;
	}
	.ap-book-card { flex: auto; width: 100%; }
}

.ap-author-card {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	background: #f7f6f2;
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius);
	padding: 22px 24px;
	margin: 32px 0;
	max-width: 700px;
}
.ap-author-card__avatar { flex: 0 0 auto; }
.ap-author-card__avatar img {
	width: 68px; height: 68px;
	border-radius: 50%;
	object-fit: cover;
}
.ap-author-card__label {
	font-size: 12px;
	font-weight: 700;
	color: var(--ap-teal);
	margin: 0 0 4px;
	text-transform: uppercase;
	letter-spacing: .3px;
}
.ap-author-card__name {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 8px;
	color: var(--ap-text);
}
.ap-author-card__title {
	display: inline-block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ap-coral-dark);
	background: var(--ap-coral-light);
	padding: 2px 10px;
	border-radius: 20px;
	margin-right: 8px;
}
.ap-author-card__bio p {
	margin: 0 0 12px;
}
.ap-author-card__bio {
	font-size: 14px;
	line-height: 1.8;
	color: var(--ap-text-muted);
	margin: 0 0 8px;
}
.ap-author-card__count {
	font-size: 13px;
	font-weight: 600;
	color: var(--ap-teal-dark);
	margin: 0;
}

@media (max-width: 600px) {
	.ap-author-card { flex-direction: column; text-align: center; align-items: center; }
}

/* ============================================================
   صفحة المنتج المنفرد (SureCart) — أسماء classes حقيقية مؤكدة
   عن طريق Inspect Element (وليست تخمينًا هذه المرة)
   ============================================================ */

.wp-block-surecart-product-title {
	font-size: 28px !important;
	font-weight: 700 !important;
	line-height: 1.4 !important;
	color: var(--ap-text) !important;
	margin-bottom: 10px !important;
}

.wp-block-surecart-product-price {
	font-size: 24px !important;
	font-weight: 700 !important;
}

.wp-block-surecart-product-image img {
	border-radius: 14px !important;
	box-shadow: 0 20px 40px rgba(0,0,0,.08);
}

/* أزرار "أضف إلى السلة" و"اشتري الآن" — الألوان أصلًا صح من إعدادات
   SureCart نفسها (تركوازي وكورال)، هنا بس بنظبط الشكل والمسافات */
.wp-block-surecart-product-buy-button .wp-block-button__link {
	width: 100% !important;
	padding: 14px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	border-radius: var(--ap-radius) !important;
}
.wp-block-surecart-product-buy-button { margin-bottom: 10px !important; }

.wp-block-surecart-product-quantity {
	padding-top: 20px !important;
	padding-bottom: 20px !important;
}

.wp-block-surecart-product-description p {
	font-size: 15.5px !important;
	line-height: 2 !important;
	color: var(--ap-text) !important;
	margin-bottom: 16px !important;
}
/* الفقرات القصيرة اللي شكلها اقتباس (زي جمل بين علامتي تنصيص) تتزين شوية */
.wp-block-surecart-product-description p:has(> strong:only-child),
.wp-block-surecart-product-description blockquote {
	background: var(--ap-teal-light);
	border-right: 4px solid var(--ap-teal);
	padding: 14px 18px !important;
	border-radius: 8px;
	font-style: italic;
}

/* أزرار "أضف إلى السلة" و"اشتري الآن" — تصميم مبتكر بأيقونات */
.wp-block-surecart-product-buy-button .wp-block-button__link {
	width: 100% !important;
	padding: 15px !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	border-radius: 50px !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 6px 18px rgba(0,0,0,.12);
	transition: transform .15s ease, box-shadow .15s ease !important;
	position: relative;
}
.wp-block-surecart-product-buy-button .wp-block-button__link:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.wp-block-surecart-product-buy-button .wp-block-button__link .sc-button__link-text::before {
	margin-left: 8px;
	font-size: 15px;
}
/* زر "أضف إلى السلة" (الأول) يظهر أيقونة سلة */
.wp-block-surecart-product-buy-button:first-of-type .wp-block-button__link .sc-button__link-text::before {
	content: "🛒";
}
/* زر "اشتري الآن" (بالستايل is-style-fill) يظهر أيقونة برق */
.wp-block-surecart-product-buy-button.is-style-fill .wp-block-button__link .sc-button__link-text::before {
	content: "⚡";
}

#reviews {
	border-top: 1px solid var(--ap-border);
	margin-top: 40px !important;
	padding-top: 28px !important;
}

/* قسم "ربما تعجبك هذه الكتب أيضًا" */
.wp-block-surecart-product-list-related .sc-product-item-link {
	border-radius: var(--ap-radius) !important;
	overflow: hidden;
	display: block;
	transition: transform .2s ease, box-shadow .2s ease !important;
}
.wp-block-surecart-product-list-related .sc-product-item-link:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 32px rgba(0,0,0,.12);
}
