/*
 * Ali Baba Pastry — site styles.
 * Layout and components follow the MeatRO public hub (link-hub card, link cards,
 * branch cards, bottom-sheet previews), recoloured with the Ali Baba identity:
 * dark teal #033a46 and sky blue #90e1f2 (overridable from Site settings → Colours).
 * Logical properties (inline-start/end) keep Arabic RTL and English LTR identical.
 */

:root {
	--brand-primary: #033a46;
	--brand-primary-hover: #022f39;
	--brand-primary-light: #e1f0f3;
	--brand-primary-contrast: #ffffff;
	--brand-accent: #90e1f2;
	--brand-accent-light: #e3f8fc;

	--page-top: #003a46;
	--page-bottom: #3d9fb3;
	--surface: #ffffff;
	--surface-muted: #eef7f9;
	--ink: #0f2a31;
	--muted: #5b7279;
	--line: #dcebee;
	--whatsapp: #128c4b;
	--warning-bg: #fff4d6;
	--warning-ink: #6b4500;

	--font: 'Rubik', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
	--radius-md: 0.875rem;
	--radius-lg: 1.25rem;
	--radius-xl: 1.75rem;
	--radius-shell: 2rem;
	--shadow-xs: 0 1px 2px rgb(3 58 70 / 0.06);
	--shadow-sm: 0 2px 10px -3px rgb(3 58 70 / 0.14);
	--shadow-lg: 0 24px 60px -20px rgb(0 0 0 / 0.35);
	--focus-ring: 0 0 0 3px rgb(3 58 70 / 0.3);
	--control-md: 2.75rem;
	--sheet-width: 30rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.has-dialog { overflow: hidden; }
body {
	margin: 0;
	min-height: 100dvh;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--ink);
	background: linear-gradient(160deg, var(--page-top) 0%, var(--page-bottom) 100%) fixed;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, dl { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
::selection { background: var(--brand-accent-light); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.icon-xs { width: 0.875rem; height: 0.875rem; }
.icon-wrap { display: inline-grid; place-items: center; flex: none; }
.icon-wrap svg { width: 1.125rem; height: 1.125rem; }

.skip-link { position: absolute; inset-inline-start: 0.5rem; top: -4rem; z-index: 100; padding: 0.5rem 1rem; border-radius: var(--radius-md); background: var(--surface); }
.skip-link:focus { top: 0.5rem; }

.preview-banner { position: sticky; top: 0; z-index: 70; padding: 0.4rem 1rem; text-align: center; font-size: 0.8125rem; font-weight: 500; background: var(--warning-bg); color: var(--warning-ink); }
.badge-hidden { display: inline-flex; align-items: center; padding: 0.15rem 0.55rem; border-radius: 99px; font-size: 0.6875rem; font-weight: 600; background: var(--warning-bg); color: var(--warning-ink); flex: none; }

/* ---------- Page shell (the link-hub card) ---------- */
.page { min-height: 100dvh; padding: 1.5rem 1rem; }
.shell {
	width: 100%;
	max-width: 36rem;
	margin-inline: auto;
	padding: 1rem 1rem 2rem;
	border-radius: var(--radius-shell);
	background: var(--surface-muted);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}
.shell.plain { text-align: center; padding: 3rem 1.5rem; }
@media (min-width: 640px) {
	.page { padding: 2.5rem 1.5rem; }
	.shell { padding-inline: 1.5rem; }
}

/* ---------- Brand header ---------- */
.brand { position: relative; }
.brand-cover {
	margin: -1rem -1rem 0;
	aspect-ratio: 1200 / 460;
	background: linear-gradient(120deg, var(--page-top), var(--page-bottom));
	overflow: hidden;
}
.brand-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) { .brand-cover { margin-inline: -1.5rem; } }

/* Language and share: kept clear of the card's rounded corner. */
.brand-actions { display: flex; align-items: center; justify-content: space-between; padding: 0.375rem 0.375rem 0; }
.brand.has-cover .brand-actions { position: absolute; top: 0; inset-inline: 0; padding: 0.625rem 0.625rem 0; }
@media (min-width: 640px) {
	.brand.has-cover .brand-actions { padding: 0.875rem 0.875rem 0; }
}
.round-btn {
	display: grid; place-items: center;
	width: 2.5rem; height: 2.5rem;
	border: 0; border-radius: 50%;
	background: rgb(255 255 255 / 0.75);
	font-size: 0.8125rem; font-weight: 600; text-decoration: none;
	cursor: pointer;
	transition: background 0.15s;
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.round-btn:hover { background: #fff; }

.brand-id { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 0.5rem; }
.brand.has-cover .brand-id { margin-top: -3.5rem; position: relative; }
.logo {
	width: 7rem; height: 7rem;
	border-radius: 50%;
	overflow: hidden;
	background: var(--brand-accent);
	border: 4px solid var(--surface-muted);
	box-shadow: var(--shadow-sm);
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { margin-top: 0.75rem; font-size: 1.375rem; font-weight: 700; line-height: 1.3; color: var(--brand-primary); }
.brand-tagline { margin-top: 0.25rem; font-size: 0.9rem; font-weight: 500; color: var(--ink); opacity: 0.8; max-width: 26rem; }

.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem; margin-top: 1rem; }
.social a {
	display: grid; place-items: center;
	width: 2.5rem; height: 2.5rem;
	border-radius: 50%;
	color: var(--ink);
	transition: background 0.15s, color 0.15s;
}
.social a:hover { background: var(--surface); color: var(--brand-primary); }
.social .icon { width: 1.375rem; height: 1.375rem; }

/* ---------- Link cards (buttons and menus) ---------- */
.links { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.75rem; }
.link-card {
	display: flex; align-items: center; gap: 0.75rem;
	width: 100%;
	padding: 0.875rem 1rem;
	border: 0; border-radius: 1rem;
	background: var(--surface);
	box-shadow: var(--shadow-xs);
	text-align: start; text-decoration: none;
	cursor: pointer;
	transition: transform 0.15s, background 0.15s;
}
.link-card:hover { transform: scale(1.01); }
.link-card:active { transform: scale(0.995); }
.link-icon {
	display: grid; place-items: center;
	width: 2.25rem; height: 2.25rem;
	flex: none;
	border-radius: 0.75rem;
	background: var(--brand-primary-light);
	color: var(--brand-primary);
}
.link-text { flex: 1; min-width: 0; text-align: center; }
.link-title { display: block; font-size: 0.9375rem; font-weight: 600; }
.link-sub { display: block; font-size: 0.75rem; color: var(--muted); }
.link-spacer { width: 2.25rem; flex: none; }
.link-card .badge-hidden + .sr-only, .link-card .badge-hidden { margin-inline-start: -2.25rem; }
.link-card.is-highlight { background: var(--brand-primary); color: var(--brand-primary-contrast); }
.link-card.is-highlight:hover { background: var(--brand-primary-hover); }
.link-card.is-highlight .link-icon { background: rgb(255 255 255 / 0.15); color: #fff; }
.link-card.is-highlight .link-sub { color: rgb(255 255 255 / 0.8); }

/* ---------- Sections ---------- */
.section { margin-top: 2rem; }
.section-title { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.9375rem; font-weight: 700; text-align: center; color: var(--brand-primary); }

/* ---------- Collapsible lists ---------- */
.collapse-heading { font-size: inherit; font-weight: inherit; }
.collapse-toggle {
	display: flex; align-items: center; gap: 0.75rem;
	width: 100%;
	padding: 0.875rem 1rem;
	border: 0; border-radius: 1rem;
	background: var(--surface);
	box-shadow: var(--shadow-xs);
	text-align: start;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.2s;
}
.collapse-toggle:hover { transform: scale(1.01); }
.collapse-toggle .link-title { display: flex; align-items: center; justify-content: center; gap: 0.5rem; color: var(--brand-primary); font-weight: 700; }
.collapse-chevron {
	display: grid; place-items: center;
	width: 2.25rem; height: 2.25rem; flex: none;
	border-radius: 50%;
	background: var(--brand-primary-light); color: var(--brand-primary);
	transition: transform calc(var(--speed, 450ms) * 0.8) cubic-bezier(.2, .8, .2, 1), background 0.2s;
}
.collapse-chevron .icon { width: 1.125rem; height: 1.125rem; }
[data-open] > .collapse-heading .collapse-toggle { box-shadow: var(--shadow-sm); }
[data-open] > .collapse-heading .collapse-chevron { transform: rotate(180deg); background: var(--brand-primary); color: #fff; }

/*
 * Motion is driven by --speed (set per list from the dashboard; 0ms = "Animate" off).
 * Height animation: the panel grows from 0 to its content height.
 */
.js .collapse-panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--speed, 450ms) cubic-bezier(.2, .8, .2, 1);
}
.js [data-open] > .collapse-panel { grid-template-rows: 1fr; }
.collapse-inner { min-height: 0; overflow: hidden; }
.collapse-inner > .stack { padding: 0.25rem 0.125rem 0.375rem; }

/* Items slide in one after another: when a collapsible list opens, or (always-listed + animate) when scrolled to. */
.js .collapsible .stack > li,
.js .reveal .stack > li,
.js .reveal .news-track > li {
	opacity: 0;
	transform: translateY(-0.5rem);
	transition: opacity calc(var(--speed, 450ms) * 0.75) ease, transform calc(var(--speed, 450ms) * 0.75) ease;
}
.js .reveal .stack > li, .js .reveal .news-track > li { transform: translateY(0.75rem); }
.js .collapsible[data-open] .stack > li,
.js .reveal.is-revealed .stack > li,
.js .reveal.is-revealed .news-track > li {
	opacity: 1;
	transform: none;
	transition-delay: calc(var(--i, 0) * var(--speed, 450ms) * 0.12 + var(--speed, 450ms) * 0.15);
}
.js .collapsible:not([data-animate]) .stack > li { transition: none; }
.js .collapsible[data-open] .stack > li.branch-card:hover,
.js .reveal.is-revealed .stack > li.branch-card:hover { transform: scale(1.01); transition-delay: 0s; }
/* "Reduce motion" devices: keep a short, gentle unfold, without the sliding. */
@media (prefers-reduced-motion: reduce) {
	.js .collapse-panel { transition-duration: min(var(--speed, 450ms), 0.25s); }
	.collapse-chevron { transition-duration: 0.15s; }
	.js .collapsible .stack > li, .js .reveal .stack > li, .js .reveal .news-track > li { transform: none; transition: opacity min(var(--speed, 450ms), 0.25s) ease; }
	.js .collapsible[data-open] .stack > li, .js .reveal.is-revealed li { transition-delay: 0.05s; }
}

/* ---------- Event / festival banner ---------- */
.event-banner {
	position: relative;
	margin-top: 1.25rem;
	border-radius: 1.125rem;
	background: var(--event-bg, #e0a526);
	color: var(--event-color, #2b1a00);
	box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.35);
	overflow: hidden;
	animation: event-in 0.5s cubic-bezier(.2, .8, .2, 1) both;
	transition: opacity 0.25s, transform 0.25s;
}
.event-banner.is-closing { opacity: 0; transform: scale(0.97); }
.event-top { max-width: 36rem; margin: 0 auto 1rem; }
.event-link { display: flex; align-items: center; gap: 0.875rem; padding: 0.875rem 1rem; padding-inline-end: 2.75rem; color: inherit; text-decoration: none; }
.event-image { width: 3.5rem; height: 3.5rem; flex: none; border-radius: 0.875rem; object-fit: cover; background: rgb(255 255 255 / 0.25); }
.event-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.event-title { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.event-body { font-size: 0.8125rem; line-height: 1.6; opacity: 0.9; }
.event-cta {
	display: inline-flex; align-items: center; gap: 0.375rem;
	align-self: flex-start;
	margin-top: 0.375rem;
	padding: 0.35rem 0.8rem;
	border-radius: 99px;
	background: var(--event-color, #2b1a00);
	color: var(--event-bg, #e0a526);
	font-size: 0.8125rem; font-weight: 600;
}
.event-cta .icon { width: 1rem; height: 1rem; }
.event-link:hover .event-cta { filter: brightness(1.15); }
.event-close {
	position: absolute; top: 0.5rem; inset-inline-end: 0.5rem;
	display: grid; place-items: center;
	width: 2rem; height: 2rem;
	border: 0; border-radius: 50%;
	background: rgb(255 255 255 / 0.35);
	color: inherit;
	cursor: pointer;
}
.event-close:hover { background: rgb(255 255 255 / 0.6); }
.event-close .icon { width: 1rem; height: 1rem; }
.has-shine::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.45) 50%, transparent 65%);
	transform: translateX(-120%);
	animation: event-shine 4.5s ease-in-out 1.2s infinite;
	pointer-events: none;
}
@keyframes event-in { from { opacity: 0; transform: translateY(-0.5rem) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes event-shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
	.event-banner { animation-duration: 0.2s; }
	.has-shine::after { animation: none; display: none; }
}

/* ---------- News & new items ---------- */
.news-track {
	display: flex; gap: 0.75rem;
	margin: 0.75rem -1rem 0; padding: 0.25rem 1rem 0.75rem;
	overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scroll-padding-inline: 1rem;
	scrollbar-width: none;
}
.news-track::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .news-track { margin-inline: -1.5rem; padding-inline: 1.5rem; scroll-padding-inline: 1.5rem; } }
.news-track > li { flex: 0 0 78%; max-width: 17rem; scroll-snap-align: start; }
.news-card { display: flex; flex-direction: column; height: 100%; border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; }
.news-card.is-highlight { box-shadow: 0 0 0 2px var(--brand-primary), var(--shadow-sm); }
.news-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--brand-accent-light), var(--brand-primary-light)); }
.news-media { overflow: hidden; }
.news-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-media .icon { position: absolute; inset: 0; margin: auto; width: 2.5rem; height: 2.5rem; color: var(--brand-primary); opacity: 0.5; }
.news-badge { position: absolute; top: 0.625rem; inset-inline-start: 0.625rem; padding: 0.2rem 0.6rem; border-radius: 99px; background: var(--brand-primary); color: #fff; font-size: 0.75rem; font-weight: 600; }
.news-body { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; padding: 0.875rem 1rem 1rem; }
.news-title { font-size: 0.9375rem; font-weight: 700; line-height: 1.4; }
.news-text { font-size: 0.8125rem; line-height: 1.65; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.news-price { font-size: 0.875rem; font-weight: 700; color: var(--brand-primary); }
.news-action { margin-top: auto; padding-top: 0.5rem; }
.news-action .btn { width: 100%; min-height: 2.5rem; font-size: 0.875rem; }
.news-action .btn.is-whatsapp { background: #128c4b; }
.news-action .btn.is-whatsapp:hover { background: #0e7a40; }
.stack .news-card { flex-direction: row; }
.stack .news-media { width: 7.5rem; flex: none; aspect-ratio: auto; min-height: 7.5rem; }
.news-nav { display: none; gap: 0.5rem; justify-content: center; margin-top: 0.25rem; }
@media (hover: hover) and (min-width: 640px) { .news-nav { display: flex; } }
.news-nav .icon-btn .icon { width: 1rem; height: 1rem; }
.news-nav .arrow { display: inline-grid; }
.news-nav .arrow-next, [dir="rtl"] .news-nav .arrow-prev { transform: scaleX(-1); }
[dir="rtl"] .news-nav .arrow-next { transform: none; }

/* ---------- Branch cards ---------- */
.branch-card {
	display: flex; align-items: center;
	border-radius: 1rem;
	background: var(--surface);
	box-shadow: var(--shadow-xs);
	transition: transform 0.15s;
}
.branch-card:hover { transform: scale(1.01); }
.branch-main {
	display: flex; align-items: center; gap: 0.75rem;
	flex: 1; min-width: 0;
	padding: 0.625rem;
	border: 0; border-radius: 1rem;
	background: none;
	text-align: start;
	cursor: pointer;
}
.branch-thumb {
	position: relative;
	display: grid; place-items: center;
	width: 3.5rem; height: 3.5rem;
	flex: none;
	border-radius: 0.75rem;
	overflow: hidden;
	color: var(--brand-primary);
	background: linear-gradient(135deg, var(--brand-accent-light), #f2fbfd 55%, #fdf6e9);
}
.branch-thumb .icon { position: relative; width: 1.5rem; height: 1.5rem; }
.branch-thumb.has-image img { width: 100%; height: 100%; object-fit: cover; }
.map-lines::before, .map-lines::after { content: ""; position: absolute; background: #fff; }
.map-lines::before { inset-inline: 0; top: 50%; height: 1px; }
.map-lines::after { inset-block: 0; inset-inline-start: 33%; width: 1px; }
.branch-text { flex: 1; min-width: 0; text-align: start; }
.branch-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.branch-address { display: flex; align-items: center; gap: 0.25rem; margin-top: 0.125rem; font-size: 0.75rem; color: var(--muted); }
.branch-address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Text position on the card (dashboard: group or branch). */
.align-center .branch-text { text-align: center; }
.align-center .branch-address { justify-content: center; }
.align-end .branch-text { text-align: end; }
.align-end .branch-address { justify-content: flex-end; }
.branch-balance { width: 3.5rem; flex: none; } /* same width as the photo, so centred text sits in the middle */
.branch-location { display: block; margin-top: 0.125rem; font-size: 0.75rem; color: var(--brand-primary); opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-location { color: var(--brand-primary); font-size: 0.8125rem; }
.branch-quick { display: flex; gap: 0.375rem; padding-inline-end: 0.625rem; }
.quick-btn {
	display: grid; place-items: center;
	width: 2.5rem; height: 2.5rem;
	border-radius: 50%;
	background: var(--brand-primary-light);
	color: var(--brand-primary);
	transition: background 0.15s, color 0.15s;
}
.quick-btn:hover { background: var(--brand-primary); color: #fff; }
.quick-btn.is-whatsapp { background: #e3f5ea; color: var(--whatsapp); }
.quick-btn.is-whatsapp:hover { background: var(--whatsapp); color: #fff; }
.quick-btn .icon { width: 1.125rem; height: 1.125rem; }

/* ---------- About ---------- */
.about { padding: 1.25rem; border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow-xs); text-align: center; }
.about-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.75rem; margin-bottom: 1rem; }
.about-title { font-size: 1rem; font-weight: 700; color: var(--brand-primary); }
.about-sub { margin-top: 0.25rem; font-size: 0.875rem; font-weight: 500; color: var(--brand-primary); opacity: 0.8; }
.about-body { max-width: 28rem; margin: 0.5rem auto 0; font-size: 0.875rem; line-height: 1.85; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 2.5rem; text-align: center; font-size: 0.75rem; color: var(--muted); }
.footer-line { margin-bottom: 0.5rem; }
.social-sm { margin-top: 0; margin-bottom: 0.5rem; }
.social-sm a { width: 2.25rem; height: 2.25rem; color: var(--muted); }
.social-sm .icon { width: 1.125rem; height: 1.125rem; }
.footer-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; }
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { color: var(--ink); text-decoration: underline; }
.copyright { margin-top: 0.75rem; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	min-height: var(--control-md);
	padding: 0 1.25rem;
	border-radius: var(--radius-md);
	font-size: 0.9375rem; font-weight: 600;
	text-decoration: none; white-space: nowrap;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}
.btn .icon { width: 1.125rem; height: 1.125rem; }
.btn-primary { border: 0; background: var(--brand-primary); color: var(--brand-primary-contrast); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-primary-hover); }
.btn-secondary { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-secondary:hover { border-color: rgb(3 58 70 / 0.35); background: var(--brand-primary-light); }
.icon-btn {
	display: inline-grid; place-items: center;
	width: 2.5rem; height: 2.5rem; flex: none;
	border: 1px solid var(--line); border-radius: 50%;
	background: var(--surface); color: var(--ink);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.icon-btn:hover { border-color: rgb(3 58 70 / 0.35); background: var(--brand-primary-light); color: var(--brand-primary); }
.icon-btn.lg { width: var(--control-md); height: var(--control-md); }
.icon-btn .icon { width: 1.125rem; height: 1.125rem; }
.icon-btn.is-whatsapp { color: var(--whatsapp); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.btn-row.one { grid-template-columns: 1fr; }
.btn-row-flex { display: flex; align-items: center; gap: 0.5rem; }
.grow { flex: 1; }

/* ---------- Sheets (preview windows) ---------- */
dialog.sheet {
	padding: 0; border: 0; margin: 0;
	inset: auto 0 0 0;
	width: 100%; max-width: 100%;
	max-height: 92dvh;
	background: transparent;
	color: var(--ink);
	overflow: visible;
}
dialog.sheet::backdrop { background: rgb(2 30 37 / 0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
dialog.sheet[open] { display: flex; animation: sheet-up 0.22s ease-out; }
.sheet-inner {
	display: flex; flex-direction: column;
	width: 100%; max-height: 92dvh;
	border-radius: var(--radius-xl) var(--radius-xl) 0 0;
	background: var(--surface);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}
.sheet-grip { width: 2.5rem; height: 0.25rem; margin: 0.625rem auto 0; border-radius: 99px; background: var(--line); flex: none; }
.sheet-header { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.sheet-heading { flex: 1; min-width: 0; }
.sheet-title { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.sheet-sub { margin-top: 0.125rem; font-size: 0.875rem; color: var(--muted); }
.sheet-sub.with-icon { display: flex; align-items: flex-start; gap: 0.25rem; }
.sheet-sub.with-icon .icon { margin-top: 0.2rem; }
.sheet-header .icon-btn { margin-inline-end: -0.25rem; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.25rem; }
.sheet-body.flush { padding: 0; }
.sheet-footer { padding: 1rem 1.25rem max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }

@media (min-width: 640px) {
	dialog.sheet { inset: 0; margin: auto; width: calc(100% - 3rem); max-width: var(--sheet-width); max-height: 85dvh; }
	dialog.sheet[open] { animation: sheet-in 0.2s ease-out; }
	.sheet-inner { max-height: 85dvh; border-radius: var(--radius-xl); }
	.sheet-grip { display: none; }
}
@keyframes sheet-up { from { transform: translateY(1.5rem); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-in { from { transform: scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	dialog.sheet[open] { animation-duration: 0.12s; }
}

/* Menu preview */
.pdf-frame { position: relative; height: min(62dvh, 560px); background: var(--surface-muted); }
.pdf-iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.pdf-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 1.5rem; text-align: center; font-size: 0.875rem; color: var(--muted); background: var(--surface-muted); }
.pdf-fallback p { max-width: 18rem; }
.pdf-fallback img { max-height: 70%; width: auto; border-radius: 0.5rem; box-shadow: var(--shadow-sm); }
.pdf-frame.has-cover .pdf-fallback-icon { display: none; }
.pdf-fallback-icon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: var(--radius-lg); background: var(--brand-primary-light); color: var(--brand-primary); }
.pdf-fallback-icon .icon { width: 1.75rem; height: 1.75rem; }
.spinner { width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid rgb(3 58 70 / 0.15); border-top-color: var(--brand-primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.menu-images { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem; background: var(--surface-muted); }
.menu-page { margin: 0; border-radius: 0.75rem; overflow: hidden; background: #fff; box-shadow: var(--shadow-xs); }
.menu-page img { width: 100%; }
.menu-page figcaption { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.5rem; }
.chip-link { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.3rem 0.7rem; border-radius: 99px; background: var(--brand-primary-light); color: var(--brand-primary); font-size: 0.8125rem; font-weight: 500; text-decoration: none; }
.chip-link svg { width: 0.95rem; height: 0.95rem; }

/* Branch preview */
.map-frame { position: relative; height: min(42dvh, 360px); background: var(--surface-muted); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-frame.is-empty { height: auto; min-height: 7rem; display: grid; place-items: center; }
/* Physical right: Google's own embed control sits top-left in both languages. */
.map-open { position: absolute; top: 0.75rem; right: 0.75rem; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0.75rem; border-radius: 0.5rem; background: #fff; color: var(--brand-primary); font-size: 0.75rem; font-weight: 600; text-decoration: none; box-shadow: 0 2px 8px rgb(0 0 0 / 0.15); }
.map-frame.is-empty .map-open { position: static; margin-top: 0.5rem; }
.map-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1rem 1.5rem 0; text-align: center; font-size: 0.875rem; color: var(--muted); }
.branch-info { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.25rem; }
.branch-desc { font-size: 0.9rem; line-height: 1.8; color: var(--muted); }
.info-title { margin-bottom: 0.5rem; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.phone-list { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); }
.phone-list li + li { border-top: 1px solid var(--line); }
.phone-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; text-decoration: none; }
.phone-row:hover { background: var(--brand-primary-light); }
.phone-row > .icon-wrap { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--brand-primary-light); color: var(--brand-primary); }
.phone-text { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.phone-label { font-size: 0.75rem; color: var(--muted); }
.phone-number { font-weight: 600; unicode-bidi: isolate; }
.phone-call { font-size: 0.8125rem; font-weight: 600; color: var(--brand-primary); }
.hours { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; font-size: 0.875rem; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; font-weight: 500; }
.extras { display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.875rem; }
.extras li { display: flex; align-items: flex-start; gap: 0.6rem; }
.extras .icon-wrap { width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand-accent-light); color: var(--brand-primary); }
.extras strong { display: block; font-weight: 600; }
.extras span span { color: var(--muted); }

/* Contact card */
.contact-head { text-align: center; }
.contact-logo { display: block; width: 5rem; height: 5rem; margin: 0 auto; overflow: hidden; border-radius: 1.5rem; background: var(--brand-accent); box-shadow: var(--shadow-sm); }
.contact-logo img { width: 100%; height: 100%; object-fit: cover; }
.contact-name { margin-top: 0.75rem; font-size: 1.25rem; font-weight: 700; }
.contact-tagline { margin-top: 0.125rem; font-size: 0.875rem; color: var(--muted); }
.contact-list { margin-top: 1.25rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); font-size: 0.875rem; }
.contact-list > li { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; }
.contact-list > li + li { border-top: 1px solid var(--line); }
.contact-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; border-radius: 50%; background: var(--brand-primary-light); color: var(--brand-primary); }
.contact-icon .icon { width: 1.125rem; height: 1.125rem; }
.contact-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.contact-label { font-size: 0.75rem; color: var(--muted); }
.contact-value { max-width: 100%; font-weight: 600; overflow-wrap: anywhere; unicode-bidi: isolate; }

/* Toast */
.toast { position: fixed; inset-inline: 0; bottom: 1.5rem; z-index: 90; width: fit-content; margin: 0 auto; padding: 0.5rem 1rem; border-radius: 99px; background: var(--ink); color: #fff; font-size: 0.875rem; box-shadow: var(--shadow-lg); }
