/* Guest-facing menu — themed via CSS variables injected per restaurant.
   Two skins: .sk-cards (app style) and .sk-editorial (print-inspired). */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--m-bg); color: var(--m-text);
    font-family: var(--m-font);
    font-size: 15px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 32px;
    /* embedded in the landing phone frame: don't chain-scroll the host page */
    overscroll-behavior-y: contain;
    scrollbar-width: none;
}
body::-webkit-scrollbar { display: none; }
/* room for the cart FAB / call buttons — only when they exist */
body.has-actions { padding-bottom: calc(98px + env(safe-area-inset-bottom)); }
a { color: var(--m-primary); }

/* ---- Category nav (shared structure) ---- */
.cats {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--m-bg) 90%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--m-line);
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.cats-inner {
    display: flex; gap: 8px; overflow-x: auto; padding: 11px 16px;
    scrollbar-width: none; max-width: 860px; margin: 0 auto;
}
.cats-inner::-webkit-scrollbar { display: none; }
.cats a {
    flex: 0 0 auto; white-space: nowrap; text-decoration: none;
    padding: 8px 16px; font-weight: 600; font-size: 13.5px;
    border-radius: max(var(--m-radius), 6px);
    color: var(--m-muted); background: var(--m-surface); border: 1px solid var(--m-line);
    transition: all .2s;
}
.cats a:hover { border-color: var(--m-primary); color: var(--m-text); }
.cats a.on { background: var(--m-primary); border-color: var(--m-primary); color: #fff; }

.m-body { max-width: 860px; margin: 0 auto; padding: 8px 18px 40px; }
.empty { text-align: center; opacity: .7; padding: 60px 0; }
.table-chip {
    display: inline-block; margin-top: 12px; padding: 4px 14px; border-radius: 30px;
    background: var(--m-primary); color: #fff; font-weight: 700; font-size: 13px;
}

/* ---- Featured (destaque) — shared ---- */
.destaque {
    margin-top: 34px; background: var(--m-text); color: var(--m-bg);
    border-radius: calc(var(--m-radius) + 4px); padding: 28px 28px; position: relative; overflow: hidden;
}
.destaque .et { font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--m-accent2); font-weight: 600; }
.destaque h3 { font-family: var(--m-display); font-size: 1.55rem; margin: 6px 0 4px; }
.destaque p { font-size: .92rem; opacity: .85; max-width: 46ch; }
.destaque .dpreco { font-family: var(--m-display); font-size: 1.5rem; color: var(--m-accent2); margin-top: 8px; }

/* ---- Legend + legal notes — shared ---- */
.legenda {
    margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--m-line);
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: .78rem; color: var(--m-muted);
}
.notas { font-size: .76rem; color: var(--m-muted); margin-top: 14px; max-width: 64ch; }
.b {
    font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    padding: 2.5px 8px; border-radius: 999px; line-height: 1.5;
    background: var(--m-bg2); color: var(--m-primary); border: 1px solid var(--m-line);
}
.b.hot { color: #c2571e; border-color: #e0b392; }
.leg-item { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Language switcher ---- */
.lang-bar {
    display: flex; justify-content: flex-end; gap: 6px; padding: 10px 16px 0;
    max-width: 860px; margin: 0 auto;
}
.lang-bar a {
    font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-decoration: none;
    padding: 4px 10px; border-radius: 999px; color: var(--m-muted);
    border: 1px solid var(--m-line); background: var(--m-surface);
}
.lang-bar a.on { background: var(--m-primary); border-color: var(--m-primary); color: #fff; }

/* ---- Footer — shared ---- */
.m-foot { text-align: center; color: var(--m-muted); font-size: 13px; margin: 44px 0 10px; }
.m-foot p { margin: 4px 0; }
.m-foot .fname { font-family: var(--m-display); font-size: 1.4rem; color: var(--m-text); margin-bottom: 8px; }
.finfo { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin: 6px 0; }
.powered { opacity: .6; margin-top: 14px !important; }
.powered a { color: var(--m-muted); }

/* ---- Scroll reveal ---- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ======================= CARDS SKIN ======================= */
.sk-cards .m-header { position: relative; }
.sk-cards .m-header .cover {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    filter: brightness(.45);
}
.sk-cards .m-header.solid .head-inner { padding-top: 34px; }
.sk-cards .head-inner { position: relative; text-align: center; padding: 46px 20px 26px; }
.sk-cards .logo {
    width: 84px; height: 84px; object-fit: cover; border-radius: calc(var(--m-radius) + 4px);
    box-shadow: 0 4px 18px rgba(0,0,0,.35); background: var(--m-surface);
}
.sk-cards .kicker { font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; color: var(--m-primary); font-weight: 600; margin-top: 12px; }
.sk-cards .head-inner h1 { margin: 8px 0 2px; font-size: 27px; letter-spacing: .3px; font-family: var(--m-display); }
.sk-cards .tagline { margin: 0; opacity: .85; }
.sk-cards .hours { margin: 6px 0 0; font-size: .8rem; letter-spacing: .08em; opacity: .75; }

.sk-cards .cat-sec h2 {
    font-size: 19px; margin: 26px 4px 6px; font-family: var(--m-display);
    border-left: 4px solid var(--m-primary); padding-left: 10px;
}
.sk-cards .cat-note { color: var(--m-muted); font-style: italic; font-size: 13px; margin: 0 4px 12px 14px; }
.sk-cards .prod {
    background: var(--m-surface); border-radius: var(--m-radius);
    overflow: hidden; margin-bottom: 12px; display: flex;
}
.sk-cards .pphoto { width: 108px; min-height: 100%; object-fit: cover; flex-shrink: 0; }
.sk-cards .pinfo { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.sk-cards .prow { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.sk-cards .prow h3 { margin: 0; font-size: 15.5px; }
.sk-cards .pprice { color: var(--m-primary); font-weight: 800; white-space: nowrap; font-family: var(--m-display); }
.sk-cards .ptags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.sk-cards .pdesc { margin: 4px 0 0; color: var(--m-muted); font-size: 13px; }
.sk-cards .padd {
    align-self: flex-end; margin-top: 8px; background: transparent;
    border: 1.5px solid var(--m-primary); color: var(--m-primary);
    border-radius: 30px; padding: 5px 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.sk-cards .padd:active { background: var(--m-primary); color: #fff; }
.sk-cards.layout-grid .plist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sk-cards.layout-grid .prod { flex-direction: column; margin-bottom: 0; }
.sk-cards.layout-grid .pphoto { width: 100%; height: 130px; }

/* ======================= EDITORIAL SKIN ======================= */
.sk-editorial .e-hero {
    text-align: center; padding: 50px 20px 30px; background: var(--m-bg2);
    border-bottom: 1px solid var(--m-line);
}
.sk-editorial .e-logo {
    width: 76px; height: 76px; object-fit: cover;
    border-radius: calc(var(--m-radius) * 1.8);
    margin-bottom: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
.sk-editorial .pre { font-size: .78rem; letter-spacing: .34em; text-transform: uppercase; color: var(--m-primary); font-weight: 600; }
.sk-editorial .e-hero h1 {
    font-family: var(--m-display); font-weight: 600; letter-spacing: .05em;
    font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1.05; margin: 10px 0 6px;
}
.sk-editorial .sub { font-size: .92rem; letter-spacing: .18em; text-transform: uppercase; color: var(--m-muted); }
.sk-editorial .orn { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--m-primary); margin-top: 18px; font-size: 1rem; }
.sk-editorial .orn::before, .sk-editorial .orn::after { content: ""; width: 56px; height: 1px; background: var(--m-primary); opacity: .6; }
.sk-editorial .horario { margin-top: 14px; font-size: .8rem; letter-spacing: .1em; color: var(--m-muted); }

.sk-editorial .cat-sec { padding-top: 40px; scroll-margin-top: 70px; }
.sk-editorial .sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 6px; }
.sk-editorial .sec-head h2 { font-family: var(--m-display); font-weight: 600; font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
.sk-editorial .sec-head .fio { flex: 1; height: 1px; background: var(--m-line); }
.sk-editorial .sec-head .n { font-size: .72rem; letter-spacing: .2em; color: var(--m-primary); text-transform: uppercase; font-weight: 600; }

.sk-editorial .item {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 18px;
    padding: 15px 0; border-bottom: 1px dashed var(--m-line);
}
.sk-editorial .item:last-child { border-bottom: none; }
.sk-editorial .nome { font-weight: 600; font-size: 1.03rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sk-editorial .desc { grid-column: 1; font-size: .88rem; color: var(--m-muted); max-width: 54ch; }
.sk-editorial .preco {
    grid-column: 2; grid-row: 1 / span 2; align-self: start;
    font-family: var(--m-display); font-weight: 600; font-size: 1.15rem;
    color: var(--m-primary); white-space: nowrap; display: flex; align-items: center; gap: 10px;
}
.sk-editorial .padd-mini {
    width: 27px; height: 27px; border-radius: 50%; border: 1.5px solid var(--m-primary);
    background: transparent; color: var(--m-primary); font-size: 16px; line-height: 1;
    font-weight: 700; cursor: pointer;
}
.sk-editorial .padd-mini:active { background: var(--m-primary); color: #fff; }
.sk-editorial .destaque { border-radius: 18px; }
.sk-editorial .e-hero .table-chip { margin-top: 16px; }

/* ---- Call buttons — shared ---- */
/* ---- Permanent action bar (guests at a table) ---- */
.actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--m-surface) 94%, transparent);
    border-top: 1px solid var(--m-line);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -6px 24px rgba(0,0,0,.18);
}
.actionbar button {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    background: transparent; color: var(--m-text); border: none;
    border-radius: 14px; padding: 7px 4px; font: inherit; cursor: pointer;
    transition: background .14s, opacity .14s;
}
.actionbar button:active { background: color-mix(in srgb, var(--m-text) 10%, transparent); }
.actionbar .ic { font-size: 17px; line-height: 1.15; }
.actionbar .lb { font-size: 11px; font-weight: 600; white-space: nowrap; opacity: .85; }
.actionbar .val { font-size: 11.5px; font-weight: 800; color: var(--m-primary); white-space: nowrap; }
.actionbar .badge {
    display: none; margin-left: 4px; background: var(--m-primary); color: #fff;
    border-radius: 999px; padding: 0 5px; font-size: 10px; font-weight: 800;
}
.actionbar button.has .badge { display: inline-block; }
.actionbar button.primary { background: var(--m-primary); color: #fff; }
.actionbar button.primary .val { color: #fff; }
.actionbar button.primary .badge { background: rgba(255,255,255,.28); }
.actionbar button.primary:disabled { background: transparent; color: var(--m-text); opacity: .45; }
.actionbar button.primary:disabled .val { color: var(--m-primary); }
.actionbar #tabFab.closed { opacity: .6; }
.sheet-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 45;
    display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
    background: var(--m-bg); width: 100%; max-width: 640px;
    border-radius: 18px 18px 0 0; padding: 16px; max-height: 80vh; display: flex; flex-direction: column;
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet-head .x { background: none; border: none; color: var(--m-muted); font-size: 17px; cursor: pointer; }
.sheet-body { overflow-y: auto; margin-bottom: 10px; }
.citem {
    display: flex; align-items: center; gap: 10px; background: var(--m-surface);
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius); padding: 9px 12px; margin-bottom: 8px;
}
.citem .cname { flex: 1; font-weight: 600; font-size: 14px; }
.citem .cprice { color: var(--m-muted); font-size: 13px; white-space: nowrap; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button {
    width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--m-primary);
    background: transparent; color: var(--m-primary); font-weight: 800; cursor: pointer; font-size: 14px; line-height: 1;
}
.qty span { min-width: 16px; text-align: center; font-weight: 700; }
.sheet textarea {
    width: 100%; background: var(--m-surface); color: var(--m-text);
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius); padding: 9px 12px; font: inherit; font-size: 13px; resize: none; margin-bottom: 10px;
}
.sheet .send {
    background: var(--m-primary); color: #fff; border: none; border-radius: 30px;
    padding: 13px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
}
.sheet .send:disabled { opacity: .6; }

/* ---- Order status — shared ---- */
.order-status {
    position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 25;
    background: var(--m-surface); color: var(--m-text);
    border: 1px solid var(--m-line);
    border-radius: 30px; padding: 8px 18px; font-size: 13.5px; font-weight: 700;
    box-shadow: 0 6px 22px rgba(0,0,0,.35);
}
.order-status.ready { background: var(--m-primary); color: #fff; border-color: transparent; }

/* ---- A sua mesa (running tab) ---- */
.tab-total {
    display: flex; justify-content: space-between; align-items: baseline;
    border-top: 1px solid var(--m-line); padding-top: 10px; margin-bottom: 10px;
    font-size: 14px; color: var(--m-muted);
}
.tab-total b { font-size: 19px; color: var(--m-text); }
.tab-rounds { color: var(--m-muted); font-size: 11.5px; margin-top: 10px; line-height: 1.7; }
.tab-closed {
    background: color-mix(in srgb, var(--m-primary) 14%, transparent);
    border-radius: var(--m-radius); padding: 9px 12px; font-size: 13px; margin-bottom: 10px;
}
.sheet .send.ghost { background: transparent; color: var(--m-text); border: 1px solid var(--m-line); }

/* ---- Toast — shared ---- */
.mtoast {
    position: fixed; bottom: calc(86px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 40;
    display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none;
}
.mtoast div {
    background: var(--m-surface); color: var(--m-text); border-radius: 30px; padding: 8px 18px;
    border: 1px solid var(--m-line);
    font-size: 13px; font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.3);
    animation: mt-in .18s ease;
}
@keyframes mt-in { from { opacity: 0; transform: translateY(8px); } }

/* ---- Editorial: photos, cover header and grid layout -------------------- */
/* "Estilo do cabeçalho = Foto de capa" */
.sk-editorial .e-hero.has-cover { position: relative; padding-top: 0; overflow: hidden; }
.sk-editorial .e-cover {
    height: 190px; margin: 0 -20px 18px; background-size: cover; background-position: center;
    position: relative;
}
.sk-editorial .e-cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 35%, var(--m-bg2));
}
.sk-editorial .e-hero.has-cover .e-logo { margin-top: -52px; position: relative; z-index: 2; }

/* "Mostrar fotos dos pratos" — thumbnail beside the dish (list layout) */
.sk-editorial .item.has-photo {
    grid-template-columns: 74px 1fr auto; align-items: start; column-gap: 14px;
}
.sk-editorial .item.has-photo .pphoto {
    grid-row: 1 / span 3; width: 74px; height: 74px; object-fit: cover;
    border-radius: max(var(--m-radius), 6px); display: block;
}
.sk-editorial .item.has-photo .nome { grid-column: 2; }
.sk-editorial .item.has-photo .desc { grid-column: 2; }
.sk-editorial .item.has-photo .preco { grid-column: 3; grid-row: 1 / span 2; }

/* "Layout dos pratos = Grelha (fotos grandes)" */
.sk-editorial.layout-grid .plist { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sk-editorial.layout-grid .item {
    grid-template-columns: 1fr auto; border-bottom: none; padding: 0 0 14px;
}
.sk-editorial.layout-grid .item.has-photo { grid-template-columns: 1fr auto; }
.sk-editorial.layout-grid .item.has-photo .pphoto {
    grid-row: auto; grid-column: 1 / span 2; width: 100%; height: 132px; margin-bottom: 8px;
}
.sk-editorial.layout-grid .item.has-photo .nome,
.sk-editorial.layout-grid .item .nome { grid-column: 1; }
.sk-editorial.layout-grid .item.has-photo .desc,
.sk-editorial.layout-grid .item .desc { grid-column: 1 / span 2; }
.sk-editorial.layout-grid .item.has-photo .preco,
.sk-editorial.layout-grid .item .preco { grid-column: 2; grid-row: auto; align-self: center; }
@media (max-width: 430px) {
    .sk-editorial.layout-grid .plist { grid-template-columns: 1fr; }
}
