:root {
    --blue: #305084;
    --blue-dk: #1e3560;
    --blue-lt: #4a6fa5;
    --cream: #e8e8e5;
    --cream-lt: #f4f4f2;
    --white: #ffffff;
    --text: #1c2840;
    --muted: #5a6a84;
    --gold: #c4922a;
    --shadow: 0 8px 30px rgba(20, 35, 70, .09);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--cream);
    color: var(--text);
    background-image: radial-gradient(circle at 20% 30%, rgba(48, 80, 132, .05) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(48, 80, 132, .04) 0%, transparent 50%);
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
}


/* ── HEADER ─────────────────────────────── */

.menu-header {
    background: linear-gradient(150deg, var(--blue-dk) 0%, var(--blue) 60%, var(--blue-lt) 100%);
    color: #fff;
    padding: 48px 20px 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.menu-header::before,
.menu-header::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    pointer-events: none;
}

.menu-header::before {
    width: 380px;
    height: 380px;
    top: -120px;
    left: -100px;
}

.menu-header::after {
    width: 260px;
    height: 260px;
    bottom: -80px;
    right: -60px;
    background: rgba(196, 146, 42, .07);
}

.menu-header-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .15), 0 12px 30px rgba(0, 0, 0, .3);
    margin-bottom: 16px;
}

.menu-header h1 {
    font-size: 2.4rem;
    margin-bottom: 6px;
}

.menu-header p {
    font-size: .9rem;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 20px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 30px;
    padding: 7px 16px;
    transition: color .2s, border-color .2s, background .2s;
}


/* ── Carrinho no topo ───────────────────── */

.cart-btn {
    all: unset;
    box-sizing: border-box;
    text-decoration: none;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1.5px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    transition: background-color .15s ease, transform .1s ease;
}

.cart-btn:hover {
    background: rgba(255, 255, 255, .22);
}

.cart-btn:active {
    transform: scale(0.95);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #b5451b;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    border-radius: 999px;
    border: 2px solid var(--blue-dk);
}


/* ── Carrinho flutuante (aparece ao rolar a página) ─────── */

.cart-float {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 40;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(20, 35, 70, .35);
    text-decoration: none;
    animation: cartFloatPulso 1.8s ease-in-out infinite;
}

.cart-float:hover {
    background: var(--blue-dk);
}

.cart-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #b5451b;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 999px;
    border: 2px solid #fff;
}

@keyframes cartFloatPulso {
    0%,
    100% {
        box-shadow: 0 6px 20px rgba(20, 35, 70, .35), 0 0 0 0 rgba(48, 80, 132, .55);
    }
    50% {
        box-shadow: 0 6px 20px rgba(20, 35, 70, .35), 0 0 0 10px rgba(48, 80, 132, 0);
    }
}

@media (max-width: 480px) {
    .cart-float {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
}

.btn-back:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .1);
}

.header-divider {
    width: 100%;
    line-height: 0;
    margin-top: -1px;
}

.header-divider svg {
    display: block;
    width: 100%;
    height: 50px;
}


/* ── CONTAINER ──────────────────────────── */

.container {
    width: 90%;
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 0 80px;
}


/* ── CATEGORIA ──────────────────────────── */

.category {
    margin-bottom: 48px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(48, 80, 132, .1);
}

.category-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.category-title {
    font-size: 1.5rem;
    color: var(--blue);
}


/* ── GRID DE PIZZAS ─────────────────────── */

.pizza-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.pizza-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(48, 80, 132, .07);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pizza-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(20, 35, 70, .13);
}

.pizza-item.destaque {
    border-color: var(--gold);
    background: linear-gradient(135deg, #fff 80%, rgba(196, 146, 42, .05));
}

.pizza-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.pizza-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.pizza-item.destaque .pizza-item-name {
    color: var(--blue);
}

.pizza-item-badge {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(196, 146, 42, .1);
    border: 1px solid rgba(196, 146, 42, .25);
    border-radius: 20px;
    padding: 3px 9px;
    white-space: nowrap;
    flex-shrink: 0;
}

.pizza-item-desc {
    font-size: .83rem;
    color: var(--muted);
    line-height: 1.65;
}


/* ── TRIO ───────────────────────────────── */

.trio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.trio-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(48, 80, 132, .07);
    text-align: center;
}

.trio-item-name {
    font-size: .95rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 6px;
}

.trio-item-desc {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 10px;
}


/* ── RODAPÉ ─────────────────────────────── */

.menu-footer {
    background: var(--blue-dk);
    color: rgba(255, 255, 255, .55);
    text-align: center;
    padding: 28px 20px;
    font-size: .85rem;
}

.menu-footer strong {
    color: var(--gold);
}

.menu-footer-note {
    font-style: italic;
    color: rgba(255, 255, 255, .4);
    font-size: .78rem;
    margin-top: 6px;
}


/* ═══════════════════════════════════════════════════════════════
   BOTÃO DE MARCAR — substitui o span/div de preço.
   Estrutura pensada para deixar claro que é uma ação, e não só o preço:
   ícone de "adicionar" antes do preço → some e vira "✓ Marcado" ao clicar.
   ═══════════════════════════════════════════════════════════════ */

.pizza-item-price,
.trio-item-price {
    all: unset;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: auto;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    color: #b5451b !important;
    cursor: pointer;
    border: 1.5px solid #b5451b !important;
    border-radius: 999px !important;
    padding: 9px 18px !important;
    min-height: 44px;
    max-width: 100%;
    background-color: #fff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease;
}

.trio-item-price {
    margin-top: 8px;
    width: 100%;
}


/* Ícone "+" antes do preço: sinaliza que é possível adicionar/marcar o item */

.pizza-item-price::before,
.trio-item-price::before {
    content: "+";
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.pizza-item-price:hover,
.trio-item-price:hover {
    background-color: #fdf1ea !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

.pizza-item-price:active,
.trio-item-price:active {
    transform: scale(0.97);
}


/* Estado marcado: fundo verde + texto "Marcado" no lugar do preço puro */

.pizza-item-price[aria-pressed="true"],
.trio-item-price[aria-pressed="true"] {
    background-color: #2e7d32 !important;
    border-color: #2e7d32 !important;
    color: #fff !important;
}

.pizza-item-price[aria-pressed="true"]::before,
.trio-item-price[aria-pressed="true"]::before {
    content: "✓";
}

.pizza-item-price[aria-pressed="true"]::after,
.trio-item-price[aria-pressed="true"]::after {
    content: "Marcado";
    font-size: .8rem;
    font-weight: 600;
    opacity: .9;
    margin-left: 2px;
}


/* Item esgotado (desligado no painel admin): fica cinza e travado */

.pizza-item-price.indisponivel,
.trio-item-price.indisponivel {
    background-color: #f0f0ed !important;
    border-color: #d8d8d4 !important;
    color: #9a9a94 !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

.pizza-item-price.indisponivel::before,
.trio-item-price.indisponivel::before {
    content: "";
}

.pizza-item-price.indisponivel:hover,
.trio-item-price.indisponivel:hover {
    background-color: #f0f0ed !important;
    box-shadow: none !important;
}

.pizza-item {
    position: relative;
}

.pizza-item:has(.pizza-item-price.indisponivel) {
    opacity: .6;
}


/* ═══════════════════════════════════════════════════════════════
   BARRA DE TOTAL FIXA
   ═══════════════════════════════════════════════════════════════ */

.total-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    width: 100%;
    max-width: 100vw;
    background-color: #fff;
    border-top: 1px solid #e2e2df;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .08);
}

.total-bar-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.total-bar-info {
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    color: #6b6b66;
}

.total-bar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-calcular {
    all: unset;
    box-sizing: border-box !important;
    max-width: 100%;
    cursor: pointer;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .95rem;
    color: #fff;
    background-color: #b5451b;
    padding: 10px 22px;
    border-radius: 999px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s ease, transform .1s ease;
}

.btn-calcular:hover {
    background-color: #963a16;
}

.btn-calcular:active {
    transform: scale(0.97);
}

.total-bar-valor {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #2e7d32;
}

.btn-pagar {
    all: unset;
    box-sizing: border-box !important;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .95rem;
    color: #fff;
    background-color: #2e7d32;
    padding: 10px 22px;
    border-radius: 999px;
    min-height: 44px;
    transition: background-color .15s ease, transform .1s ease;
}

.btn-pagar::before {
    content: "🔒";
    font-size: .85rem;
}

.btn-pagar:hover {
    background-color: #256529;
}

.btn-pagar:active {
    transform: scale(0.97);
}


/* ── Seção "Seu Pedido" (entrega, CEP e resumo) ── */

.order-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px 24px 26px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(48, 80, 132, .07);
}

.order-section .category-header {
    margin-bottom: 18px;
}


/* ── Entrega / Retirada ─────────────────── */

.entrega-block {
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 0 4px;
}

.entrega-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .9rem;
    color: #3a3a36;
}

.entrega-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    color: #3a3a36;
    cursor: pointer;
    min-height: 30px;
}

.entrega-option input {
    accent-color: #b5451b;
    cursor: pointer;
    width: 18px;
    height: 18px;
}


/* ── CEP / Frete ────────────────────────── */

.endereco-block {
    width: 100%;
    padding: 6px 0 10px;
}

.cep-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cep-input {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    padding: 10px 14px;
    border: 1.5px solid #d8d8d4;
    border-radius: 999px;
    width: 160px;
    min-height: 44px;
    outline: none;
}

.cep-input:focus {
    border-color: #b5451b;
}

.btn-frete {
    all: unset;
    box-sizing: border-box !important;
    max-width: 100%;
    cursor: pointer;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .85rem;
    color: #b5451b;
    border: 1.5px solid #b5451b;
    padding: 10px 16px;
    border-radius: 999px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s ease;
}

.btn-frete:hover {
    background-color: #fdf1ea;
}

.cep-loading {
    display: block;
    margin-top: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    color: #6b6b66;
}

.cep-erro {
    display: block;
    margin-top: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    color: #b3261e;
}

.frete-info {
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #f4f4f1;
    border-radius: 10px;
}

.frete-endereco {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: .85rem;
    color: #3a3a36;
    margin: 0 0 2px;
}

.frete-dados {
    font-family: 'Poppins', sans-serif;
    font-size: .82rem;
    color: #6b6b66;
    margin: 0;
}


/* ── Itens do carrinho (carrinho.html) ──── */

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--cream-lt);
    border-radius: 12px;
}

.cart-item-nome {
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: .92rem;
    color: var(--text);
}

.cart-item-preco {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .92rem;
    color: #b5451b;
    white-space: nowrap;
}

.cart-item-remover {
    all: unset;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    cursor: pointer;
    color: #b3261e;
    background: rgba(179, 38, 30, .08);
    border-radius: 50%;
    font-size: .85rem;
    font-weight: 700;
    transition: background-color .15s ease;
}

.cart-item-remover:hover {
    background: rgba(179, 38, 30, .18);
}

.cart-vazio {
    text-align: center;
    padding: 24px 0;
    font-family: 'Poppins', sans-serif;
    font-size: .92rem;
    color: var(--muted);
}

.cart-vazio a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--blue);
}


/* ── Resumo do pedido ───────────────────── */

.order-summary {
    width: 100%;
    padding: 6px 0 10px;
    border-top: 1px dashed #e2e2df;
    margin-top: 4px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Poppins', sans-serif;
    font-size: .88rem;
    color: #6b6b66;
    padding: 2px 0;
}

.order-summary-total {
    font-weight: 700;
    font-size: 1rem;
    color: #2e7d32;
    padding-top: 4px;
}

.order-items-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    max-height: 160px;
    overflow-y: auto;
}

.order-items-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    color: #3a3a36;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0ed;
}

.order-items-list li:last-child {
    border-bottom: none;
}

.order-items-list li span:first-child {
    flex: 1;
}

.order-items-list li span:last-child {
    font-weight: 600;
    color: #6b6b66;
    white-space: nowrap;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    .menu-header h1 {
        font-size: 1.9rem;
    }
    .pizza-list {
        grid-template-columns: 1fr;
    }
    .trio-grid {
        grid-template-columns: 1fr;
    }
    /* Botões de marcar ocupam a largura toda: alvo de toque maior e mais fácil de ler */
    .pizza-item-price {
        width: 100%;
    }
    /* Barra de total: empilha tudo em coluna e some com o "sticky" apertado */
    .total-bar-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        gap: 10px;
    }
    .total-bar-info {
        text-align: center;
    }
    .entrega-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 4px 0;
    }
    .cep-row {
        flex-direction: column;
    }
    .cep-input {
        width: 100%;
    }
    .btn-frete {
        width: 100%;
    }
    .frete-dados {
        line-height: 1.5;
    }
    .total-bar-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .btn-calcular,
    .btn-pagar {
        width: 100%;
    }
    .total-bar-valor {
        text-align: center;
    }
    .order-summary-row {
        font-size: .85rem;
    }
}