/* ScanMenu — base styles shared by every layout: loading screen, lightbox,
   item sheet, custom frame, footer. Layout styles live in layouts/<id>.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: #000; }
body.is-loading { overflow: hidden; }
body.is-loading .menu-app { opacity: 0; pointer-events: none; }
[hidden] { display: none !important; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }

/* ─── Menu placeholder: soft outline of a menu while the real one loads ─── */
.menu-skeleton {
  --sk-bg: #f7f4ef; --sk-ink: #2a1d14; --sk-mix: 9%;
  position: fixed; inset: 0; z-index: 9998; overflow: hidden;
  background: var(--sk-bg); color: var(--sk-ink);
  font-family: "Cairo", system-ui, -apple-system, sans-serif;
  transition: opacity .3s ease, visibility .3s ease;
}
.menu-skeleton.is-dark { --sk-bg: #0b0b10; --sk-ink: #f5f5f5; }
.menu-skeleton.done { opacity: 0; visibility: hidden; }
body:not(.loader-off) .menu-skeleton { display: none; }
.sk-wrap { max-width: 720px; margin: 0 auto; padding: 44px 20px 0; display: flex; flex-direction: column; gap: 16px; }
.sk {
  display: block; border-radius: 12px;
  background: color-mix(in srgb, var(--sk-ink) var(--sk-mix), transparent)
    linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--sk-ink) var(--sk-mix), transparent) 50%, transparent 70%) no-repeat;
  background-size: 100% 100%, 220% 100%; background-position: 0 0, 160% 0;
  animation: skShimmer 1.4s ease-in-out infinite;
}
.sk-head { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 14px; }
.sk-logo { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; }
.sk-logo img { width: 100%; height: 100%; object-fit: contain; display: block; animation: fadeIn .35s ease; }
.sk-logo.has-logo { background: none; animation: none; }
.sk-name { display: flex; justify-content: center; width: 100%; min-height: 30px; font-size: 24px; font-weight: 600; line-height: 30px; text-align: center; }
.sk-line { height: 12px; border-radius: 999px; }
.sk-name .sk-line { height: 22px; margin-top: 4px; }
.sk-w30 { width: 30%; } .sk-w45 { width: 45%; } .sk-w55 { width: 55%; } .sk-w70 { width: 70%; } .sk-w90 { width: 90%; }
.sk-tabs { display: flex; gap: 8px; overflow: hidden; padding: 4px 0; }
.sk-tabs .sk { flex: none; width: 104px; height: 40px; border-radius: 999px; }
.sk-tabs .sk:first-child { width: 128px; background-color: color-mix(in srgb, var(--sk-ink) 16%, transparent); }
.sk-title { width: 46%; height: 26px; margin: 14px 0 2px; border-radius: 999px; }
.sk-card {
  display: flex; align-items: flex-start; gap: 16px; padding: 18px; border-radius: 22px;
  background: color-mix(in srgb, var(--sk-ink) 4%, var(--sk-bg));
  border: 1px solid color-mix(in srgb, var(--sk-ink) 6%, transparent);
}
.sk-thumb { flex: none; width: 72px; height: 72px; border-radius: 50%; }
.sk-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 11px; padding-top: 6px; }
.sk-price { flex: none; width: 44px; height: 18px; margin-top: 4px; border-radius: 999px; }
/* Header band in the menu's own colours (set from the design, see paintSkeleton). */
.sk-hero { display: none; --sk-ink: var(--sk-hero-ink, #fff); --sk-mix: 20%; background: var(--sk-hero); color: var(--sk-ink); padding: 28px 24px 64px; min-height: min(80vh, 720px); }
.menu-skeleton.has-hero .sk-hero { display: block; animation: fadeIn .3s ease; }
.menu-skeleton.has-hero .sk-head, .menu-skeleton.has-hero .sk-tabs { display: none; }
.menu-skeleton.has-hero .sk-wrap { max-width: 1120px; padding: 56px 24px 0; }
.menu-skeleton.has-hero .sk-title { height: 36px; width: min(70%, 380px); margin: 0 0 12px; }
.sk-hero-in { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.sk-lang { align-self: flex-end; width: 192px; height: 40px; border-radius: 999px; margin-bottom: 22px; }
.sk-hero-logo { width: 120px; height: 120px; border-radius: 30px; overflow: hidden; }
.sk-hero-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sk-hero-logo.has-logo { background: none; animation: none; }
.sk-hero-name { width: 100%; min-height: 1em; margin-top: 6px; font: 700 clamp(44px, 12vw, 84px)/1 "Playfair Display", "Cairo", serif; letter-spacing: -.01em; }
.sk-hero-name .sk-line { height: .7em; margin-top: .15em; }
.sk-sub { height: 22px; }
.sk-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sk-chips .sk { width: 96px; height: 34px; border-radius: 999px; }
.sk-chips .sk:nth-child(2) { width: 118px; }
.sk-tagline { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.sk-tagline .sk-line { height: 14px; }
@keyframes skShimmer { 0% { background-position: 0 0, 160% 0; } 100% { background-position: 0 0, -60% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ─── Loading screen (the La Stella welcome page, branded per business) ─── */
.loading-screen {
  --loader-accent: #ffd700;
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at top, #222 0%, #020202 40%, #000 100%);
  color: #f5f5f5;
  font-family: "Cairo", system-ui, -apple-system, sans-serif;
  transition: opacity .45s ease, visibility .45s ease;
}
.loading-screen::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -2;
  background: radial-gradient(circle at center, transparent 45%, rgba(0,0,0,.7) 100%);
}
.loading-screen::after {
  content: ""; position: fixed; inset: 18px; border-radius: 18px; pointer-events: none; z-index: -1;
  border: 1px solid color-mix(in srgb, var(--loader-accent) 28%, transparent);
  box-shadow: 0 0 25px color-mix(in srgb, var(--loader-accent) 25%, transparent), 0 0 60px rgba(0,0,0,.9) inset;
}
.loading-screen.done { opacity: 0; visibility: hidden; }
/* Custom loading page (theme.loaderHtml): a sandboxed frame over the standard screen. */
.loader-frame { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; display: block; opacity: 0; transition: opacity .25s ease; }
.loading-screen.custom-ready .loader-frame { opacity: 1; }
.loading-screen.has-custom > :not(.loader-frame), .loading-screen.is-pending > :not(.loader-frame) { visibility: hidden; }
.loading-screen.has-custom::before, .loading-screen.has-custom::after,
.loading-screen.is-pending::before, .loading-screen.is-pending::after { display: none; }
/* Not yet known whether this business has its own loading page: stay blank rather
   than flash the standard screen first (the colour is remembered after one visit). */
.loading-screen.is-pending { background: #fff; }
/* Loading screen switched off (menu.html body class): stays hidden unless the menu fails to load. */
body.loader-off .loading-screen { display: none; }
.loading-particles { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.loading-particle {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: color-mix(in srgb, var(--loader-accent) 85%, transparent);
  filter: blur(.3px); opacity: .7; animation: floatUp 9s linear infinite; animation-delay: -6s;
}
.loading-particle:nth-child(2) { width: 2px; height: 2px; left: 20%; animation-duration: 11s; animation-delay: -3s; opacity: .5; }
.loading-particle:nth-child(3) { width: 4px; height: 4px; left: 40%; animation-duration: 13s; animation-delay: -6s; opacity: .7; }
.loading-particle:nth-child(4) { width: 2px; height: 2px; left: 60%; animation-duration: 10s; animation-delay: -2s; opacity: .6; }
.loading-particle:nth-child(5) { width: 3px; height: 3px; left: 75%; animation-duration: 14s; animation-delay: -5s; opacity: .8; }
.loading-particle:nth-child(6) { width: 2px; height: 2px; left: 10%; animation-duration: 12s; animation-delay: -4s; opacity: .5; }
.loading-wrapper { text-align: center; padding: 24px; max-width: 92vw; }
.loading-logo-wrapper { width: 200px; height: 200px; margin: 0 auto 20px; position: relative; }
.loading-logo-wrapper::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%; z-index: -2; opacity: .8; filter: blur(2px);
  box-shadow: 0 0 35px color-mix(in srgb, var(--loader-accent) 40%, transparent), 0 0 70px color-mix(in srgb, var(--loader-accent) 18%, transparent);
}
.loading-screen:not(.has-logo) .loading-logo-wrapper { width: 96px; height: 96px; }
.loading-screen:not(.has-logo) .loading-logo-wrapper::before { animation: breathe 1.6s ease-in-out infinite; }
.loading-logo-wrapper img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 50%; animation: fadeIn .35s ease; }
.loading-headline { font-family: "Playfair Display", "Cairo", serif; font-size: 24px; margin-bottom: 6px; letter-spacing: .06em; min-height: 1.2em; }
:lang(ar) .loading-headline, :lang(he) .loading-headline { letter-spacing: 0; }
.loading-sub-headline { font-size: 14px; opacity: .88; }
.loading-sub-headline span {
  color: var(--loader-accent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  font-family: "Playfair Display", serif; font-size: 15px;
}
.loading-divider { width: 120px; height: 1px; margin: 18px auto; background: linear-gradient(to right, transparent, var(--loader-accent), transparent); }
.loading-status { margin-top: 10px; font-size: 13px; opacity: .8; display: inline-flex; align-items: center; gap: 8px; }
.loading-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--loader-accent); position: relative; flex: 0 0 auto; }
.loading-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--loader-accent) 60%, transparent);
  animation: ping 1s linear infinite; animation-delay: -.45s;
}
.loading-screen.is-error .loading-dot { background: #ef476f; }
.loading-screen.is-error .loading-dot::after { animation: none; }
.loader-retry {
  display: block; margin: 16px auto 0; padding: 8px 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--loader-accent); background: transparent; color: var(--loader-accent);
}
@keyframes ping { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes floatUp { 0% { transform: translateY(100vh); opacity: 0; } 10% { opacity: .75; } 90% { opacity: .4; } 100% { transform: translateY(-10vh); opacity: 0; } }
@keyframes breathe { 0%, 100% { opacity: .35; transform: scale(.94); } 50% { opacity: .9; transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) { .loading-logo-wrapper { width: 168px; height: 168px; } }
@media (prefers-reduced-motion: reduce) {
  .loading-particle, .loading-dot::after, .loading-logo-wrapper::before { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ─── Menu app shell ─── */
.menu-app { min-height: 100vh; transition: opacity .35s ease; }
.menu-app [data-cat-section] { scroll-margin-top: 76px; }
.menu-app img { touch-action: pan-y pinch-zoom; -webkit-user-drag: none; }

/* Generic photo frame (layouts restyle it) */
.item-photo-frame { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }
.item-photo-frame img, [class$="-photo"] img { width: 100%; height: 100%; display: block; }

/* Contact + footer defaults */
.menu-footer { text-align: center; padding: 28px 16px 40px; font-size: 13px; opacity: .85; }
.menu-footer .powered { margin: 14px 0 0; font-size: 11px; opacity: .6; }
.menu-footer .powered a { color: inherit; }
.contact-links .address { margin: 0 0 10px; }
.contact-links .links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.contact-links a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  text-decoration: none; color: inherit; border: 1px solid currentColor; font-size: 13px;
}

/* ─── Lightbox ─── */
.image-lightbox { position: fixed; inset: 0; z-index: 9998; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(0,0,0,.86); }
.image-lightbox.open { display: flex; }
.lightbox-img { max-width: min(96vw, 980px); max-height: 88vh; border-radius: 14px; border: 1px solid rgba(255,255,255,.2); box-shadow: 0 24px 80px rgba(0,0,0,.75); object-fit: contain; background: #05050a; }
.lightbox-close {
  position: fixed; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.65); color: #fff; font-size: 26px; line-height: 1;
}

/* ─── Item detail sheet (Photo Cards layout) ─── */
.item-sheet { position: fixed; inset: 0; z-index: 9997; background: rgba(10,12,20,0); display: flex; align-items: flex-end; justify-content: center; transition: background .25s ease; }
.item-sheet.open { background: rgba(10,12,20,.55); }
.sheet-panel {
  position: relative; width: min(100%, 560px); max-height: 88vh; overflow: auto; background: #fff; color: #16181d;
  border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform .25s ease;
  font-family: "Rubik", system-ui, sans-serif; padding-bottom: env(safe-area-inset-bottom);
}
.item-sheet.open .sheet-panel { transform: none; }
@media (min-width: 700px) { .item-sheet { align-items: center; } .sheet-panel { border-radius: 22px; } }
.sheet-close {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 24px; cursor: pointer;
}
.sheet-img { aspect-ratio: 4 / 3; overflow: hidden; background: #eef0f3; }
.sheet-img img { width: 100%; height: 100%; display: block; }
.sheet-text { padding: 20px 22px 26px; }
.sheet-text h2 { margin: 0 0 8px; font-size: 22px; }
.sheet-text p { margin: 0 0 14px; color: #5b6070; line-height: 1.6; }
.sheet-price { font-size: 20px; font-weight: 700; color: var(--accent, #009de0); }

/* ─── Custom HTML design ─── */
.layout-custom { background: #fff; }
.custom-frame { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* ─── Favourites, ingredient tags, menu note (all styles) ─── */
.item-extras { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.item-fav, .item-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; line-height: 1.5; padding: 1px 8px; border-radius: 999px; font-weight: 600; letter-spacing: 0; text-transform: none; font-style: normal; }
.item-fav { background: var(--accent, #d4a258); color: var(--accent-ink, #111); }
.item-tag { background: color-mix(in srgb, var(--tag, #888) 18%, transparent); color: color-mix(in srgb, var(--tag, #888) 70%, currentColor); border: 1px solid color-mix(in srgb, var(--tag, #888) 45%, transparent); }
.item-options { margin: 8px 0 0; display: grid; gap: 3px; font-size: 12px; line-height: 1.5; }
.item-options > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.item-options dt { font-weight: 700; opacity: .9; }
.item-options dt::after { content: ':'; }
.item-options dd { margin: 0; display: contents; }
.item-options dd span { opacity: .8; }
.item-options dd span + span::before { content: '·'; margin-inline-end: 6px; opacity: .6; }
.item-options b { font-weight: 600; font-variant-numeric: tabular-nums; }
.menu-note { max-width: 36em; margin: 0 auto 16px; font-size: 12.5px; line-height: 1.6; opacity: .85; }
