/* Cardápio Digital Público (router=cardapio) - estilo próprio, separado do
   painel administrativo (sb-admin.css/theme.css são do template com
   sidebar). Mobile-first, inspirado no app do iFood: sem barra de topo,
   banner de borda a borda, botões flutuantes, fundo branco. */

:root {
    --menu-brand: #ea1d2c;
    --menu-brand-dark: #c8121f;
    --menu-brand-tint: #fdeaec;
}

html, body {
    height: 100%;
}

body.menu-body {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

.menu-main {
    flex: 1 0 auto;
}

/* ==========================================================================
   Botões flutuantes (voltar / busca / login) - substituem a barra de topo
   ========================================================================== */
.menu-float-btn {
    position: fixed;
    top: 0.9rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(33, 37, 41, 0.55);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1040;
    text-decoration: none;
    backdrop-filter: blur(2px);
    /* isolation+contain evitam que, durante o scroll rápido, o navegador mostre um frame
       "cru" (sem blur) do conteúdo rolando por trás antes de recompor o backdrop-filter -
       o botão deve sempre aparecer borrado/translúcido, nunca deixar o produto passar nítido. */
    isolation: isolate;
    contain: paint;
}

.menu-float-btn:hover {
    background: rgba(33, 37, 41, 0.75);
    color: #fff;
}

.menu-float-back {
    left: 0.9rem;
}

.menu-float-actions {
    position: fixed;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 1040;
    display: flex;
    gap: 0.6rem;
}

.menu-float-actions .menu-float-btn,
.menu-float-actions .dropdown {
    position: static;
}

.menu-float-avatar {
    background: var(--menu-brand);
    font-weight: 700;
    font-size: 0.95rem;
}

/* ==========================================================================
   Campo de busca expandido no estado "grudado" (ver body.menu-nav-pinned,
   controlado por menu.js) - substitui o ícone circular por uma barra de
   verdade, igual ao app do iFood.
   ========================================================================== */
.menu-pinned-searchbar {
    display: none;
    position: fixed;
    top: 0.9rem;
    left: 0.9rem;
    right: 56px;
    height: 40px;
    background: #f1f3f5;
    border-radius: 999px;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1rem;
    z-index: 1041;
}

.menu-pinned-searchbar i {
    color: #868e96;
    font-size: 0.9rem;
}

.menu-pinned-searchbar input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    color: #212529;
}

body.menu-nav-pinned .menu-pinned-searchbar {
    display: flex;
}

body.menu-nav-pinned #menu-search-toggle {
    display: none;
}

/* ==========================================================================
   Botões Bootstrap padrão (Entrar, Cadastrar, Adicionar, Finalizar Pedido) -
   sobrescreve o azul padrão do Bootstrap pelo vermelho da marca, só dentro
   do cardápio público (não afeta o painel administrativo).
   ========================================================================== */
body.menu-body .btn-primary {
    background-color: var(--menu-brand);
    border-color: var(--menu-brand);
}

body.menu-body .btn-primary:hover,
body.menu-body .btn-primary:focus,
body.menu-body .btn-primary:active {
    background-color: var(--menu-brand-dark) !important;
    border-color: var(--menu-brand-dark) !important;
}

.menu-auth-page a,
.menu-content .alert a {
    color: var(--menu-brand);
}

/* ==========================================================================
   Overlay de busca (abre ao clicar no botão flutuante de busca)
   ========================================================================== */
.menu-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.9rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    z-index: 1035;
}

.menu-search-overlay-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f1f3f5;
    border-radius: 999px;
    padding: 0.8rem 1.1rem;
}

.menu-search-overlay-inner i.fa-search {
    color: #868e96;
    font-size: 0.95rem;
}

.menu-search-overlay-inner input,
.menu-search-overlay-inner input:focus {
    background: transparent !important;
    border: none !important;
    padding: 0;
    margin: 0;
    flex: 1 1 auto;
    font-size: 1rem;
    line-height: 1.3;
    color: #212529;
    box-shadow: none !important;
}

.menu-search-overlay-inner .btn-link {
    font-size: 1.1rem;
    line-height: 1;
}

/* ==========================================================================
   HERO (banner de borda a borda) + cartão de informações sobreposto
   ========================================================================== */
.menu-hero {
    position: relative;
    margin-bottom: 0;
}

.menu-hero-banner {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.menu-hero-banner-placeholder {
    background: linear-gradient(135deg, #343a40, #495057);
}

@media (min-width: 768px) {
    .menu-hero-banner,
    .menu-hero-banner-placeholder {
        height: 300px;
    }
}

.menu-info-card {
    position: relative;
    margin: -28px 0.9rem 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
    padding: 0.9rem 1rem 1rem;
    z-index: 5;
}

.menu-info-card.has-logo {
    padding-top: 3.25rem;
}

.menu-info-logo {
    position: absolute;
    top: -38px;
    left: 1rem;
    width: 80px;
    height: 80px;
    object-fit: cover;
    background: #fff;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* No desktop o banner é bem mais alto (300px) e o card ocupa a largura toda, o
   que faz a logo de 80px parecer minúscula. A partir de 768px ela cresce junto,
   mantendo a mesma proporção de meia-lua sobre a borda do card. */
@media (min-width: 768px) {
    .menu-info-card.has-logo {
        padding-top: 4.25rem;
    }

    .menu-info-logo {
        top: -52px;
        width: 110px;
        height: 110px;
        border-width: 4px;
    }
}

.menu-content {
    padding-top: 0.5rem;
    padding-bottom: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

/* O aviso "Navegue à vontade..." (só aparece pra quem não está logado) usa a
   mesma largura/centralização de .menu-content, mas não deve herdar o
   padding-bottom de 3rem pensado pro final da lista de produtos - isso
   deixava um vão enorme entre o aviso e o menu de categorias logo abaixo. */
.menu-guest-notice,
#menu-install-card {
    padding-bottom: 0;
}

.menu-store-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 0.4rem;
}

.menu-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.menu-status-badge.is-open {
    color: #198754;
}

.menu-status-badge.is-open i {
    font-size: 0.5rem;
}

.menu-status-badge.is-closed {
    color: #dc3545;
}

/* ==========================================================================
   Chips de tempo médio (entrega/retirada)
   ========================================================================== */
.menu-time-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #495057;
}

.menu-time-chip i {
    color: var(--menu-brand);
}

/* ==========================================================================
   Login / Cadastro
   ========================================================================== */
.menu-auth-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4.5rem;
}

.menu-auth-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.menu-footer {
    flex-shrink: 0;
}

/* ==========================================================================
   Menu de categorias (pílulas horizontais, sticky, com scroll-spy via menu.js)
   ========================================================================== */
.menu-nav-sentinel {
    height: 0;
}

.menu-nav-spacer {
    display: none;
}

.menu-nav-spacer.is-active {
    display: block;
}

.menu-category-nav {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    z-index: 1015;
    margin-top: 1rem;
    /* isolation cria um contexto de empilhamento próprio pra esta barra, e contain:paint
       garante que o navegador nunca pinte conteúdo de fora por cima dela (nem o inverso). */
    isolation: isolate;
    contain: paint;
}

/* Estado "grudado": menu.js troca sticky por fixed controlado via JS (em vez de
   position:sticky) assim que este menu alcançaria o topo - igual ao app do iFood,
   vira uma única barra opaca contendo os botões flutuantes + as categorias, sem
   nenhuma faixa onde o produto role visível por baixo. Ao voltar pro topo da
   página, menu.js remove esta classe e tudo volta ao comportamento original
   (botões translúcidos soltos sobre o banner, menu de categorias no fluxo normal). */
.menu-category-nav.is-pinned {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-top: 0;
    /* 60px reservados pros botões flutuantes de busca/login, que continuam por
       cima (z-index maior) - o fundo branco desta barra agora cobre essa faixa
       também, então nada rola visível atrás deles. */
    padding-top: 60px;
}

/* A barra branca (.menu-category-nav) continua ocupando a largura toda, mas as
   pílulas em si seguem a mesma coluna do resto do cardápio: 900px centralizados,
   com 1rem de padding lateral pra bater exatamente com o `px-3` de .menu-content.
   Sem isso, em tela de PC as categorias ficavam coladas na borda esquerda
   enquanto os títulos das seções apareciam bem mais pra dentro. Abaixo de 900px
   o max-width não tem efeito, então o mobile fica igual ao que já era. */
.menu-category-nav-scroller {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.6rem 1rem;
    scrollbar-width: none;
    max-width: 900px;
    margin: 0 auto;
}

.menu-category-nav-scroller::-webkit-scrollbar {
    display: none;
}

.menu-category-pill {
    flex: 0 0 auto;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: #f1f3f5;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
    scroll-snap-align: start;
}

.menu-category-pill:hover {
    background: #e9ecef;
    color: #343a40;
}

.menu-category-pill.active {
    background: var(--menu-brand);
    color: #fff;
}

/* ==========================================================================
   Seções de categoria
   ========================================================================== */
.menu-category-section {
    scroll-margin-top: 112px;
    margin-bottom: 2rem;
}

.menu-category-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 0.85rem;
}

.menu-product-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #fd7e14;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* ==========================================================================
   Destaques - carrossel horizontal (estilo iFood)
   ========================================================================== */
.menu-featured-scroller {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.menu-featured-scroller::-webkit-scrollbar {
    display: none;
}

.menu-featured-card {
    /* Mesmo tamanho de foto da exibição padrão dos produtos (.menu-product-row-photo),
       pra manter consistência visual entre o carrossel de Destaques e as listas por categoria. */
    flex: 0 0 110px;
    width: 110px;
    cursor: pointer;
}

.menu-featured-photo {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ced4da;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.menu-featured-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-featured-price {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #212529;
}

.menu-featured-price i,
.menu-brand-icon {
    font-size: 0.75rem;
    color: var(--menu-brand);
}

.menu-featured-price-old {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 0.15rem;
}

.menu-featured-discount-pill {
    background: #6f42c1;
    color: #fff;
    font-weight: 700;
    font-size: 0.68rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    text-decoration: none;
}

.menu-featured-name {
    font-size: 0.85rem;
    color: #495057;
    margin-top: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Lista de produtos por categoria - texto à esquerda, imagem à direita
   (estilo iFood), linhas separadas por divisor, sem cartão/sombra
   ========================================================================== */
.menu-product-list {
    display: flex;
    flex-direction: column;
}

.menu-product-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
}

.menu-product-row:last-child {
    border-bottom: none;
}

.menu-product-row-info {
    flex: 1 1 auto;
    min-width: 0;
}

.menu-product-name {
    font-weight: 700;
    font-size: 0.98rem;
    color: #212529;
    margin-bottom: 0.25rem;
}

.menu-product-description {
    font-size: 0.82rem;
    color: #868e96;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.menu-product-price-current {
    font-size: 0.92rem;
    font-weight: 600;
    color: #212529;
}

.menu-product-row-photo {
    position: relative;
    flex: 0 0 110px;
    width: 110px;
    height: 110px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ced4da;
    font-size: 1.6rem;
}

.menu-product-row-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   "Peça novamente" (último pedido do cliente, estilo iFood) - a foto mescla
   os dois primeiros produtos do pedido lado a lado num único quadrado
   (.is-split); com um produto só, a única metade preenche o quadrado inteiro.
   ========================================================================== */
.menu-last-order-section {
    margin-bottom: 2rem;
}

.menu-last-order-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.menu-last-order-photo {
    flex: 0 0 90px;
    width: 90px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    background: #fff;
}

.menu-last-order-photo-half {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    color: #ced4da;
    font-size: 1.4rem;
    overflow: hidden;
}

.menu-last-order-photo.is-split .menu-last-order-photo-half {
    flex: 1 1 50%;
}

.menu-last-order-photo-half img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-last-order-info {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 0.1rem;
}

.menu-last-order-items {
    margin-bottom: 0.4rem;
}

.menu-last-order-item-line {
    font-size: 0.85rem;
    color: #343a40;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-last-order-total {
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.3rem;
}

.menu-last-order-add-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--menu-brand);
    font-weight: 700;
    font-size: 0.9rem;
}

.menu-last-order-add-btn:hover,
.menu-last-order-add-btn:focus {
    color: var(--menu-brand-dark);
}

/* ==========================================================================
   Botão flutuante do carrinho
   ========================================================================== */
.menu-cart-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--menu-brand);
    color: #fff;
    border: none;
    font-size: 1.3rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-cart-fab-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

/* ==========================================================================
   Modal de produto
   ========================================================================== */
/* Foto inteira, sem corte: com object-fit: cover numa faixa de 180px, uma foto
   quadrada (formato recomendado, o mesmo da lista) mostrava só ~40% do meio -
   garrafa sem tampa nem base. contain + fundo branco (mesmo fundo dos quadros
   de foto da lista) deixa faixas brancas nas laterais em vez de cortar. */
.menu-product-modal-photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 300px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   Rodapé do modal de produto - seletor de quantidade + botão Adicionar,
   estilo iFood (pílula cinza sem borda + botão vermelho com o total ao vivo)
   ========================================================================== */
.menu-modal-footer {
    /* O .modal-footer padrão do Bootstrap vem com flex-wrap:wrap e margin
       em cada filho direto - sem anular os dois, a pílula de quantidade e o
       botão Adicionar quebravam linha em vez de ficar lado a lado. */
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
}

.menu-modal-footer > * {
    margin: 0;
}

.menu-modal-qty-pill {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #f1f3f5;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    flex: 0 0 auto;
}

.menu-modal-qty-btn {
    background: none;
    border: none;
    padding: 0;
    color: #212529;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-modal-qty-pill input {
    background: transparent;
    border: none;
    padding: 0;
    width: 20px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #212529;
}

/* Destaque temporário no grupo de complementos obrigatório que faltou
   selecionar - some sozinho depois de 1.5s (ver scrollToValidationError() em
   menu.js). Sem isso, no celular, a mensagem de erro caía fora da área
   visível do modal (modal-dialog-scrollable rola só o modal-body, não a
   página) e o cliente ficava sem saber por que "Adicionar" não fazia nada. */
.menu-validation-highlight {
    outline: 2px solid #dc3545;
    outline-offset: 4px;
    border-radius: 4px;
    transition: outline-color 0.3s ease;
}

/* Características do produto no modal (vegano, sem glúten, serve 2, 500 g).
   Chips discretos: são informação de apoio, não podem competir com o preço nem
   com o botão de adicionar. */
.menu-product-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    line-height: 1;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: #eef6ee;
    color: #2f6b39;
    border: 1px solid #d7e9d9;
}

/* Porção e peso são medida, não restrição - saem do verde pra não sugerir
   "adequado a dieta X". */
.menu-product-feature-size {
    background: #f1f3f5;
    color: #495057;
    border-color: #e0e3e6;
}

/* Miniatura opcional do adicional (complement.image_path), entre o
   checkbox/radio e o nome. Fica na altura de duas linhas de texto pra dar pra
   reconhecer a foto sem empurrar a lista toda pra baixo. */
.menu-complement-photo {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border: 1px solid #e9ecef;
}

/* Espaçador dos adicionais sem foto num grupo onde outros têm - mantém o
   alinhamento dos nomes sem desenhar uma moldura vazia na tela. */
.menu-complement-photo-empty {
    display: inline-block;
    border-color: transparent;
}

/* Versão compacta do pill de quantidade, pro seletor de quantidade de cada
   complemento/adicional (allow_quantity='S') - mesmo modelo do
   .menu-modal-qty-pill acima, só menor pra caber ao lado do checkbox/label. */
.menu-complement-qty-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #f1f3f5;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    flex: 0 0 auto;
}

.menu-complement-qty-btn {
    background: none;
    border: none;
    padding: 0;
    color: #212529;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-complement-qty-pill input {
    background: transparent;
    border: none;
    padding: 0;
    width: 16px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #212529;
}

.menu-modal-add-btn {
    flex: 1 1 0%;
    min-width: 0;
    background: var(--menu-brand);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.menu-modal-add-btn:hover,
.menu-modal-add-btn:focus {
    background: var(--menu-brand-dark);
    color: #fff;
}

/* Faltando grupo obrigatório (ver updateAddButtonState() em menu.js). Só
   aparência de desabilitado - sem o atributo disabled o clique continua
   chegando e rola até o grupo pendente, em vez de o botão só "não fazer nada". */
.menu-modal-add-btn.menu-modal-add-btn-blocked,
.menu-modal-add-btn.menu-modal-add-btn-blocked:hover,
.menu-modal-add-btn.menu-modal-add-btn-blocked:focus {
    background: #adb5bd;
    color: #fff;
    cursor: not-allowed;
}

/* ==========================================================================
   Notificações push (ver public/sw.js, App\Services\PushNotifier)
   ========================================================================== */
.menu-push-btn {
    border: 1px solid var(--menu-brand);
    color: var(--menu-brand);
    background: #fff;
    font-size: 0.78rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
}

.menu-push-btn:hover {
    background: var(--menu-brand-tint);
    color: var(--menu-brand);
}

.menu-push-btn.menu-push-btn-active {
    background: var(--menu-brand-tint);
    color: var(--menu-brand);
    opacity: 1;
}

/* ==========================================================================
   Carrinho (offcanvas) - layout "sacola" estilo iFood
   ========================================================================== */
.menu-cart-offcanvas {
    /* !important necessário: o Bootstrap define a largura padrão (400px) via
       .offcanvas-end{width:var(--bs-offcanvas-width)}, mesma especificidade
       de uma classe só - sem isso o painel ficava mais largo que a tela no
       celular, cortando o conteúdo à esquerda. */
    width: 100vw !important;
    max-width: 480px !important;
}

.menu-cart-topbar {
    padding: 1rem;
    border-bottom: none;
}

.btn-close-custom {
    background: none;
    border: none;
    color: #495057;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
}

.menu-cart-title {
    flex: 1 1 auto;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    margin: 0;
}

.menu-cart-clear-link {
    background: none;
    border: none;
    color: var(--menu-brand);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0;
}

.menu-cart-store-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.5rem 1rem 1.25rem;
}

.menu-cart-store-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 52px;
}

.menu-cart-store-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    color: #ced4da;
    font-size: 1.3rem;
}

.menu-cart-store-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #212529;
}

.menu-cart-add-more {
    background: none;
    border: none;
    color: var(--menu-brand);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0;
}

.menu-cart-add-more-block {
    display: block;
    margin: 1rem 0 1.5rem;
}

.menu-cart-section-title {
    font-weight: 700;
    font-size: 1rem;
    color: #212529;
    margin-bottom: 0.75rem;
}

.menu-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f1f3f5;
}

.menu-cart-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0;
    padding-bottom: 0;
}

.menu-cart-item-photo {
    position: relative;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ced4da;
    font-size: 1.3rem;
}

.menu-cart-item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.menu-cart-item-edit {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--menu-brand);
    font-size: 0.65rem;
}

.menu-cart-item-info {
    flex: 1 1 auto;
    min-width: 0;
}

.menu-cart-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #212529;
}

.menu-cart-item-complements {
    font-size: 0.78rem;
    color: #868e96;
    margin-top: 0.15rem;
}

.menu-cart-item-observation {
    font-size: 0.78rem;
    color: #868e96;
    font-style: italic;
}

.menu-cart-item-price {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
    margin-top: 0.4rem;
}

/* Botão de quantidade: fundo cinza, sem borda, "-"/lixeira e "+" */
.menu-qty-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    background: #f1f3f5;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    flex: 0 0 auto;
    width: fit-content;
}

.menu-qty-pill button {
    background: none;
    border: none;
    padding: 0;
    color: #212529;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-qty-pill .menu-qty-pill-remove {
    color: var(--menu-brand);
}

.menu-qty-pill span {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 12px;
    text-align: center;
}

/* "Peça também" - reaproveita o cartão do carrossel de Destaques, só reduz
   um pouco o tamanho pra caber melhor dentro do offcanvas */
#menu-cart-suggestions-wrapper .menu-featured-scroller {
    padding: 0 0 1.5rem;
}

#menu-cart-suggestions .menu-featured-card {
    flex-basis: 120px;
    width: 120px;
}

#menu-cart-suggestions .menu-featured-photo {
    width: 120px;
    height: 120px;
}

.menu-cart-suggestion-add {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: var(--menu-brand);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* ==========================================================================
   Checkout
   ========================================================================== */
.menu-checkout-page {
    max-width: 600px;
    padding-top: 4rem;
}

.menu-type-option {
    display: block;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.menu-type-option:has(input:checked) {
    border-color: var(--menu-brand);
    background: var(--menu-brand-tint);
    color: var(--menu-brand);
}

.menu-address-option {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
}

.menu-address-option:has(input:checked) {
    border-color: var(--menu-brand);
    background: var(--menu-brand-tint);
}

/* ==========================================================================
   Acompanhamento gráfico do pedido (esteira vertical) - tela de confirmação
   ========================================================================== */
.menu-track-timeline {
    display: flex;
    flex-direction: column;
}

.menu-track-step {
    display: flex;
    gap: 0.9rem;
}

.menu-track-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 34px;
}

.menu-track-step-marker {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex: 0 0 34px;
    background: #f1f3f5;
    color: #adb5bd;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-track-step-line {
    width: 2px;
    flex: 1 1 auto;
    min-height: 26px;
    background: #e9ecef;
    margin: 2px 0;
}

.menu-track-step-body {
    padding-top: 0.35rem;
    padding-bottom: 1.4rem;
}

.menu-track-step:last-child .menu-track-step-body {
    padding-bottom: 0;
}

.menu-track-step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #adb5bd;
}

.menu-track-step-hint {
    font-size: 0.78rem;
    color: #868e96;
    margin-top: 0.15rem;
}

.menu-track-step.is-done .menu-track-step-marker {
    background: var(--menu-brand);
    color: #fff;
}

.menu-track-step.is-done .menu-track-step-line {
    background: var(--menu-brand);
}

.menu-track-step.is-done .menu-track-step-label {
    color: #212529;
}

.menu-track-step.is-current .menu-track-step-marker {
    background: var(--menu-brand-tint);
    color: var(--menu-brand);
    box-shadow: 0 0 0 3px var(--menu-brand-tint);
    animation: menuTrackPulse 1.8s infinite;
}

.menu-track-step.is-current .menu-track-step-label {
    color: var(--menu-brand);
}

@keyframes menuTrackPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 29, 44, 0.35);
    }
    70% {
        box-shadow: 0 0 0 9px rgba(234, 29, 44, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(234, 29, 44, 0);
    }
}

.menu-track-cancelled {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #f8f9fa;
    border: 1px solid #f1f3f5;
    border-radius: 10px;
}

.menu-track-cancelled i {
    font-size: 2rem;
    color: #dc3545;
    margin-bottom: 0.5rem;
    display: block;
}

.menu-track-updated {
    font-size: 0.72rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Avaliação do pedido finalizado (views/menu/_order_rating.php)
   ========================================================================== */
.menu-rating {
    margin-top: 1rem;
    padding: 1rem;
    background: #fffaf0;
    border: 1px solid #ffe8b3;
    border-radius: 10px;
}

.menu-rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
    color: #f5a623;
    font-size: 1.75rem;
}

.menu-rating-stars.is-readonly {
    font-size: 1.35rem;
    gap: 0.2rem;
}

.menu-rating-star {
    background: none;
    border: 0;
    padding: 0.15rem;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.menu-rating-star:active {
    transform: scale(0.9);
}

.menu-rating-star:focus-visible {
    outline: 2px solid #f5a623;
    outline-offset: 2px;
    border-radius: 4px;
}

.menu-rating-label {
    color: #b7791f;
    min-height: 1.2em;
}

/* Resposta da loja à avaliação (views/menu/_order_rating.php) */
.menu-rating-reply {
    padding: 0.6rem 0.75rem;
    background: #fff;
    border-left: 3px solid var(--menu-brand);
    border-radius: 6px;
    text-align: left;
}

/* Convite pra instalar o app da loja (PWA) - ver views/menu/index.php e
   public/js/menu.js. */
.menu-install-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem .9rem;
    border-radius: 12px;
    background: var(--menu-brand-tint);
}

.menu-install-icon {
    font-size: 1.5rem;
    color: var(--menu-brand);
    flex-shrink: 0;
}

.menu-install-text {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
}
