/* =============================================================================
   mas_house_web.css — الهوية البصرية لواجهة موقع HOUSE MAS
   يُضمَّن عبر web_include_css في hooks.py (مع رقم إصدار من تاريخ تعديل الملف).
   كل التخصيص هنا؛ لا يُعدَّل أي ملف داخل apps/webshop أو apps/frappe.
   ============================================================================= */

/* --- متغيرات التصميم: نقطة التغيير الوحيدة ------------------------------- */
:root {
	--mh-bg: #FFFFFF;
	--mh-ink: #0B0D11;
	--mh-accent: #DA891A; /* مؤقت إلى أن تصل ألوان HOUSE MAS الرسمية */
	--mh-muted: #F4F4F2;
	--mh-radius: 4px;

	/* مشتقات من الأساسيات أعلاه */
	--mh-line: rgba(11, 13, 17, 0.12);
	--mh-line-strong: rgba(11, 13, 17, 0.3);
	--mh-ink-soft: rgba(11, 13, 17, 0.64);
	--mh-on-ink: rgba(255, 255, 255, 0.92);
	--mh-on-ink-soft: rgba(255, 255, 255, 0.64);
	/* النص فوق اللون المميز حبريّ لا أبيض: التباين مع الأبيض لا يكفي للقراءة */
	--mh-on-accent: var(--mh-ink);
	--mh-accent-deep: #b56f10;

	--mh-font: "Archivo", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mh-maxw: 1180px;
	--mh-gap: 24px;
	--mh-section-y: clamp(48px, 7vw, 88px);
}

/* ربط متغيرات ثيم Frappe بالهوية */
:root {
	--font-stack: var(--mh-font);
	--text-color: var(--mh-ink);
	--heading-color: var(--mh-ink);
	--text-muted: var(--mh-ink-soft);
	--primary: var(--mh-ink);
	--primary-color: var(--mh-ink);
	--btn-primary: var(--mh-ink);
	--bg-color: var(--mh-bg);
	--fg-color: var(--mh-bg);
	--card-bg: var(--mh-bg);
	--border-color: var(--mh-line);
	--border-radius: var(--mh-radius);
	--border-radius-sm: var(--mh-radius);
	--border-radius-md: var(--mh-radius);
	--border-radius-lg: var(--mh-radius);
}

body {
	background: var(--mh-bg);
	color: var(--mh-ink);
	font-family: var(--mh-font);
}

h1, h2, h3, h4, h5, .page-title {
	color: var(--mh-ink);
	font-weight: 700;
	line-height: 1.3;
}

a { color: var(--mh-ink); }
a:hover { color: var(--mh-accent-deep); }

/* الأرقام والكلمات اللاتينية داخل نص عربي تبقى بالاتجاه الصحيح */
[dir="rtl"] .mh-ltr { direction: ltr; unicode-bidi: isolate; }

/* --- ترويسة المتجر ------------------------------------------------------- */
/* القالب: mas_house/templates/includes/navbar/navbar.html */
.mh-header { background: var(--mh-bg); border-bottom: 1px solid var(--mh-line); }

/* الشريط العلوي: ثقة ورقم المبيعات */
.mh-topbar { background: var(--mh-ink); color: var(--mh-on-ink); font-size: 0.82rem; }

.mh-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 40px;
}

.mh-trust { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; margin: 0; padding: 0; }

.mh-trust__item,
.mh-trust__item a,
.mh-topbar__phone { display: inline-flex; align-items: center; gap: 7px; }

.mh-trust__item { color: var(--mh-on-ink-soft); }
.mh-trust__item a { color: inherit; }
.mh-trust__item a:hover { color: #fff; }

.mh-topbar__phone { color: #fff; font-weight: 700; }
.mh-topbar__phone:hover { color: var(--mh-accent); }

/* طرف الشريط: انتماء الشركة ثم رقم المبيعات، بينهما فاصل رفيع */
.mh-topbar__end { display: flex; align-items: center; gap: 14px; }

/* النص لاتيني داخل عنصر يتبع اتجاه الصفحة، فيقع الفاصل في جهة الهاتف دائماً */
.mh-topbar__member {
	color: var(--mh-on-ink-soft);
	font-family: "Archivo", sans-serif;
	font-size: 0.74rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	white-space: nowrap;
	padding-inline-end: 14px;
	border-inline-end: 1px solid rgba(255, 255, 255, 0.22);
}

.mh-topbar svg {
	width: 16px;
	height: 16px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* الصف الأوسط: الشعار والبحث والأيقونات */
.mh-header__inner {
	display: flex;
	align-items: center;
	gap: clamp(14px, 3vw, 40px);
	padding-block: 14px;
}

.mh-brand { flex: none; display: inline-flex; flex-direction: column; line-height: 1.1; }

/* الشعار بأقصى ما يعطيه Archivo المتغيّر: العرض 125% والثخانة 900 */
.mh-brand__name {
	font-family: "Archivo", sans-serif;
	font-weight: 900;
	font-stretch: 125%;
	font-variation-settings: "wdth" 125;
	font-size: 1.6rem;
	letter-spacing: 0.03em;
	line-height: 1.05;
	color: var(--mh-ink);
}

.mh-brand__tag { font-size: 0.74rem; font-weight: 600; color: var(--mh-ink-soft); }

/* انتماء الشركة تحت الشعار: أصغر ما يبقى مقروءاً، ولاتيني فيبقى بالاتجاه الصحيح */
.mh-brand__member {
	direction: ltr;
	unicode-bidi: isolate;
	font-family: "Archivo", sans-serif;
	font-size: 0.6rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--mh-ink-soft);
	margin-top: 1px;
}

.mh-search { position: relative; display: flex; flex: 1 1 auto; max-width: 560px; margin-inline: auto; }

.mh-search__input {
	flex: 1;
	min-width: 0;
	height: 46px;
	padding-inline: 14px;
	border: 1px solid var(--mh-line-strong);
	border-start-end-radius: 0;
	border-end-end-radius: 0;
	border-radius: var(--mh-radius) 0 0 var(--mh-radius);
	background: var(--mh-bg);
	color: var(--mh-ink);
	font: inherit;
	font-size: 0.95rem;
}

[dir="rtl"] .mh-search__input { border-radius: 0 var(--mh-radius) var(--mh-radius) 0; }

.mh-search__input:focus { outline: 2px solid var(--mh-accent); outline-offset: -1px; border-color: var(--mh-accent); }

.mh-search__btn {
	flex: none;
	width: 58px;
	border: 1px solid var(--mh-ink);
	background: var(--mh-ink);
	color: #fff;
	border-radius: 0 var(--mh-radius) var(--mh-radius) 0;
	cursor: pointer;
}

[dir="rtl"] .mh-search__btn { border-radius: var(--mh-radius) 0 0 var(--mh-radius); }

.mh-search__btn:hover { background: #000; }

.mh-search__btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.mh-search__panel {
	position: absolute;
	top: calc(100% + 6px);
	inset-inline: 0;
	z-index: 1040;
	max-height: 62vh;
	overflow: auto;
	padding: 6px;
	background: var(--mh-bg);
	border: 1px solid var(--mh-line);
	border-radius: var(--mh-radius);
	box-shadow: 0 14px 34px rgba(11, 13, 17, 0.14);
}

.mh-search__hit {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--mh-radius);
	color: var(--mh-ink);
	font-size: 0.92rem;
}

.mh-search__hit:hover { background: var(--mh-muted); color: var(--mh-ink); }
.mh-search__hit img { width: 36px; height: 36px; object-fit: contain; flex: none; }

.mh-search__thumb {
	width: 36px;
	height: 36px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--mh-muted);
	color: var(--mh-ink-soft);
	font-weight: 800;
	font-size: 0.8rem;
	border-radius: var(--mh-radius);
}

.mh-search__empty { padding: 10px; color: var(--mh-ink-soft); font-size: 0.9rem; }

.mh-search__more {
	display: block;
	padding: 9px;
	text-align: center;
	font-weight: 700;
	color: var(--mh-accent-deep);
	border-top: 1px solid var(--mh-line);
}

/* الأيقونات: الدخول والسلة */
.mh-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; flex: none; }

.mh-action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: var(--mh-radius);
	color: var(--mh-ink);
	font-weight: 700;
	font-size: 0.9rem;
	white-space: nowrap;
}

.mh-action:hover { background: var(--mh-muted); color: var(--mh-ink); }

.mh-action svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mh-action__icon { position: relative; display: inline-flex; }

.mh-cart-count {
	position: absolute;
	top: -7px;
	inset-inline-end: -9px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--mh-accent);
	color: var(--mh-on-accent);
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 18px;
	text-align: center;
}

.mh-cart-total { font-weight: 800; }

.mh-burger {
	display: none;
	border: 1px solid var(--mh-line);
	border-radius: var(--mh-radius);
	background: none;
	color: var(--mh-ink);
	padding: 6px 8px;
	cursor: pointer;
}

.mh-burger svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* شريط الأقسام */
.mh-nav { border-top: 1px solid var(--mh-line); }

.mh-nav__list { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; list-style: none; margin: 0; padding: 0; }

.mh-nav__link {
	display: inline-block;
	padding: 12px 14px;
	border-bottom: 2px solid transparent;
	color: var(--mh-ink);
	font-weight: 700;
	font-size: 0.92rem;
}

.mh-nav__link:hover { color: var(--mh-accent-deep); }
.mh-nav__link.is-active { border-bottom-color: var(--mh-accent); }
.mh-nav .dropdown-toggle::after { margin-inline-start: 6px; }

/* قائمة الأقسام: عمود لكل مجموعة رئيسية مع مجموعاتها الفرعية */
.dropdown-menu.mh-mega.show {
	display: grid;
	/* أربعة أعمدة ثابتة العرض: ما زاد ينزل صفاً جديداً، ولا يبقى عمود فارغ */
	grid-template-columns: repeat(4, 172px);
	gap: 6px 20px;
	padding: 14px;
}

/* اللوحة تنسدل من حافة العنصر إلى داخل الصفحة */
[dir="rtl"] .mh-mega { left: auto; right: 0; }

/* عنوان العمود: المجموعة الرئيسية */
.mh-mega__item {
	display: block;
	padding: 0.5rem 0.7rem;
	color: var(--mh-ink);
	font-weight: 800;
	font-size: 0.95rem;
}

.mh-mega__item:hover,
.mh-mega__item.is-active { color: var(--mh-accent-deep); }

/* المجموعات الفرعية تحته */
.mh-mega__list { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.mh-mega__list .dropdown-item { font-size: 0.89rem; color: var(--mh-ink-soft); }
.mh-mega__list .dropdown-item:hover { color: var(--mh-ink); }
.mh-mega__list .dropdown-item.is-active { color: var(--mh-accent-deep); background: none; }

.mh-mega__all {
	grid-column: 1 / -1;
	border-top: 1px solid var(--mh-line);
	margin-top: 4px;
	padding: 0.7rem 0.7rem 0.2rem;
	font-weight: 700;
	color: var(--mh-accent-deep);
}
.mh-nav__cta { margin-inline-start: auto; }

.dropdown-menu {
	border: 1px solid var(--mh-line);
	border-radius: var(--mh-radius);
	box-shadow: 0 8px 24px rgba(11, 13, 17, 0.08);
	padding: 0.35rem;
}

[dir="rtl"] .dropdown-menu { text-align: right; }

.dropdown-item {
	border-radius: var(--mh-radius);
	font-size: 0.92rem;
	font-weight: 500;
	padding: 0.45rem 0.7rem;
}

.dropdown-item:hover,
.dropdown-item.is-active { background: var(--mh-muted); color: var(--mh-ink); }

/* زر «سجّل كموزع» (call_to_action في Website Settings) */
.mh-nav__cta .mh-btn { font-size: 0.88rem; padding: 0.4rem 1rem; }

@media (min-width: 992px) {
	/* شريط الأقسام مفتوح دائماً على الحاسوب: ‎.collapse‎ من bootstrap يخفيه افتراضاً */
	.mh-nav__collapse { display: block !important; }
}

@media (max-width: 991px) {
	.mh-trust { display: none; }
	.mh-burger { display: inline-flex; }
	.mh-header__inner { flex-wrap: wrap; gap: 12px; }
	.mh-search { order: 3; flex-basis: 100%; max-width: none; margin-inline: 0; }
	.mh-nav__list { flex-direction: column; align-items: stretch; padding-bottom: 8px; }
	.mh-nav__link { padding: 11px 2px; border-bottom: 1px solid var(--mh-line); }
	.mh-nav__link.is-active { border-bottom-color: var(--mh-line); color: var(--mh-accent-deep); }
	/* داخل القائمة المطوية تنساب اللوائح مع العناصر بدل أن تطفو فوق الصفحة */
	.mh-nav .dropdown-menu { position: static; float: none; border: 0; box-shadow: none; padding-inline-start: 12px; }
	.dropdown-menu.mh-mega.show { grid-template-columns: 1fr; min-width: auto; padding: 4px 0 4px 12px; gap: 0; }
	.mh-mega__all { padding-inline: 0.7rem; }
	.mh-nav__cta { margin: 10px 0 4px; }
}

@media (max-width: 575px) {
	/* الشعار يصغر على الجوال ليبقى مع الأيقونات في سطر واحد، والحروف تبقى بأقصى عرضها */
	.mh-brand__name { font-size: 1.15rem; }
	.mh-brand__member { font-size: 0.55rem; }
	/* على الجوال تبقى الأيقونات وحدها ليتسع السطر للشعار: العدّاد يكفي عن المجموع */
	.mh-action > span:not(.mh-action__icon) { display: none; }
	.mh-topbar__inner { justify-content: center; }
}

/* --- الأزرار العامة ------------------------------------------------------- */
.btn { border-radius: var(--mh-radius); font-weight: 600; }

.btn-primary,
.btn-primary:not(:disabled):not(.disabled):active {
	background: var(--mh-ink);
	border-color: var(--mh-ink);
	color: #fff;
}

.btn-primary:hover { background: #000; border-color: #000; color: #fff; }

.mh-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	border-radius: var(--mh-radius);
	font-weight: 700;
	font-size: 0.98rem;
	padding: 0.7rem 1.5rem;
	border: 1px solid transparent;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.mh-btn--accent { background: var(--mh-accent); border-color: var(--mh-accent); color: var(--mh-on-accent); }
.mh-btn--accent:hover { background: var(--mh-accent-deep); border-color: var(--mh-accent-deep); color: var(--mh-on-accent); }

.mh-btn--ink { background: var(--mh-ink); border-color: var(--mh-ink); color: #fff; }
.mh-btn--ink:hover { background: #000; color: #fff; }

.mh-btn--ghost { background: transparent; border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.mh-btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; color: #fff; }

.mh-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-weight: 700;
	color: var(--mh-ink);
	border-bottom: 2px solid var(--mh-accent);
	padding-bottom: 2px;
}

.mh-link:hover { color: var(--mh-accent-deep); }

/* --- الصفحة الرئيسية ------------------------------------------------------ */
.mh-wrap {
	max-width: var(--mh-maxw);
	margin-inline: auto;
	padding-inline: 16px;
}

.mh-section { padding-block: var(--mh-section-y); }
.mh-section--muted { background: var(--mh-muted); }

.mh-section__head { margin-bottom: clamp(24px, 4vw, 44px); }

.mh-section__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
	margin: 0 0 0.4rem;
}

.mh-section__sub { color: var(--mh-ink-soft); margin: 0; font-size: 1rem; }

/* Hero */
.mh-hero {
	background: var(--mh-ink);
	color: #fff;
	position: relative;
	overflow: hidden;
	padding-block: clamp(56px, 9vw, 116px);
}

.mh-hero::after {
	content: "";
	position: absolute;
	inset-block: 0;
	inset-inline-start: -12%;
	width: 46%;
	background: repeating-linear-gradient(
		115deg,
		var(--mh-accent) 0 14px,
		transparent 14px 34px
	);
	opacity: 0.16;
	pointer-events: none;
}

.mh-hero__inner { position: relative; z-index: 1; max-width: 46rem; }

.mh-hero h1 {
	color: #fff;
	font-size: clamp(1.9rem, 5vw, 3.1rem);
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 1rem;
}

.mh-hero__lead {
	color: var(--mh-on-ink);
	font-size: clamp(1rem, 2vw, 1.22rem);
	line-height: 1.75;
	margin: 0 0 2rem;
}

.mh-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* المنتجات: سلاسل Deli الأربع — شعار السلسلة ولونها وصورة صفّ أدواتها */
.mh-series {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--mh-gap);
}

.mh-series__card {
	--tone: var(--mh-ink);
	--tone-ink: var(--mh-ink);
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 40%;
	overflow: hidden;
	border: 1px solid var(--mh-line);
	border-radius: 16px;
	background: var(--mh-bg);
	color: var(--mh-ink);
	transition: transform 200ms, box-shadow 200ms, border-color 200ms;
}

/* شريط لون السلسلة أعلى البطاقة */
.mh-series__card::before {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline: 0;
	height: 4px;
	background: var(--tone);
	z-index: 1;
}

.mh-series__card:hover {
	transform: translateY(-4px);
	border-color: var(--tone);
	box-shadow: 0 18px 40px rgba(11, 13, 17, 0.14);
	color: var(--mh-ink);
}

/* ألوان Deli الرسمية؛ ‎--tone-ink‎ نسخة داكنة تُقرأ على الأبيض */
.mh-series__card--red { --tone: #c1123c; --tone-ink: #a30f33; }
.mh-series__card--yellow { --tone: #f2c200; --tone-ink: #8a6f00; }
.mh-series__card--home { --tone: #f08a3c; --tone-ink: #b4601c; }
.mh-series__card--garden { --tone: #7ab648; --tone-ink: #4c7c22; }

.mh-series__media { overflow: hidden; background: var(--mh-muted); }

.mh-series__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 600ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.mh-series__card:hover .mh-series__media img { transform: scale(1.07); }

.mh-series__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 26px 22px 22px;
}

.mh-series__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 0.2rem; }

/* شعار «home Series» أعرض من شارات deli، فيُقيَّد عرضه ليتساوى الصف */
.mh-series__logo { height: 24px; width: auto; max-width: 118px; object-fit: contain; display: block; }

.mh-series__tag {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--mh-muted);
	color: var(--mh-ink-soft);
	font-size: 0.75rem;
	font-weight: 800;
}

.mh-series__title { font-size: 1.24rem; font-weight: 800; line-height: 1.3; }

.mh-series__text { color: var(--mh-ink-soft); line-height: 1.85; font-size: 0.94rem; }

.mh-series__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 0.7rem;
	color: var(--tone-ink);
	font-weight: 800;
	font-size: 0.94rem;
}

.mh-series__more svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 200ms;
}

[dir="rtl"] .mh-series__more svg { transform: scaleX(-1); }
[dir="rtl"] .mh-series__card:hover .mh-series__more svg { transform: scaleX(-1) translateX(4px); }
.mh-series__card:hover .mh-series__more svg { transform: translateX(4px); }

@media (max-width: 991px) {
	.mh-series { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
}

/* بطاقات الأقسام في الصفحة الرئيسية */
/* شريط البطاقات: تمرير أفقي بتثبيت CSS، بلا مكتبة ولا JavaScript للحركة نفسها */
.mh-carousel { position: relative; }

.mh-tiles {
	display: flex;
	gap: var(--mh-gap);
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	/* متّسع لارتفاع البطاقة عند المرور فوقها ولظل التركيز */
	padding: 6px 4px 10px;
	margin-inline: -4px;
}

.mh-tiles::-webkit-scrollbar { display: none; }
.mh-tiles:focus-visible { outline: 2px solid var(--mh-accent); outline-offset: 2px; }

.mh-tile { flex: 0 0 clamp(228px, 24%, 300px); scroll-snap-align: start; }

.mh-carousel__nav {
	position: absolute;
	top: 34%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--mh-line);
	border-radius: 50%;
	background: var(--mh-bg);
	color: var(--mh-ink);
	box-shadow: 0 6px 18px rgba(11, 13, 17, 0.12);
	cursor: pointer;
	transition: background 160ms, color 160ms, transform 160ms;
}

.mh-carousel__nav:hover { background: var(--mh-accent); border-color: var(--mh-accent); color: var(--mh-on-accent); }
.mh-carousel__nav:active { transform: scale(0.94); }
.mh-carousel__nav[hidden] { display: none; }
.mh-carousel__nav--prev { inset-inline-start: -14px; }
.mh-carousel__nav--next { inset-inline-end: -14px; }

.mh-carousel__nav svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* السهم يتبع اتجاه الكتابة */
[dir="rtl"] .mh-carousel__nav svg { transform: scaleX(-1); }

.mh-tile {
	display: flex;
	flex-direction: column;
	padding: 10px;
	background: var(--mh-bg);
	border: 1px solid var(--mh-line);
	border-radius: 14px;
	color: var(--mh-ink);
	box-shadow: 0 1px 2px rgba(11, 13, 17, 0.04);
	transition: transform 160ms, box-shadow 160ms, border-color 160ms;
}

.mh-tile:hover {
	transform: translateY(-3px);
	border-color: var(--mh-line-strong);
	box-shadow: 0 14px 34px rgba(11, 13, 17, 0.12);
	color: var(--mh-ink);
}

.mh-tile__media {
	display: block;
	aspect-ratio: 16 / 11;
	border-radius: 10px;
	overflow: hidden;
	background: var(--mh-muted);
}

.mh-tile__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 520ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.mh-tile:hover .mh-tile__media img { transform: scale(1.06); }

.mh-tile__media--blank {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--mh-ink-soft);
	font-weight: 800;
	font-size: 1.8rem;
}

.mh-tile__body {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 10px 10px;
}

.mh-tile__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.mh-tile__title { font-size: 1.05rem; font-weight: 800; line-height: 1.35; }

.mh-tile__sub { color: var(--mh-ink-soft); font-size: 0.88rem; line-height: 1.6; }

.mh-tile__go {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--mh-muted);
	color: var(--mh-ink);
	transition: background 160ms, color 160ms;
}

.mh-tile__go svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* السهم يشير إلى خارج الصفحة: يُعكس مع اتجاه الكتابة */
[dir="rtl"] .mh-tile__go svg { transform: scaleX(-1); }

.mh-tile:hover .mh-tile__go { background: var(--mh-accent); color: var(--mh-on-accent); }

/* دخول البطاقات: لا تُخفى إلا إذا كان JavaScript يعمل (الصنف mh-motion على <html>)
   ليظهر كل شيء لو تعطّل، وتُلغى الحركة لمن يطلب تقليلها في نظامه. */
@media (prefers-reduced-motion: no-preference) {
	.mh-motion .mh-carousel .mh-tile { opacity: 0; transform: translateY(16px); }

	.mh-motion .mh-carousel.is-in .mh-tile {
		animation: mh-tile-in 560ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
	}

	.mh-motion .mh-carousel.is-in .mh-tile:nth-child(2) { animation-delay: 90ms; }
	.mh-motion .mh-carousel.is-in .mh-tile:nth-child(3) { animation-delay: 180ms; }
	.mh-motion .mh-carousel.is-in .mh-tile:nth-child(4) { animation-delay: 270ms; }
	.mh-motion .mh-carousel.is-in .mh-tile:nth-child(5) { animation-delay: 360ms; }
	.mh-motion .mh-carousel.is-in .mh-tile:nth-child(n + 6) { animation-delay: 430ms; }
}

@keyframes mh-tile-in {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

/* منصات البطارية */
.mh-platforms__strip {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 1.5rem;
}

.mh-chip {
	flex: 1 1 140px;
	background: var(--mh-bg);
	border: 1px solid var(--mh-line);
	border-radius: var(--mh-radius);
	padding: 1.1rem 1rem;
	text-align: center;
	font-family: "Archivo", sans-serif;
	font-weight: 800;
	font-size: 1.35rem;
	letter-spacing: 0.02em;
	color: var(--mh-ink);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.mh-chip:hover { border-color: var(--mh-accent); background: #fff; color: var(--mh-ink); }

.mh-chip small {
	display: block;
	font-family: var(--mh-font);
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--mh-ink-soft);
	letter-spacing: 0;
	margin-top: 0.25rem;
}

/* لماذا HOUSE MAS */
.mh-why__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }

.mh-why__item svg { width: 40px; height: 40px; color: var(--mh-accent); margin-bottom: 0.9rem; }

.mh-why__title { font-size: 1.12rem; font-weight: 800; margin: 0 0 0.45rem; }

.mh-why__text { color: var(--mh-ink-soft); line-height: 1.8; margin: 0; }

/* دعوة الموزعين */
.mh-join { background: var(--mh-accent); color: var(--mh-on-accent); }

.mh-join__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.mh-join__title { font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 800; margin: 0 0 0.35rem; color: var(--mh-on-accent); }

.mh-join__text { margin: 0; color: rgba(11, 13, 17, 0.78); line-height: 1.7; }

/* --- صفحات webshop: بطاقات منتجات نظيفة ---------------------------------- */
.item-card .card,
.product-container {
	background: var(--mh-bg);
	border: 1px solid var(--mh-line);
	border-radius: var(--mh-radius);
	box-shadow: none;
	transition: border-color 0.15s ease;
}

.item-card .card { height: 100%; }
.item-card .card:hover { border-color: var(--mh-line-strong); }

.card-img-container, .no-image {
	background: var(--mh-muted);
	border-radius: 0;
	color: var(--mh-ink-soft);
}

.card-img-top.no-image { font-weight: 700; }

.product-title { color: var(--mh-ink); font-weight: 600; }
.product-category { color: var(--mh-ink-soft); font-size: 0.82rem; }
.product-price { color: var(--mh-ink); font-weight: 700; }

.product-info-green { color: #14713d; font-weight: 600; }
.out-of-stock { color: #9b2c2c; font-weight: 600; }

[dir="rtl"] .card.text-left,
[dir="rtl"] .card-body.text-left,
[dir="rtl"] .product-container .text-left { text-align: right !important; }

body.product-page { background: var(--mh-bg); }

/* بطاقة فارغة أسفل صفحة الصنف (مواصفات/محتوى/مراجعات غير مفعّلة) */
/* (:has لا يتداخل، فالشرطان متجاوران) */
.product-container:has(.product-page-content):not(:has(.product-page-content *)) { display: none; }

/* شرائح المجموعات الفرعية أعلى صفحة المجموعة */
.scroll-categories .category-pill {
	background: var(--mh-muted);
	color: var(--mh-ink);
	border: 1px solid var(--mh-line);
	border-radius: var(--mh-radius);
	font-weight: 600;
}

.scroll-categories a:hover > .category-pill { border-color: var(--mh-accent); color: var(--mh-ink); }

/* أزرار تبديل العرض (قائمة/شبكة) — قاعدة webshop مربوطة بالمعرّف #toggle-view */
#toggle-view .btn {
	background: var(--mh-bg);
	border: 1px solid var(--mh-line);
	box-shadow: none;
}

#toggle-view .btn .icon { stroke: var(--mh-ink-soft); }

#toggle-view .btn-primary {
	background: var(--mh-ink);
	border-color: var(--mh-ink);
	box-shadow: none;
}

#toggle-view .btn-primary .icon { stroke: #fff; }

/* عرض القائمة: إطار الصورة */
.list-row .list-image { border-color: var(--mh-line) !important; border-radius: var(--mh-radius) !important; overflow: hidden; }
.no-image-list { background: var(--mh-muted); color: var(--mh-ink-soft); font-weight: 700; }

/* فلاتر وقوائم المنتجات */
.filter-block, .filter-lookup-wrapper, .cart-container .cart-items-header {
	border-color: var(--mh-line);
}

.page_content .breadcrumb-container, .page-breadcrumbs { padding-top: 1rem; }

/* --- نموذج الويب --------------------------------------------------------- */
.web-form-wrapper .form-control,
.page_content .form-control {
	border: 1px solid var(--mh-line);
	border-radius: var(--mh-radius);
	background: var(--mh-bg);
	color: var(--mh-ink);
	min-height: 40px;
}

.web-form-wrapper .form-control:focus,
.page_content .form-control:focus {
	border-color: var(--mh-ink);
	box-shadow: 0 0 0 2px rgba(11, 13, 17, 0.08);
}

.web-form-wrapper .control-label,
.page_content .control-label {
	font-weight: 600;
	color: var(--mh-ink);
	margin-bottom: 0.3rem;
}

.web-form .submit-btn,
.web-form .submit-btn:not(:disabled):not(.disabled):active {
	background: var(--mh-accent);
	border-color: var(--mh-accent);
	color: var(--mh-on-accent);
	font-weight: 700;
}

.web-form .submit-btn:hover { background: var(--mh-accent-deep); border-color: var(--mh-accent-deep); color: var(--mh-on-accent); }

/* --- التذييل -------------------------------------------------------------- */
.web-footer {
	background: var(--mh-ink);
	color: var(--mh-on-ink-soft);
	margin-top: 0;
	padding-block: clamp(40px, 6vw, 64px) 24px;
	flex-shrink: 0;
	border-top: 0;
}

.web-footer .container { max-width: var(--mh-maxw); }

.web-footer a, .web-footer .footer-link { color: var(--mh-on-ink-soft); }
.web-footer a:hover, .web-footer .footer-link:hover { color: #fff; }

.web-footer .footer-group-label {
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	margin-bottom: 0.9rem;
}

.web-footer .footer-group-links { max-height: none; flex-wrap: nowrap; }
.web-footer .footer-group-links li { margin-bottom: 0.5rem; font-size: 0.92rem; }

/* أربعة أعمدة متساوية بدل توزيع Bootstrap الافتراضي (col-sm-2 لكل مجموعة) */
.web-footer .footer-grouped-links .footer-group {
	flex: 0 0 25%;
	max-width: 25%;
	margin-bottom: 1.5rem;
}

.web-footer .footer-info {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	font-size: 0.86rem;
	color: var(--mh-on-ink-soft);
}

.web-footer .footer-powered { color: var(--mh-on-ink-soft); }
[dir="rtl"] .web-footer .footer-col-right { text-align: left; }

/* --- الشاشات الصغيرة ------------------------------------------------------ */
@media (max-width: 991px) {
	.web-footer .footer-grouped-links .footer-group { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 767px) {
	/* البطاقة تنقلب إلى طابقين: الصورة فوق والنص تحتها */
	.mh-series__card { grid-template-columns: 1fr; }
	.mh-series__media { aspect-ratio: 16 / 9; }
	.mh-line { grid-template-columns: 1fr; }
	.mh-why__grid { grid-template-columns: 1fr; }
	.mh-join__inner { flex-direction: column; align-items: flex-start; }
	.mh-chip { flex: 1 1 calc(50% - 12px); }
	/* عرض القائمة في webshop: col-2 للصورة يضيق إلى شريط على الجوال */
	.list-row .list-image { flex: 0 0 96px; max-width: 96px; padding: 0; }
	.list-row .list-image + [class*="col-"] { flex: 1 1 0; max-width: none; }
}

/* --- السلة والدفع والحساب --------------------------------------------- */

.mh-toast {
	position: fixed;
	inset-block-end: 20px;
	inset-inline-start: 20px;
	z-index: 1090;
	background: var(--mh-ink);
	color: #fff;
	padding: 12px 18px;
	border-radius: var(--mh-radius);
	box-shadow: 0 12px 30px rgba(11, 13, 17, 0.25);
	display: none;
}

.mh-toast.is-open { display: block; }
.mh-toast a { color: var(--mh-accent); font-weight: 700; margin-inline-start: 0.4rem; }

/* حقول النماذج */
.mh-field { display: block; margin-bottom: 0.85rem; }

.mh-field__label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.3rem; }

.mh-field__input {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--mh-line-strong);
	border-radius: var(--mh-radius);
	background: var(--mh-bg);
	color: var(--mh-ink);
	font-family: inherit;
	font-size: 0.97rem;
}

.mh-field__input:focus { outline: 2px solid var(--mh-accent); outline-offset: 1px; border-color: var(--mh-accent); }

.mh-field__hint { display: block; color: var(--mh-ink-soft); font-size: 0.82rem; margin-top: 0.25rem; }

.mh-radio,
.mh-check { display: inline-flex; align-items: center; gap: 0.4rem; margin-inline-end: 1.2rem; font-weight: 600; }

.mh-error:not(:empty) {
	color: #b3261e;
	background: rgba(179, 38, 30, 0.08);
	border-radius: var(--mh-radius);
	padding: 8px 12px;
	margin: 0 0 0.75rem;
}

/* زر بحدّ على خلفية فاتحة (‎--ghost‎ أبيض، وهو للهيرو الداكن وحده) */
.mh-btn--line { background: transparent; border-color: var(--mh-line-strong); color: var(--mh-ink); }
.mh-btn--line:hover { border-color: var(--mh-ink); background: var(--mh-muted); color: var(--mh-ink); }

.mh-btn.is-disabled { opacity: 0.5; pointer-events: none; }

/* صفحتا السلة والدفع: عمود الأسطر + بطاقة الملخّص */
.mh-cart,
.mh-checkout,
.mh-account,
.mh-auth { padding-block: clamp(28px, 5vw, 56px); }

.mh-cart__grid,
.mh-checkout__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px;
	align-items: start;
	gap: clamp(20px, 3vw, 36px);
}

.mh-cart__summary,
.mh-checkout__summary {
	position: sticky;
	top: 90px;
	background: var(--mh-muted);
	border-radius: var(--mh-radius);
	padding: 20px;
}

.mh-cart__summary-title { font-size: 1.05rem; font-weight: 800; margin: 0 0 1rem; }

.mh-sum { display: flex; justify-content: space-between; gap: 12px; padding-block: 7px; }
.mh-sum--save { color: var(--mh-accent-deep); font-weight: 700; }
.mh-sum--total {
	border-top: 1px solid var(--mh-line-strong);
	margin-top: 8px;
	padding-top: 12px;
	font-size: 1.12rem;
	font-weight: 800;
}

.mh-cart__hint { color: var(--mh-ink-soft); font-size: 0.85rem; margin: 0.9rem 0 1rem; }
.mh-cart__grid .mh-btn { display: block; width: 100%; text-align: center; }
.mh-cart__checkout { margin-bottom: 8px; }

/* سطر الصنف في السلة */
.mh-cart__row {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr) auto auto 28px;
	grid-template-areas: "media body qty amount remove";
	align-items: center;
	gap: 14px;
	padding-block: 16px;
	border-bottom: 1px solid var(--mh-line);
}

.mh-cart__thumb { grid-area: media; }
.mh-cart__info { grid-area: body; }
.mh-cart__qty { grid-area: qty; }
.mh-cart__amount { grid-area: amount; }
.mh-cart__remove { grid-area: remove; }

.mh-cart__row:first-child { border-top: 1px solid var(--mh-line); }

.mh-cart__thumb {
	display: block;
	width: 76px;
	height: 76px;
	border: 1px solid var(--mh-line);
	border-radius: var(--mh-radius);
	background: #fff;
	overflow: hidden;
}

.mh-cart__thumb img { width: 100%; height: 100%; object-fit: contain; }

/* بلا صورة: أول حرفين من اسم الصنف، كما يفعل webshop في بطاقاته */
.mh-cart__thumb--blank {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--mh-muted);
	color: var(--mh-ink-soft);
	font-weight: 800;
	font-size: 1.1rem;
}

.mh-cart__name { display: block; font-weight: 700; color: var(--mh-ink); }
.mh-cart__name:hover { color: var(--mh-accent-deep); }
.mh-cart__unit { color: var(--mh-ink-soft); font-size: 0.88rem; margin: 0.25rem 0 0; }
.mh-was { text-decoration: line-through; margin-inline-end: 8px; }
.mh-money { white-space: nowrap; unicode-bidi: isolate; }

.mh-cart__row--off .mh-cart__unit { color: #b3261e; }

.mh-cart__qty { display: inline-flex; align-items: center; gap: 6px; }

.mh-qty {
	width: 30px;
	height: 30px;
	border: 1px solid var(--mh-line-strong);
	border-radius: var(--mh-radius);
	background: var(--mh-bg);
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
}

.mh-qty:hover { border-color: var(--mh-accent); }

.mh-qty__input {
	width: 3.4rem;
	height: 30px;
	padding: 0 4px;
	border: 1px solid var(--mh-line-strong);
	border-radius: var(--mh-radius);
	background: var(--mh-bg);
	color: var(--mh-ink);
	font: inherit;
	font-weight: 700;
	text-align: center;
}

.mh-cart__amount { font-weight: 800; white-space: nowrap; }

.mh-cart__remove {
	border: 0;
	background: none;
	color: var(--mh-ink-soft);
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
}

.mh-cart__remove:hover { color: #b3261e; }

/* صفحة الدفع */
.mh-checkout__heading { font-size: 1.1rem; font-weight: 800; margin: 1.6rem 0 0.9rem; }
.mh-checkout__form > .mh-checkout__heading:first-child { margin-top: 0; }

.mh-checkout__line {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding-block: 6px;
	font-size: 0.92rem;
}

.mh-checkout__line-amount { white-space: nowrap; }
.mh-sum strong { white-space: nowrap; }

.mh-checkout__lines { border-bottom: 1px solid var(--mh-line-strong); padding-bottom: 8px; margin-bottom: 8px; }
.mh-checkout__back { display: inline-block; margin-top: 1rem; font-weight: 700; }
.mh-checkout__account { border-top: 1px solid var(--mh-line); margin-top: 1.4rem; padding-top: 0.4rem; }
.mh-checkout__account-fields { margin-top: 0.9rem; }
.mh-checkout__submit { margin-top: 1.2rem; }
.mh-checkout__done p { line-height: 1.9; }

/* حساب المتجر: التسجيل و«حسابي» */
.mh-auth { max-width: 480px; }
.mh-auth__lead { color: var(--mh-ink-soft); margin-bottom: 1.4rem; }
.mh-auth__alt { margin-top: 1rem; font-size: 0.9rem; }

.mh-account { max-width: 860px; }
.mh-account__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.mh-account__logout-form { margin: 0; }
.mh-account__logout {
	font: inherit;
	font-weight: 700;
	color: var(--mh-ink-soft);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}
.mh-account__logout:hover { color: #b3261e; }

.mh-account__card {
	background: var(--mh-muted);
	border-radius: var(--mh-radius);
	padding: 20px;
	margin-top: 18px;
}

.mh-account__card--accent { background: rgba(218, 137, 26, 0.12); }
.mh-account__title { font-size: 1.05rem; font-weight: 800; margin: 0 0 0.9rem; }
.mh-account__card p { margin-bottom: 0.9rem; }

.mh-account__facts { display: grid; gap: 6px; margin: 0; }
.mh-account__facts > div { display: flex; gap: 10px; }
.mh-account__facts dt { min-width: 5.5rem; color: var(--mh-ink-soft); font-weight: 600; }
.mh-account__facts dd { margin: 0; font-weight: 700; }

.mh-order { background: var(--mh-bg); border-radius: var(--mh-radius); padding: 14px 16px; margin-bottom: 12px; }
.mh-order:last-child { margin-bottom: 0; }

.mh-order__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 16px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--mh-line);
}

.mh-order__id { font-weight: 800; }
.mh-order__date { color: var(--mh-ink-soft); font-size: 0.88rem; }

.mh-order__state {
	background: var(--mh-muted);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 0.82rem;
	font-weight: 700;
}

.mh-order__total { margin-inline-start: auto; }

.mh-order__items { list-style: none; margin: 8px 0 0; padding: 0; }
.mh-order__items li { display: flex; justify-content: space-between; gap: 12px; padding-block: 3px; font-size: 0.9rem; }

.mh-signup-link { margin-top: 1rem; text-align: center; }

@media (max-width: 991px) {
	.mh-cart__grid,
	.mh-checkout__grid { grid-template-columns: minmax(0, 1fr); }
	.mh-cart__summary,
	.mh-checkout__summary { position: static; }
	/* على الجوال يُراجَع الملخّص قبل تعبئة النموذج، كما في المتاجر المعتادة */
	.mh-checkout__summary { order: -1; }
	.mh-checkout__grid { display: flex; flex-direction: column; }
}

@media (max-width: 575px) {
	.mh-cart__row {
		grid-template-columns: 60px minmax(0, 1fr) auto;
		grid-template-areas:
			"media body   remove"
			"media qty    amount";
		align-items: start;
		row-gap: 10px;
		column-gap: 10px;
	}
	.mh-cart__thumb { width: 60px; height: 60px; align-self: start; }
	.mh-cart__qty,
	.mh-cart__amount { align-self: center; }
	.mh-cart__amount { text-align: end; }
	.mh-account__head { flex-direction: column; gap: 4px; }
}

/* صفحة الخطأ العربية (نطاق المتجر) */
.mh-error { text-align: center; padding: 64px 0 80px; }
.mh-error__code { font-family: Archivo, system-ui, sans-serif; font-size: 3.5rem; font-weight: 800;
	color: var(--mh-accent); margin: 0 0 4px; line-height: 1; }
.mh-error__title { font-size: 1.6rem; font-weight: 800; margin: 0 0 10px; }
.mh-error__text { color: var(--mh-ink-soft); margin: 0 auto 28px; max-width: 46ch; }
.mh-error__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 600px) { .mh-error { padding: 40px 0 56px; } .mh-error__code { font-size: 2.6rem; } }
