html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

.produto-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.produto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #dc3545;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Ocorreu um erro. Recarregue a pagina.";
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #dc3545;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Carregando...");
}

/* ===== Cardapio (estilo cardapio digital de delivery) ===== */

.cardapio-wrapper {
    max-width: 768px;
}

.cardapio-wrapper.com-sacola {
    padding-bottom: 96px;
}

/* Cabecalho da loja */
.loja-capa {
    height: 130px;
    border-radius: .75rem .75rem 0 0;
    background: linear-gradient(135deg, #8e1c27, #dc3545 55%, #e4606d);
}

.loja-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 1.25rem 1rem;
    border: 1px solid #eee;
    border-top: 0;
    border-radius: 0 0 .75rem .75rem;
    background: #fff;
}

.loja-logo {
    width: 76px;
    height: 76px;
    min-width: 76px;
    margin-top: -38px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
}

.loja-dados {
    padding-top: .6rem;
}

.loja-nome {
    margin: 0;
    font-weight: 700;
}

.loja-status {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .85rem;
}

.status-aberto {
    color: #1f9e54;
    font-weight: 600;
}

.loja-detalhe {
    color: #6c757d;
}

/* Busca */
.cardapio-busca {
    position: relative;
    margin: 1rem 0 .5rem;
}

.busca-icone {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .9rem;
    opacity: .55;
    pointer-events: none;
}

.busca-input {
    padding-left: 2.5rem;
    border-radius: .6rem;
    background: #f5f5f5;
    border-color: #f5f5f5;
}

.busca-input:focus {
    background: #fff;
}

.busca-limpar {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #888;
    font-size: 1rem;
    padding: .25rem .5rem;
}

/* Navegacao de categorias (sticky) */
.categoria-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding: .65rem .1rem;
    background: #fff;
    border-bottom: 1px solid #eee;
    scrollbar-width: none;
}

.categoria-nav::-webkit-scrollbar {
    display: none;
}

.categoria-chip {
    border: 0;
    background: #f5f5f5;
    color: #555;
    font-weight: 500;
    font-size: .9rem;
    padding: .45rem 1rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.categoria-chip.ativo {
    background: #dc3545;
    color: #fff;
}

/* Secoes e itens */
.secao-titulo {
    font-weight: 700;
    margin: 1.5rem 0 .25rem;
}

.produto-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem .15rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background .15s;
}

.produto-row:hover {
    background: #fafafa;
}

.produto-row-info {
    flex: 1;
    min-width: 0;
}

.produto-row-nome {
    margin: 0 0 .25rem;
    font-weight: 600;
    color: #212529;
}

.produto-row-desc {
    margin: 0 0 .4rem;
    color: #6c757d;
    font-size: .85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.produto-row-tag {
    display: inline-block;
    margin-bottom: .4rem;
    font-size: .72rem;
    color: #555;
    background: #f1f1f1;
    border-radius: .35rem;
    padding: .1rem .45rem;
}

.produto-row-preco {
    display: flex;
    align-items: baseline;
    gap: .3rem;
}

.produto-row-preco .a-partir {
    font-size: .78rem;
    color: #6c757d;
}

.produto-row-preco .preco {
    font-weight: 600;
    color: #1f9e54;
}

.produto-row-img {
    width: 92px;
    height: 92px;
    min-width: 92px;
    border-radius: .6rem;
    background: #f6f6f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    overflow: hidden;
}

.produto-row-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Barra Ver sacola */
.sacola-bar {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 2rem));
    background: #dc3545;
    color: #fff;
    border-radius: .75rem;
    padding: .9rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    z-index: 1000;
    transition: filter .15s;
}

.sacola-bar:hover {
    filter: brightness(1.05);
}

.sacola-qtd {
    background: rgba(255, 255, 255, .25);
    border-radius: .4rem;
    padding: .1rem .55rem;
    font-weight: 600;
    font-size: .9rem;
}

.sacola-texto {
    font-weight: 600;
}

.sacola-total {
    font-weight: 700;
}

/* ===== Detalhe do produto (estilo cardapio digital de delivery) ===== */

.produto-detalhe {
    max-width: 768px;
    padding-bottom: 110px;
}

.voltar-btn {
    border: 0;
    background: transparent;
    color: #dc3545;
    font-weight: 600;
    padding: 0 0 .75rem;
}

.produto-hero {
    height: 220px;
    border-radius: .75rem;
    background: #f6f6f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.produto-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.produto-detalhe-nome {
    font-weight: 700;
    margin-bottom: .25rem;
}

.produto-detalhe-desc {
    color: #6c757d;
    font-size: .9rem;
    margin-bottom: .5rem;
}

.produto-detalhe-preco {
    display: flex;
    align-items: baseline;
    gap: .3rem;
    margin-bottom: 1rem;
}

.produto-detalhe-preco .a-partir {
    font-size: .8rem;
    color: #6c757d;
}

.produto-detalhe-preco .preco {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1f9e54;
}

/* Grupos de opcoes */
.grupo-opcoes {
    margin: 0 -0.75rem;
}

.grupo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #f5f5f5;
    padding: .7rem .9rem;
    margin-bottom: .25rem;
}

.grupo-titulo {
    margin: 0;
    font-weight: 700;
    font-size: .95rem;
}

.grupo-hint {
    color: #6c757d;
    font-size: .78rem;
}

.chip-obrigatorio {
    background: #3a3a3a;
    color: #fff;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: .25rem .55rem;
    border-radius: .35rem;
    white-space: nowrap;
}

.chip-opcional {
    background: #ececec;
    color: #666;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: .25rem .55rem;
    border-radius: .35rem;
    white-space: nowrap;
}

/* Linhas de opcao */
.opcao-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem .9rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background .15s;
}

.opcao-row:hover {
    background: #fafafa;
}

.opcao-row.selecionada {
    background: #fdf6f6;
}

.opcao-row.bloqueada {
    opacity: .45;
    cursor: default;
}

.opcao-info {
    flex: 1;
    min-width: 0;
}

.opcao-nome {
    font-weight: 500;
    color: #212529;
}

.opcao-desc {
    margin: .1rem 0 0;
    color: #6c757d;
    font-size: .8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.opcao-preco {
    display: block;
    margin-top: .15rem;
    font-size: .85rem;
    font-weight: 600;
    color: #1f9e54;
}

/* Marcadores (radio/checkbox customizados) */
.marcador {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #ccc;
    background: #fff;
    position: relative;
    transition: border-color .15s, background .15s;
}

.marcador.circulo {
    border-radius: 50%;
}

.marcador.quadrado {
    border-radius: .3rem;
}

.marcador.marcado {
    border-color: #dc3545;
    background: #dc3545;
}

.marcador.marcado::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Observacoes */
.obs-input {
    margin: .5rem .9rem 0;
    width: calc(100% - 1.8rem);
    border-radius: .6rem;
    background: #f9f9f9;
}

.obs-contador {
    display: block;
    text-align: right;
    color: #aaa;
    font-size: .75rem;
    margin: .2rem .9rem 0;
}

/* Barra fixa de adicionar */
.adicionar-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .08);
    padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom));
    z-index: 1000;
}

.adicionar-bar-conteudo {
    max-width: 768px;
    margin: 0 auto;
    display: flex;
    gap: .75rem;
}

.qtd-stepper {
    display: flex;
    align-items: center;
    gap: .25rem;
    border: 1px solid #ddd;
    border-radius: .6rem;
    padding: 0 .25rem;
}

.qtd-stepper button {
    border: 0;
    background: transparent;
    color: #dc3545;
    font-size: 1.4rem;
    font-weight: 700;
    width: 38px;
    height: 44px;
    line-height: 1;
}

.qtd-stepper button:disabled {
    color: #ccc;
}

.qtd-stepper span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.btn-adicionar {
    flex: 1;
    border: 0;
    background: #dc3545;
    color: #fff;
    border-radius: .6rem;
    padding: .7rem 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: filter .15s;
}

.btn-adicionar:hover:not(:disabled) {
    filter: brightness(1.05);
}

.btn-adicionar:disabled {
    background: #e9a1a8;
}
