/* منتج مهاد – Mehad Product */
.mp-app {
	--mp-walnut: #3a2618;
	--mp-brown: #6b4a30;
	--mp-gold: #b88a3e;
	--mp-gold-soft: #e9d6ac;
	--mp-beige: #eadfcb;
	--mp-paper: #fbf8f2;
	--mp-ink: #2b2119;
	--mp-muted: #7d6b5b;
	--mp-line: #e2d5bf;
	--mp-ok: #56693a;
	--mp-warn: #a26a1b;
	--mp-err: #9a3a2a;
	font-family: "IBM Plex Sans Arabic", Tahoma, "Segoe UI", sans-serif;
	color: var(--mp-ink);
	direction: rtl;
	text-align: right;
	max-width: 1180px;
	margin: 0 auto;
	padding: 8px 0 48px;
	font-size: 15px;
	line-height: 1.7;
}
.mp-app *, .mp-app *::before, .mp-app *::after { box-sizing: border-box; }
.mp-wrap-admin { margin-top: 16px; }
.mp-app a { color: var(--mp-brown); }
.mp-app h2, .mp-app h3, .mp-app h4 { font-family: inherit; color: var(--mp-walnut); margin: 0; }
.mp-muted { color: var(--mp-muted); }
.mp-app .num { font-variant-numeric: tabular-nums; direction: ltr; text-align: left; white-space: nowrap; }

/* ---------- الرأس ---------- */
.mp-top {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	background: var(--mp-walnut);
	color: var(--mp-beige);
	border-radius: 14px;
	padding: 14px 18px;
	margin-bottom: 18px;
}
.mp-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit !important; }
.mp-brand strong { display: block; font-size: 20px; color: #fff; line-height: 1.3; }
.mp-brand small { color: var(--mp-gold-soft); font-size: 13px; }
.mp-brand-mark {
	width: 44px; height: 44px; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--mp-gold); color: var(--mp-walnut);
	font-weight: 700; font-size: 22px;
}
.mp-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- أزرار ---------- */
.mp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 42px; padding: 8px 18px;
	border-radius: 10px; border: 1px solid transparent;
	font: inherit; font-weight: 600; font-size: 14px;
	cursor: pointer; text-decoration: none !important;
	transition: background-color .15s, border-color .15s;
}
.mp-btn:focus-visible, .mp-app input:focus-visible, .mp-app textarea:focus-visible, .mp-app select:focus-visible, .mp-tab:focus-visible, .mp-card:focus-visible {
	outline: 3px solid var(--mp-gold); outline-offset: 2px;
}
.mp-btn-primary { background: var(--mp-brown); color: #fff !important; }
.mp-btn-primary:hover { background: var(--mp-walnut); }
.mp-btn-gold { background: var(--mp-gold); color: var(--mp-walnut) !important; }
.mp-btn-gold:hover { background: #c99a4d; }
.mp-btn-ghost { background: transparent; border-color: var(--mp-line); color: var(--mp-brown) !important; }
.mp-top .mp-btn-ghost { border-color: rgba(233, 214, 172, .4); color: var(--mp-beige) !important; }
.mp-btn-ghost:hover { border-color: var(--mp-gold); }
.mp-btn-danger { background: transparent; border-color: #d9b3aa; color: var(--mp-err) !important; }
.mp-btn-danger:hover { background: #f6e6e2; }
.mp-icon-btn { border: 0; background: none; color: var(--mp-err); font-size: 20px; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; }
.mp-icon-btn:hover { background: #f6e6e2; }
.mp-link-danger { border: 0; background: none; color: var(--mp-err); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.mp-admin-delete { margin-top: 18px; }

/* ---------- تنبيهات ---------- */
.mp-notice { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; border-inline-start: 4px solid; }
.mp-notice-ok { background: #eef2e6; border-color: var(--mp-ok); }
.mp-notice-warn { background: #f8eedc; border-color: var(--mp-warn); }
.mp-notice-err { background: #f6e6e2; border-color: var(--mp-err); }
.mp-callout { background: var(--mp-paper); border: 1px dashed var(--mp-gold); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.mp-callout p { margin: 0 0 6px; }
.mp-callout .mp-btn { margin-top: 6px; }
.mp-callout-rejected { border-color: var(--mp-err); background: #fbf1ee; }
.mp-callout-returned { border-color: var(--mp-warn); background: #fbf5ea; }

/* ---------- شريط الأدوات ---------- */
.mp-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mp-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--mp-beige); padding: 4px; border-radius: 12px; }
.mp-tab { padding: 7px 14px; border-radius: 9px; text-decoration: none; color: var(--mp-brown) !important; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.mp-tab.is-active { background: #fff; color: var(--mp-walnut) !important; box-shadow: 0 1px 2px rgba(58, 38, 24, .12); }
.mp-count { background: var(--mp-gold); color: var(--mp-walnut); border-radius: 999px; font-size: 12px; min-width: 22px; padding: 0 7px; text-align: center; font-weight: 700; line-height: 22px; }
.mp-search input { min-width: 240px; }

/* ---------- حقول ---------- */
.mp-app input[type=text], .mp-app input[type=search], .mp-app select, .mp-app textarea {
	width: 100%; font: inherit; color: var(--mp-ink);
	background: #fff; border: 1px solid var(--mp-line); border-radius: 9px;
	padding: 9px 12px; min-height: 42px; box-shadow: none; max-width: none;
}
.mp-app textarea { line-height: 1.7; resize: vertical; }
.mp-app input:focus, .mp-app textarea:focus, .mp-app select:focus { border-color: var(--mp-gold); box-shadow: none; }
.mp-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.mp-fields-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 16px 0; }
.mp-span-2 { grid-column: 1 / -1; }
.mp-field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 14px; color: var(--mp-walnut); }
.mp-suffix { display: flex; align-items: center; border: 1px solid var(--mp-line); border-radius: 9px; background: #fff; }
.mp-suffix input { border: 0 !important; }
.mp-suffix em { font-style: normal; color: var(--mp-muted); padding: 0 10px; font-size: 13px; white-space: nowrap; }
.mp-value { font-weight: 600; font-size: 16px; color: var(--mp-ink); }
.mp-in-sm { min-width: 80px; }
.mp-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.mp-drop { display: block; border: 1.5px dashed var(--mp-gold); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; background: var(--mp-paper); margin-top: 10px; }
.mp-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mp-drop:focus-within { outline: 3px solid var(--mp-gold); outline-offset: 2px; }
.mp-drop span { color: var(--mp-brown); font-weight: 600; }

/* ---------- لوحات ---------- */
.mp-h2 { font-size: 24px; margin: 4px 0 6px; line-height: 1.4; }
.mp-back { display: inline-block; margin-bottom: 10px; font-size: 14px; text-decoration: none; }
.mp-back::before { content: "‹ "; }
.mp-panel { background: #fff; border: 1px solid var(--mp-line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.mp-panel > h3 { font-size: 17px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--mp-line); display: flex; align-items: center; gap: 8px; }
.mp-panel.is-current { border: 2px solid var(--mp-gold); background: linear-gradient(var(--mp-paper), #fff 180px); }
.mp-panel.is-current > h3::after { content: "مرحلتك الآن"; font-size: 12px; font-weight: 600; background: var(--mp-gold); color: var(--mp-walnut); padding: 1px 10px; border-radius: 999px; margin-inline-start: auto; }
.mp-decide { background: var(--mp-paper); }
.mp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mp-dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 0; }
.mp-dl dt { color: var(--mp-muted); font-weight: 500; }
.mp-dl dd { margin: 0; }
.mp-empty { text-align: center; padding: 48px 20px; background: var(--mp-paper); border-radius: 14px; border: 1px solid var(--mp-line); }
.mp-empty p { font-size: 16px; margin: 0 0 14px; }

/* ---------- بطاقات ---------- */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mp-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--mp-line); border-radius: 14px; overflow: hidden; text-decoration: none !important; color: inherit !important; }
.mp-card:hover { border-color: var(--mp-gold); }
.mp-card-img { aspect-ratio: 4 / 3; background: var(--mp-beige); }
.mp-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-card-img.is-empty { display: grid; place-items: center; color: var(--mp-muted); font-size: 13px; }
.mp-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mp-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mp-card h3 { font-size: 16px; line-height: 1.5; }
.mp-card p { margin: 0; font-size: 13px; }
.mp-card-prices { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--mp-line); flex-wrap: wrap; }
.mp-code { font-size: 12px; color: var(--mp-muted); direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.mp-mini-steps { display: flex; gap: 3px; }
.mp-mini-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--mp-beige); }
.mp-mini-steps i.done { background: var(--mp-brown); }
.mp-mini-steps i.now { background: var(--mp-gold); }

/* ---------- الشارات ---------- */
.mp-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--mp-beige); color: var(--mp-brown); white-space: nowrap; }
.mp-badge-approved { background: #e4ebd8; color: var(--mp-ok); }
.mp-badge-rejected { background: #f3dcd6; color: var(--mp-err); }
.mp-badge-returned, .mp-badge-draft { background: #f4e7cf; color: var(--mp-warn); }
.mp-badge-final_review { background: var(--mp-gold-soft); color: var(--mp-walnut); }

/* ---------- العرض ---------- */
.mp-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.mp-hero p { margin: 0; }

/* مسار الطلب: سكة خشبية بمفاصل ذهبية */
.mp-stepper { list-style: none; margin: 18px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; counter-reset: none; }
.mp-stepper::before { content: ""; position: absolute; top: 19px; inset-inline: 8%; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, #d8c6a6 0 22px, #cfbb98 22px 24px); }
.mp-stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; z-index: 1; }
.mp-node { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #fff; border: 2px solid #d8c6a6; color: var(--mp-muted); }
.mp-step-label { font-size: 13px; color: var(--mp-muted); line-height: 1.4; }
.mp-stepper li.done .mp-node { background: var(--mp-brown); border-color: var(--mp-brown); color: var(--mp-gold-soft); }
.mp-stepper li.done .mp-step-label { color: var(--mp-brown); }
.mp-stepper li.now .mp-node { background: var(--mp-gold); border-color: var(--mp-walnut); color: var(--mp-walnut); box-shadow: 0 0 0 5px rgba(184, 138, 62, .25); }
.mp-stepper li.now .mp-step-label { color: var(--mp-walnut); font-weight: 700; }
.mp-stepper li.stopped .mp-node { background: var(--mp-err); border-color: var(--mp-err); color: #fff; }
.mp-stepper li.stopped .mp-step-label { color: var(--mp-err); font-weight: 700; }

.mp-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mp-figures > div { background: var(--mp-paper); border: 1px solid var(--mp-line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.mp-figures span { font-size: 13px; color: var(--mp-muted); }
.mp-figures b { font-size: 20px; color: var(--mp-walnut); font-variant-numeric: tabular-nums; }
.mp-figures .is-final { background: var(--mp-walnut); border-color: var(--mp-walnut); }
.mp-figures .is-final span { color: var(--mp-gold-soft); }
.mp-figures .is-final b { color: #fff; }

.mp-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.mp-gallery img { width: 160px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--mp-line); display: block; }
.mp-gallery.is-editable img { width: 110px; height: 90px; }
.mp-thumb { display: flex; flex-direction: column; gap: 4px; font-size: 12px; align-items: center; }

/* ---------- الجداول ---------- */
.mp-table-wrap { overflow-x: auto; border: 1px solid var(--mp-line); border-radius: 12px; margin-bottom: 12px; }
.mp-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
.mp-table th { background: var(--mp-beige); color: var(--mp-walnut); font-weight: 600; text-align: right; padding: 9px 10px; white-space: nowrap; }
.mp-table td { padding: 7px 10px; border-top: 1px solid var(--mp-line); vertical-align: middle; }
.mp-table td input, .mp-table td select { min-height: 36px; padding: 6px 8px; }
.mp-table .is-up { color: var(--mp-err); }
.mp-table .is-down { color: var(--mp-ok); }

.mp-sum { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--mp-line); border-radius: 12px; overflow: hidden; margin-top: 14px; }
.mp-sum > div { flex: 1 1 140px; padding: 10px 14px; display: flex; flex-direction: column; border-inline-start: 1px solid var(--mp-line); }
.mp-sum > div:first-child { border-inline-start: 0; }
.mp-sum span { font-size: 12px; color: var(--mp-muted); }
.mp-sum b { font-variant-numeric: tabular-nums; font-size: 16px; }
.mp-sum .is-total { background: var(--mp-brown); }
.mp-sum .is-total span { color: var(--mp-gold-soft); }
.mp-sum .is-total b { color: #fff; font-size: 19px; }

.mp-files { margin-top: 14px; }
.mp-files h4 { font-size: 15px; margin-bottom: 6px; }
.mp-files ul { margin: 0; padding: 0 18px 0 0; }
.mp-files li { margin-bottom: 4px; display: flex; gap: 12px; align-items: center; }

.mp-margin { background: var(--mp-paper); border: 1px solid var(--mp-line); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; }
.mp-margin span { font-size: 13px; color: var(--mp-muted); }
.mp-margin b { font-size: 22px; font-variant-numeric: tabular-nums; }
.mp-margin b.is-neg { color: var(--mp-err); }
.mp-margin small { color: var(--mp-muted); }

/* ---------- السجل ---------- */
.mp-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.mp-timeline li { position: relative; padding: 0 22px 14px 0; border-inline-start: 2px solid var(--mp-beige); margin-inline-start: 6px; }
.mp-timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--mp-gold); border: 2px solid #fff; }
.mp-timeline li.mp-tl-rejected::before { background: var(--mp-err); }
.mp-timeline li.mp-tl-returned::before { background: var(--mp-warn); }
.mp-timeline li.mp-tl-final_approved::before { background: var(--mp-ok); }
.mp-tl-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.mp-tl-head time { font-size: 12px; color: var(--mp-muted); margin-inline-start: auto; direction: ltr; }
.mp-timeline p { margin: 4px 0 0; background: var(--mp-paper); padding: 8px 12px; border-radius: 8px; font-size: 14px; }

/* ---------- الصلاحيات ---------- */
.mp-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.mp-perm p { margin: 0 0 10px; font-size: 13px; }
.mp-perm-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--mp-line); border-radius: 10px; margin-top: 8px; }
.mp-perm-list label { display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--mp-line); cursor: pointer; }
.mp-perm-list label:first-child { border-top: 0; }
.mp-perm-list label:hover { background: var(--mp-paper); }
.mp-perm-list small { color: var(--mp-muted); direction: ltr; }
.mp-notify-opt { margin: 6px 0; font-size: 14px; }

/* ---------- الجوال ---------- */
@media (max-width: 720px) {
	.mp-app { font-size: 14px; }
	.mp-fields { grid-template-columns: 1fr; }
	.mp-dl { grid-template-columns: 1fr; gap: 2px; }
	.mp-dl dd { margin-bottom: 10px; }
	.mp-hero { flex-direction: column; }
	.mp-stepper { overflow-x: auto; grid-template-columns: repeat(6, minmax(64px, 1fr)); }
	.mp-node { width: 36px; height: 36px; font-size: 14px; }
	.mp-stepper::before { top: 15px; }
	.mp-step-label { font-size: 11px; }
	.mp-search, .mp-search input { width: 100%; min-width: 0; }
	.mp-actions .mp-btn { flex: 1 1 100%; }
	.mp-panel { padding: 16px; }
}

/* ---------- قسم المنتجات ---------- */
.mp-switch { display: inline-flex; background: rgba(233, 214, 172, .12); border-radius: 10px; padding: 3px; }
.mp-switch a { color: var(--mp-beige) !important; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.mp-switch a.is-active { background: var(--mp-beige); color: var(--mp-walnut) !important; }
.mp-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; background: var(--mp-paper); border: 1px solid var(--mp-line); border-radius: 12px; padding: 10px; }
.mp-filters input[type=search] { flex: 2 1 220px; width: auto; }
.mp-filters select { flex: 1 1 150px; width: auto; }
.mp-result-count { margin: 0 0 10px; font-size: 13px; }
.mp-card-img { position: relative; }
.mp-off { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--mp-err); color: #fff; font-weight: 700; font-size: 13px; padding: 2px 10px; border-radius: 999px; }
.mp-hidden-tag { position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(43, 33, 25, .8); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.mp-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mp-price b { color: var(--mp-walnut); font-size: 17px; font-variant-numeric: tabular-nums; }
.mp-price del { color: var(--mp-muted); font-size: 13px; }
.mp-price.is-large b { font-size: 28px; }
.mp-price.is-large del { font-size: 16px; }
.mp-save { color: var(--mp-err); font-weight: 600; margin: 4px 0 0; }
.mp-swatches { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mp-swatch { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--mp-beige); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--mp-line); font-size: 10px; font-style: normal; color: var(--mp-brown); flex: none; }
.mp-swatches small { font-size: 12px; margin-inline-start: 4px; }
.mp-stock-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; padding-top: 8px; border-top: 1px solid var(--mp-line); margin-top: auto; }
.mp-stock-line b { margin-inline-end: 4px; }
.mp-in { color: var(--mp-ok); }
.mp-out { color: var(--mp-err); font-weight: 600; }
.mp-chip { background: var(--mp-beige); color: var(--mp-brown); border-radius: 999px; padding: 0 9px; font-size: 12px; line-height: 22px; }
.mp-chip.is-zero { opacity: .55; text-decoration: line-through; }
.mp-chip.is-hl { background: var(--mp-gold); color: var(--mp-walnut); font-weight: 700; }
.mp-product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; background: #fff; border: 1px solid var(--mp-line); border-radius: 14px; padding: 20px; }
.mp-main-img { display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--mp-beige); }
.mp-main-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-main-img.is-empty { display: grid; place-items: center; color: var(--mp-muted); }
.mp-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mp-thumbs button { padding: 0; border: 2px solid var(--mp-line); border-radius: 8px; overflow: hidden; cursor: pointer; background: none; width: 72px; height: 56px; }
.mp-thumbs button:hover, .mp-thumbs button:focus-visible { border-color: var(--mp-gold); }
.mp-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-product-info h4 { font-size: 15px; margin: 18px 0 8px; }
.mp-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-color { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--mp-line); border-radius: 999px; padding: 3px 12px 3px 6px; font-size: 14px; }
.mp-stock-table { min-width: 0; max-width: 360px; border: 1px solid var(--mp-line); border-radius: 10px; overflow: hidden; }
.mp-stock-table tr.is-zero td { color: var(--mp-muted); }
.mp-stock-table tr.is-total td { font-weight: 700; background: var(--mp-paper); }
.mp-small { font-size: 12px; margin-top: 14px; }
.mp-product .mp-actions form { margin: 0; }
.mp-rep-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.mp-rep-row { display: flex; gap: 8px; align-items: center; }
.mp-rep-row input[type=color] { width: 46px; height: 42px; padding: 3px; border: 1px solid var(--mp-line); border-radius: 9px; background: #fff; flex: none; cursor: pointer; }
.mp-rep-row input[type=text] { flex: 1; }
.mp-rep-row .mp-in-sm { flex: 0 0 120px; }
.mp-app textarea[name=mp_branches] { width: 100%; }
@media (max-width: 720px) {
	.mp-product { grid-template-columns: 1fr; padding: 14px; }
	.mp-switch { width: 100%; }
	.mp-switch a { flex: 1; text-align: center; }
	.mp-top-actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.mp-app * { transition: none !important; }
}



/* =========================================================
 * كتالوج المنتجات – 1.4.0 «جدار المعرض»
 * الصورة هي البطاقة؛ أحدث منتج يظهر كبيراً، والاسم والسعر فوق الصورة.
 * ======================================================= */
.mp-filters { padding: 8px; gap: 6px; margin-bottom: 10px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(58, 38, 24, .05); }
.mp-filters input[type=search], .mp-filters select { min-height: 38px; padding: 6px 12px; border-radius: 8px; font-size: 14px; }
.mp-filters .mp-btn { min-height: 38px; padding: 6px 20px; }
.mp-result-count { margin: 0 2px 10px; font-size: 12px; }

.mp-showroom { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 14px; }
.mp-showroom.has-feature .mp-tile:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }

.mp-tile {
	position: relative; display: block; aspect-ratio: 4 / 5; min-height: 0; overflow: hidden;
	border-radius: 18px; background: #3a2618;
	text-decoration: none !important; color: #fff !important; isolation: isolate;
}
.mp-tile > img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; z-index: -2; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.mp-tile::after { /* تظليل للقراءة فوق الصورة */
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(to top, rgba(30, 19, 11, .92) 0%, rgba(30, 19, 11, .55) 32%, rgba(30, 19, 11, 0) 58%);
	transition: opacity .4s ease;
}
.mp-tile.is-empty { background: radial-gradient(circle at 50% 35%, #5a3d27, #2a1c12); }
.mp-tile:hover > img { transform: scale(1.06); }
.mp-tile:focus-visible { outline: 3px solid #c9a15b; outline-offset: 3px; }

.mp-tile-top { position: absolute; top: 12px; inset-inline: 12px; display: flex; gap: 6px; align-items: flex-start; }
.mp-tile-top > span { font-size: 12px; font-weight: 700; line-height: 24px; padding: 0 11px; border-radius: 999px; white-space: nowrap; }
.mp-tile-off { background: #c9a15b; color: #2a1c12; }
.mp-tile-hidden { background: rgba(30, 19, 11, .75); color: #f1e4c8; }
.mp-tile-stock { margin-inline-start: auto; background: rgba(255, 255, 255, .9); color: #4b6130; backdrop-filter: blur(6px); }
.mp-tile-stock::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-inline-end: 6px; vertical-align: 1px; }
.mp-tile-stock.is-out { color: #9a3a2a; }

.mp-tile-info { position: absolute; inset-inline: 0; bottom: 0; padding: 18px 18px 16px; }
.mp-tile-cat { margin: 0 0 2px; font-size: 12.5px; font-weight: 600; color: #e3c88f; }
.mp-tile h3 {
	font-family: "Amiri", "IBM Plex Sans Arabic", serif; font-weight: 700;
	font-size: 22px; line-height: 1.35; color: #fff; margin: 0 0 8px;
	text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mp-tile-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid rgba(227, 200, 143, .35); }
.mp-tile .mp-price b { color: #e3c88f; font-size: 18px; }
.mp-tile .mp-price del { color: rgba(255, 255, 255, .6); font-size: 13px; }
.mp-tile-colors { display: inline-flex; flex: none; }
.mp-tile-colors i { width: 16px; height: 16px; border-radius: 50%; background: #eadfcb; border: 2px solid rgba(255, 255, 255, .9); margin-inline-start: -5px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.mp-tile-colors i:first-child { margin-inline-start: 0; }
.mp-tile-branches { margin: 6px 0 0; font-size: 12px; color: rgba(255, 255, 255, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* المنتج المميز (الأحدث) */
.mp-showroom.has-feature .mp-tile:first-child .mp-tile-info { padding: 28px 28px 24px; }
.mp-showroom.has-feature .mp-tile:first-child h3 { font-size: 36px; margin-bottom: 12px; }
.mp-showroom.has-feature .mp-tile:first-child .mp-tile-cat { font-size: 14px; }
.mp-showroom.has-feature .mp-tile:first-child .mp-price b { font-size: 24px; }
.mp-showroom.has-feature .mp-tile:first-child .mp-tile-colors i { width: 20px; height: 20px; }
.mp-showroom.has-feature .mp-tile:first-child .mp-tile-branches { font-size: 13px; }

@media (min-width: 1500px) { .mp-showroom { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .mp-showroom { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) {
	.mp-filters input[type=search] { flex-basis: 100%; }
	.mp-showroom { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.mp-showroom.has-feature .mp-tile:first-child { grid-row: span 1; aspect-ratio: 4 / 3; }
	.mp-showroom.has-feature .mp-tile:first-child h3 { font-size: 24px; }
	.mp-showroom.has-feature .mp-tile:first-child .mp-tile-info { padding: 16px; }
	.mp-tile { border-radius: 14px; aspect-ratio: 3 / 4; }
	.mp-tile-info { padding: 12px 11px 11px; }
	.mp-tile h3 { font-size: 16px; margin-bottom: 6px; }
	.mp-tile .mp-price b { font-size: 14px; }
	.mp-tile .mp-price del { font-size: 11px; }
	.mp-tile-row { padding-top: 7px; }
	.mp-tile-top { top: 8px; inset-inline: 8px; }
	.mp-tile-top > span { font-size: 10.5px; line-height: 20px; padding: 0 8px; }
	.mp-tile-colors i { width: 13px; height: 13px; }
	.mp-tile-branches { display: none; }
}

/* صفحة المنتج: إطار صورة ثابت */
.mp-main-img { position: relative; min-height: 0; }
.mp-main-img img { position: absolute; inset: 0; max-width: none; }
.mp-product .mp-h2 { font-family: "Amiri", "IBM Plex Sans Arabic", serif; font-size: 32px; }

@media (prefers-reduced-motion: reduce) {
	.mp-tile > img { transition: none !important; }
	.mp-tile:hover > img { transform: none; }
}
