/* Mazaqi guest menu — a mobile web page, designed at real phone width (≈390px).
   Every colour derives from --mzm-p (the restaurant's brand colour) and the
   light/dark surface tokens. Templates: .mzm--t-grill / -cafe / -sweets. */

@font-face { font-family: "Noto Kufi Arabic"; src: url("../fonts/kufi-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Noto Naskh Arabic"; src: url("../fonts/naskh-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

.mzm {
	--mzm-p: #E0482A;
	--mzm-on-p: #fff;
	--mzm-bg: #FAF7F2;
	--mzm-surface: #ffffff;
	--mzm-text: #1F1714;
	--mzm-muted: #776c63;
	--mzm-line: #ece3d8;
	--mzm-soft: color-mix(in srgb, var(--mzm-p) 12%, var(--mzm-surface));
	--mzm-p-fill: color-mix(in srgb, var(--mzm-p) 86%, #000);
	--mzm-font: "IBM Plex Sans Arabic", system-ui, sans-serif;
	--mzm-shadow: 0 10px 26px -18px rgb(30 20 16 / .5);
	--mzm-r: 20px;

	position: relative;
	height: 100%;
	overflow: hidden;
	background: var(--mzm-bg);
	color: var(--mzm-text);
	font-family: var(--mzm-font);
	font-size: 15px;
	line-height: 1.5;
	text-align: start;
	-webkit-font-smoothing: antialiased;
}
.mzm--dark {
	--mzm-bg: #14100E;
	--mzm-surface: #221A17;
	--mzm-text: #F5EEE6;
	--mzm-muted: #B4A89E;
	--mzm-line: rgb(255 255 255 / .09);
	--mzm-soft: color-mix(in srgb, var(--mzm-p) 30%, var(--mzm-surface));
	--mzm-shadow: 0 12px 26px -16px rgb(0 0 0 / .9);
}
.mzm--font-kufi { --mzm-font: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif; }
.mzm--font-naskh { --mzm-font: "Noto Naskh Arabic", "IBM Plex Sans Arabic", Georgia, serif; }

.mzm *,
.mzm *::before,
.mzm *::after { box-sizing: border-box; }
.mzm h2,
.mzm h3,
.mzm h4,
.mzm p { margin: 0; }
.mzm button { font: inherit; color: inherit; cursor: pointer; }
.mzm img { display: block; max-width: none; }

.mzm-scroll {
	height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
}
.mzm-scroll::-webkit-scrollbar { display: none; }

/* ---- shared bits ------------------------------------------------------- */

.mzm-logo {
	display: grid;
	place-items: center;
	flex: none;
	overflow: hidden;
	background: var(--mzm-p);
	color: var(--mzm-on-p);
	font-weight: 700;
}
.mzm-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.mzm-id { min-width: 0; }
.mzm-id h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mzm-meta { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.mzm-dot { width: 7px; height: 7px; border-radius: 50%; background: #3BA55C; box-shadow: 0 0 0 3px rgb(59 165 92 / .22); }

.mzm-langs {
	display: flex;
	gap: 2px;
	padding: 3px;
	border-radius: 999px;
	background: rgb(255 255 255 / .94);
	box-shadow: 0 6px 16px -10px rgb(0 0 0 / .5);
}
.mzm-langs button {
	min-width: 34px;
	height: 30px;
	padding: 0 8px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #6f665d;
	font-size: 13px;
	font-weight: 600;
}
.mzm-langs button[aria-pressed="true"] { background: var(--mzm-p-fill); color: var(--mzm-on-p); }

.mzm-sec {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}
.mzm-sec small { color: var(--mzm-muted); font-size: 13px; font-weight: 500; }
.mzm-section { padding: 26px 18px 0; }
.mzm-items { display: grid; gap: 14px; }
.mzm--grid .mzm-items { grid-template-columns: 1fr 1fr; gap: 12px; }

.mzm h4 { font-size: 16px; font-weight: 600; line-height: 1.35; }
.mzm-txt p,
.mzm-entry p { margin-block-start: 3px; color: var(--mzm-muted); font-size: 13.5px; line-height: 1.5; }
.mzm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-start: 10px; }
.mzm-col { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.mzm-price { font-size: 15px; font-weight: 700; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }

.mzm-add {
	display: grid;
	place-items: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 0;
	border-radius: 999px;
	background: var(--mzm-soft);
	color: var(--mzm-p-fill);
	font-size: 22px;
	font-weight: 600;
	line-height: 1;
	transition: transform .15s, background-color .2s, color .2s;
}
.mzm--dark .mzm-add { color: #fff; }
.mzm-add.has-qty { background: var(--mzm-p-fill); color: var(--mzm-on-p); font-size: 15px; }
.mzm-add:active { transform: scale(.92); }

.mzm-tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	width: max-content;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}
.mzm-tag::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: currentColor; transform: rotate(45deg); }
.mzm-tag--popular { background: var(--mzm-p-fill); color: var(--mzm-on-p); }
.mzm-tag--new { background: #F4B042; color: #2A1C17; }
.mzm-tag--veg { background: #4E7340; color: #fff; }

/* Layout: list */
.mzm-line { display: flex; gap: 14px; padding: 12px; border-radius: var(--mzm-r); background: var(--mzm-surface); box-shadow: var(--mzm-shadow); }
.mzm-line__media img { width: 108px; height: 108px; border-radius: 14px; object-fit: cover; }
.mzm-line .mzm-txt { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.mzm-line .mzm-tag { margin-block-end: 5px; }
.mzm-line .mzm-txt p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mzm-line .mzm-row { margin-block-start: auto; padding-block-start: 8px; }

/* Layout: grid */
.mzm-card { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px; border-radius: var(--mzm-r); background: var(--mzm-surface); box-shadow: var(--mzm-shadow); }
.mzm-card__media { position: relative; }
.mzm-card__media img { width: 100%; aspect-ratio: 1; border-radius: 14px; object-fit: cover; }
.mzm-card__media .mzm-tag { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; }
.mzm-card h4 { padding-inline: 4px; font-size: 15px; }
.mzm-card .mzm-row { margin: auto 4px 0; }

/* Layout: large photos */
.mzm-big { overflow: hidden; border-radius: var(--mzm-r); background: var(--mzm-surface); box-shadow: var(--mzm-shadow); }
.mzm-big__media { position: relative; }
.mzm-big__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.mzm-big__media .mzm-tag { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; }
.mzm-big__body { display: flex; align-items: flex-end; gap: 12px; padding: 14px 16px 16px; }
.mzm-big .mzm-txt { flex: 1; min-width: 0; }
.mzm-big h4 { font-size: 18px; }

/* ---- template: GRILL ---------------------------------------------------- */

.mzm-hero { position: relative; height: 290px; color: #fff; }
.mzm-hero__img { width: 100%; height: 100%; object-fit: cover; }
.mzm-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgb(0 0 0 / .25), transparent 30%, rgb(10 6 4 / .85));
}
.mzm-hero .mzm-langs { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; z-index: 1; }
.mzm-hero__id { position: absolute; inset: auto 18px 20px; z-index: 1; display: flex; align-items: flex-end; gap: 14px; }
.mzm-hero .mzm-logo { width: 68px; height: 68px; border: 3px solid #fff; border-radius: 20px; font-size: 30px; box-shadow: 0 10px 24px -10px rgb(0 0 0 / .6); }
.mzm-hero h2 { font-size: 26px; font-weight: 700; line-height: 1.25; text-shadow: 0 2px 12px rgb(0 0 0 / .4); }
.mzm-hero .mzm-tagline { opacity: .9; font-size: 14px; }
.mzm-hero .mzm-meta { margin-block-start: 2px; opacity: .95; }

.mzm-cats {
	position: sticky;
	inset-block-start: 0;
	z-index: 2;
	display: flex;
	gap: 8px;
	padding: 12px 18px;
	overflow-x: auto;
	scrollbar-width: none;
	background: color-mix(in srgb, var(--mzm-bg) 94%, transparent);
	border-block-end: 1px solid var(--mzm-line);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.mzm-cats::-webkit-scrollbar { display: none; }
.mzm-cats button {
	flex: none;
	padding: 8px 16px;
	border: 1px solid var(--mzm-line);
	border-radius: 999px;
	background: var(--mzm-surface);
	color: var(--mzm-muted);
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
}
.mzm-cats button[aria-pressed="true"] { border-color: var(--mzm-p-fill); background: var(--mzm-p-fill); color: var(--mzm-on-p); }
.mzm--t-grill .mzm-sec::after { content: ""; flex: 1; height: 2px; margin-inline-start: 4px; align-self: center; background: linear-gradient(90deg, var(--mzm-p), transparent); opacity: .5; }
[dir="rtl"].mzm--t-grill .mzm-sec::after { background: linear-gradient(270deg, var(--mzm-p), transparent); }

/* ---- template: CAFÉ ----------------------------------------------------- */

.mzm--t-cafe { --mzm-bg: #F7F3EC; --mzm-r: 14px; }
.mzm--t-cafe.mzm--dark { --mzm-bg: #14100E; }
.mzm-top { padding: 18px 18px 6px; }
.mzm-top__bar { display: flex; align-items: center; gap: 12px; }
.mzm-top .mzm-logo { width: 50px; height: 50px; border-radius: 50%; font-size: 22px; }
.mzm-top .mzm-id { flex: 1; }
.mzm-top h2 { font-size: 19px; font-weight: 700; }
.mzm-top .mzm-meta { color: var(--mzm-muted); font-size: 12.5px; }
.mzm-top .mzm-langs { background: var(--mzm-surface); box-shadow: inset 0 0 0 1px var(--mzm-line); }
.mzm-greet { margin-block-start: 22px; font-size: 27px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }

.mzm--t-cafe .mzm-cats { gap: 22px; padding-block: 0; border-block-end: 1px solid var(--mzm-line); }
.mzm--t-cafe .mzm-cats button { padding: 14px 0 12px; border: 0; border-radius: 0; background: none; font-size: 15px; }
.mzm--t-cafe .mzm-cats button[aria-pressed="true"] { background: none; color: var(--mzm-text); font-weight: 700; box-shadow: inset 0 -3px 0 var(--mzm-p); }

.mzm-picks { padding: 22px 0 0; }
.mzm-picks .mzm-sec { padding-inline: 18px; }
.mzm-picks__row { display: flex; gap: 12px; padding: 0 18px 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.mzm-picks__row::-webkit-scrollbar { display: none; }
.mzm-pick { flex: none; width: 160px; scroll-snap-align: start; }
.mzm-pick img { width: 160px; height: 190px; border-radius: 18px; object-fit: cover; }
.mzm-pick h4 { margin-block-start: 8px; font-size: 15px; }
.mzm-pick .mzm-row { margin-block-start: 4px; }
.mzm-pick .mzm-add { min-width: 32px; height: 32px; font-size: 19px; }

.mzm--t-cafe .mzm-sec { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mzm-p-fill); }
.mzm--t-cafe.mzm--dark .mzm-sec { color: color-mix(in srgb, var(--mzm-p) 55%, #fff); }
.mzm--t-cafe .mzm-picks .mzm-sec { color: var(--mzm-text); font-size: 18px; letter-spacing: 0; text-transform: none; }

/* Printed-menu rows: name … price, description, small round photo */
.mzm-entry { display: flex; gap: 14px; padding-block: 16px; border-block-end: 1px dashed var(--mzm-line); }
.mzm--t-cafe.mzm--list .mzm-items { gap: 0; }
.mzm-entry__main { flex: 1; min-width: 0; }
.mzm-entry__head { display: flex; align-items: baseline; gap: 8px; }
.mzm-entry__head h4 { flex: none; max-width: 70%; font-size: 16.5px; }
.mzm-leader { flex: 1; height: 0; border-block-end: 2px dotted color-mix(in srgb, var(--mzm-muted) 60%, transparent); transform: translateY(-4px); }
.mzm-entry .mzm-tag { margin-block-start: 8px; }
.mzm-entry__side { position: relative; flex: none; }
.mzm-entry__thumb img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.mzm-entry__side .mzm-add { position: absolute; inset-block-end: -6px; inset-inline-start: -6px; min-width: 32px; height: 32px; font-size: 19px; box-shadow: 0 0 0 3px var(--mzm-bg); }
.mzm-entry__side .mzm-add:not(.has-qty) { background: var(--mzm-p-fill); color: var(--mzm-on-p); }

/* ---- template: SWEETS --------------------------------------------------- */

.mzm--t-sweets { --mzm-bg: color-mix(in srgb, var(--mzm-p) 6%, #FFF9F5); --mzm-r: 26px; }
.mzm--t-sweets.mzm--dark { --mzm-bg: #15100F; }
.mzm-band {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 58px 24px 34px;
	border-radius: 0 0 40px 40px;
	background:
		radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--mzm-p) 70%, #fff), transparent 70%),
		var(--mzm-p);
	color: var(--mzm-on-p);
	text-align: center;
}
.mzm-band .mzm-langs { position: absolute; inset-block-start: 14px; inset-inline-end: 14px; }
.mzm-band .mzm-logo { width: 84px; height: 84px; border: 4px solid rgb(255 255 255 / .9); border-radius: 50%; background: var(--mzm-p-fill); font-size: 36px; box-shadow: 0 14px 28px -14px rgb(0 0 0 / .5); }
.mzm-band h2 { margin-block-start: 14px; font-size: 26px; font-weight: 700; line-height: 1.25; }
.mzm-band .mzm-tagline { opacity: .9; font-size: 14.5px; }
.mzm-band .mzm-meta { margin-block-start: 10px; padding: 5px 14px; border-radius: 999px; background: rgb(0 0 0 / .14); font-size: 12.5px; }

.mzm-bubbles { display: flex; gap: 14px; padding: 22px 18px 4px; overflow-x: auto; scrollbar-width: none; }
.mzm-bubbles::-webkit-scrollbar { display: none; }
.mzm-bubbles button { display: flex; flex: none; flex-direction: column; align-items: center; gap: 8px; width: 74px; padding: 0; border: 0; background: none; }
.mzm-bubble { display: block; padding: 3px; border-radius: 50%; background: var(--mzm-line); transition: background .2s; }
.mzm-bubble img { width: 66px; height: 66px; border: 3px solid var(--mzm-bg); border-radius: 50%; object-fit: cover; }
.mzm-bubble__label { color: var(--mzm-muted); font-size: 12.5px; font-weight: 600; line-height: 1.3; text-align: center; }
.mzm-bubbles button[aria-pressed="true"] .mzm-bubble { background: conic-gradient(var(--mzm-p), #F4B042, var(--mzm-p)); }
.mzm-bubbles button[aria-pressed="true"] .mzm-bubble__label { color: var(--mzm-text); }

.mzm--t-sweets .mzm-sec { justify-content: center; font-size: 22px; text-align: center; }
.mzm--t-sweets .mzm-sec small { display: none; }
.mzm--t-sweets .mzm-card { padding: 10px 10px 12px; background: color-mix(in srgb, var(--mzm-p) 8%, var(--mzm-surface)); box-shadow: none; text-align: center; }
.mzm--t-sweets .mzm-card__media img { border-radius: 20px; }
.mzm--t-sweets .mzm-card .mzm-row { flex-direction: column; gap: 8px; }
.mzm--t-sweets .mzm-card .mzm-price { padding: 3px 12px; border-radius: 999px; background: var(--mzm-surface); font-size: 14px; }
.mzm--t-sweets .mzm-card .mzm-add { width: 100%; height: 34px; border-radius: 999px; font-size: 18px; }
.mzm--t-sweets .mzm-line,
.mzm--t-sweets .mzm-big { box-shadow: none; background: color-mix(in srgb, var(--mzm-p) 8%, var(--mzm-surface)); }

/* ---- footer, cart, order sheet ----------------------------------------- */

.mzm-foot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-block-start: 34px;
	padding: 28px 24px 110px;
	border-block-start: 1px solid var(--mzm-line);
	color: var(--mzm-muted);
	font-size: 13px;
	text-align: center;
}
.mzm-foot__logo { display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; background: var(--mzm-p); color: var(--mzm-on-p); font-weight: 700; font-size: 19px; }
.mzm-foot__logo img { width: 100%; height: 100%; object-fit: cover; }
.mzm-foot b { color: var(--mzm-text); }
.mzm-powered { font-size: 12px; opacity: .85; }

.mzm-cart {
	position: absolute;
	inset-inline: 16px;
	inset-block-end: 16px;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	padding-inline-end: 20px;
	border: 0;
	border-radius: 999px;
	background: var(--mzm-p-fill);
	color: var(--mzm-on-p) !important;
	font-size: 15px;
	font-weight: 600;
	box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--mzm-p) 70%, #000);
	animation: mzm-up .3s ease-out;
}
.mzm-cart b { margin-inline-start: auto; direction: ltr; unicode-bidi: isolate; }
.mzm-cart__n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--mzm-on-p) 22%, transparent); }
@keyframes mzm-up { from { translate: 0 20px; opacity: 0; } }

.mzm-sheet { position: absolute; inset: 0; z-index: 4; display: flex; align-items: flex-end; background: rgb(10 6 5 / .45); animation: mzm-fade .2s ease-out; }
@keyframes mzm-fade { from { opacity: 0; } }
.mzm-sheet__panel { width: 100%; max-height: 82%; overflow-y: auto; padding: 22px 18px 26px; border-radius: 26px 26px 0 0; background: var(--mzm-bg); animation: mzm-up .25s ease-out; }
.mzm-sheet__head { display: flex; align-items: center; justify-content: space-between; margin-block-end: 8px; }
.mzm-sheet h3 { font-size: 18px; font-weight: 700; }
.mzm-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--mzm-surface); font-size: 22px !important; line-height: 1; }
.mzm-lines { margin: 0; padding: 0; list-style: none; }
.mzm-lines li { display: flex; align-items: center; gap: 12px; padding-block: 12px; border-block-end: 1px solid var(--mzm-line); }
.mzm-lines img { width: 56px; height: 42px; border-radius: 10px; object-fit: cover; }
.mzm-lines span:first-of-type { flex: 1; min-width: 0; font-weight: 500; font-size: 14.5px; }
.mzm-lines em { min-width: 72px; font-style: normal; font-weight: 600; text-align: end; direction: ltr; unicode-bidi: isolate; }
.mzm-qty { display: flex; align-items: center; gap: 8px; }
.mzm-qty button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--mzm-soft); color: var(--mzm-p-fill) !important; font-weight: 700; line-height: 1; }
.mzm--dark .mzm-qty button { color: #fff !important; }
.mzm-sum { display: flex; justify-content: space-between; padding-block: 16px; font-size: 16px; }
.mzm-sum b { direction: ltr; unicode-bidi: isolate; }
.mzm-btn { width: 100%; min-height: 52px; border: 0; border-radius: 999px; background: var(--mzm-p-fill); color: var(--mzm-on-p) !important; font-size: 16px; font-weight: 600 !important; }
.mzm-sheet.is-sent .mzm-sheet__panel { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-block: 32px; text-align: center; }
.mzm-sheet.is-sent p { margin-block-end: 14px; color: var(--mzm-muted); font-size: 14px; }
.mzm-ok { position: relative; width: 64px; height: 64px; margin-block-end: 6px; border-radius: 50%; background: #3BA55C; }
.mzm-ok::after { content: ""; position: absolute; inset: 21px 18px 25px; border: solid #fff; border-width: 0 0 4px 4px; transform: rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
	.mzm *,
	.mzm *::before { animation: none !important; transition: none !important; }
}
