/* MiniPizza - Cardápio público */

:root {
    --menu-primary: #E4572E;
    --menu-secondary: #292F36;
}

body.cardapio-body { background: #F5F1EA; padding-bottom: 90px; }

.menu-cover {
    height: 160px;
    background: linear-gradient(135deg, var(--menu-primary), var(--menu-secondary));
    background-size: cover;
    background-position: center;
    position: relative;
}
.menu-closed-banner {
    background: var(--mp-danger);
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    padding: 8px;
}

.menu-header {
    background: #fff;
    border-radius: 20px 20px 0 0;
    margin-top: -28px;
    position: relative;
    padding: 20px 20px 16px;
    box-shadow: 0 -4px 16px rgba(0,0,0,.04);
}
.menu-logo {
    width: 76px; height: 76px; border-radius: 16px; object-fit: cover;
    border: 4px solid #fff; box-shadow: var(--mp-shadow);
    margin-top: -54px; background: #eee;
}
.menu-header h1 { font-size: 22px; margin: 12px 0 4px; }
.menu-header .desc { color: var(--mp-text-muted); font-size: 14px; margin-bottom: 10px; }
.menu-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--mp-text-muted); }
.menu-meta span { display: flex; align-items: center; gap: 5px; }
.menu-status-open { color: var(--mp-success); font-weight: 700; }
.menu-status-closed { color: var(--mp-danger); font-weight: 700; }

.menu-categories-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 16px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--mp-border);
    -webkit-overflow-scrolling: touch;
}
.menu-categories-nav a {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 999px;
    background: #F3EFE8;
    font-weight: 600;
    font-size: 14px;
}
.menu-categories-nav a.active { background: var(--menu-primary); color: #fff; }

.menu-category-section { padding: 20px 16px 4px; }
.menu-category-section h2 { font-size: 18px; margin-bottom: 12px; }

.product-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--mp-shadow);
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
}
.product-card .thumb {
    width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: #eee; flex-shrink: 0;
}
.product-card .info { flex: 1; min-width: 0; }
.product-card h3 { font-size: 15px; margin: 0 0 4px; }
.product-card p { font-size: 13px; color: var(--mp-text-muted); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .price { font-weight: 700; color: var(--menu-primary); font-size: 15px; }
.product-card .add-btn {
    position: absolute; right: 12px; bottom: 12px;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--menu-primary); color: #fff; font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; border: none;
}
.product-card.featured::before {
    content: 'Destaque';
    position: absolute; top: 10px; right: 10px;
    background: var(--mp-accent); color: #40340a; font-size: 10px; font-weight: 800;
    padding: 2px 8px; border-radius: 6px; text-transform: uppercase;
}

/* Modal de produto */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-box {
    background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
    border-radius: 20px 20px 0 0; padding: 0 0 100px;
}
@media (min-width: 640px) {
    .modal-overlay { align-items: center; }
    .modal-box { border-radius: 20px; max-height: 88vh; }
}
.modal-image { width: 100%; height: 200px; object-fit: cover; background: #eee; }
.modal-close {
    position: absolute; top: 12px; right: 12px; background: #fff; border: none;
    width: 34px; height: 34px; border-radius: 50%; font-size: 18px; box-shadow: var(--mp-shadow);
}
.modal-body { padding: 18px 20px; }
.modal-body h2 { font-size: 20px; }
.modal-body .price { color: var(--menu-primary); font-weight: 700; font-size: 17px; margin-bottom: 12px; }

.option-group { margin-bottom: 20px; }
.option-group-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.option-group-title strong { font-size: 15px; }
.option-group-title small { color: var(--mp-text-muted); }
.option-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--mp-border);
}
.option-row:last-child { border-bottom: none; }
.option-row label { font-weight: 500; margin: 0; display: flex; align-items: center; gap: 10px; }
.option-row .opt-price { color: var(--mp-text-muted); font-size: 13px; }

.qty-stepper { display: flex; align-items: center; gap: 14px; }
.qty-stepper button {
    width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--mp-border); background: #fff; font-size: 18px; font-weight: 700;
}
.qty-stepper span { font-weight: 700; min-width: 20px; text-align: center; }

.modal-footer {
    position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
    padding: 14px 20px; box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    display: flex; gap: 12px; align-items: center; max-width: 520px; margin: 0 auto;
}

/* Barra fixa do carrinho */
.cart-bar {
    position: fixed; bottom: 0; left: 0; right: 0; background: var(--menu-secondary); color: #fff;
    padding: 14px 20px; display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 -4px 16px rgba(0,0,0,.16); z-index: 60;
}
.cart-bar.hidden { display: none; }
.cart-bar .cart-info { font-size: 14px; }
.cart-bar .cart-info strong { display: block; font-size: 16px; }

/* Destaque no botão "Continuar pedido", pra ficar bem visível mesmo sobre
   a barra escura do carrinho. */
.btn-cart-highlight {
    background: var(--menu-primary) !important;
    color: #fff !important;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    animation: mp-cart-pulse 1.8s ease-in-out infinite;
}
.btn-cart-highlight:hover { filter: brightness(1.08); }
@keyframes mp-cart-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) {
    .btn-cart-highlight { animation: none; }
}

/* Carrinho / checkout */
.cart-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--mp-border); gap: 10px; }
.cart-item:last-child { border-bottom: none; }
.cart-item .cart-item-name { font-weight: 600; font-size: 14px; }
.cart-item .cart-item-opts { font-size: 12px; color: var(--mp-text-muted); }
.cart-item .cart-item-actions { display: flex; align-items: center; gap: 8px; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; padding: 16px 0; border-top: 2px solid var(--mp-secondary); margin-top: 10px; }

.delivery-toggle { display: flex; gap: 10px; margin-bottom: 16px; }
.delivery-toggle label {
    flex: 1; text-align: center; padding: 12px; border: 2px solid var(--mp-border); border-radius: var(--mp-radius-sm);
    font-weight: 600; cursor: pointer; margin: 0;
}
.delivery-toggle input { display: none; }
.delivery-toggle input:checked + span { color: var(--menu-primary); }
.delivery-toggle label:has(input:checked) { border-color: var(--menu-primary); background: #FFF3EC; }

.menu-empty { text-align: center; padding: 60px 20px; color: var(--mp-text-muted); }
