/* ==========================================================================
   PEDIR WEB - tema moderno e responsivo
   Carregado depois de bootstrap/w3/estilo.css e ANTES do estilo.css do
   cliente (imagens/<diretorio>/estilo.css), entao cada cliente ainda pode
   sobrescrever as variaveis abaixo. Exemplo (no estilo.css do cliente):
       :root { --brand: #0b7a3b; --brand-dark: #085c2c; --brand-soft: #e6f4ea; }
   ========================================================================== */

:root {
    --brand: #2196F3;
    --brand-dark: #1976d2;
    --brand-soft: #e3f2fd;
    --success: #2e7d32;
    --danger: #dc2626;
    --ink: #1a202c;
    --ink-soft: #718096;
    --line: #e2e8f0;
    --bg: #f7fafc;
    --card: #ffffff;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --shadow-lg: 0 10px 30px rgba(16, 24, 40, .18);
    --topbar-h: 56px;
    --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body,
h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
select,
textarea {
    font-family: var(--font);
}

body {
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

a {
    color: var(--brand);
}

a:focus,
a:hover {
    color: var(--brand-dark);
}

.bgimgClaro,
.bgimgClaroInvertida {
    background-color: var(--bg);
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
    outline-offset: 2px;
}

/* ---------- Cores w3 -> tema (w3 usa !important) ---------- */
.w3-blue,
.w3-hover-blue:hover {
    background-color: var(--brand) !important;
    color: #fff !important;
}

.w3-green {
    background-color: var(--success) !important;
    color: #fff !important;
}

.w3-red {
    background-color: var(--brand-dark) !important;
    color: #fff !important;
}

.w3-white {
    background-color: var(--card) !important;
}

.w3-border {
    border: 0 !important;
}

.w3-btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: filter .15s, transform .05s;
}

.w3-btn:hover {
    filter: brightness(1.06);
}

.w3-btn:active {
    transform: scale(.98);
}

/* ---------- Botoes e formularios (bootstrap 3) ---------- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 10px 16px;
    border-width: 1px;
    transition: filter .15s, transform .05s, box-shadow .15s;
}

.btn:active {
    transform: scale(.98);
    box-shadow: none;
}

.btn-default {
    background: var(--card);
    border-color: var(--line);
    color: var(--ink);
}

.btn-default:hover,
.btn-default:focus {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-dark);
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-link {
    color: var(--brand);
}

.form-control,
.w3-input,
input[type=text],
input[type=tel],
input[type=password],
input[type=email],
input[type=number],
input[type=search],
select,
textarea {
    border-radius: var(--radius-sm);
}

.form-control {
    height: 44px;
    border: 1px solid var(--line);
    box-shadow: none;
    background: var(--card);
    color: var(--ink);
}

textarea.form-control {
    height: auto;
}

.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.w3-input {
    border: 0;
    border-bottom: 2px solid var(--line);
    border-radius: 0;
    padding: 12px 4px;
    margin-bottom: 6px;
    background: transparent;
}

.w3-input:focus {
    border-bottom-color: var(--brand);
    outline: none;
}

/* ---------- Modais / alertas ---------- */
.modal-content {
    border: 0;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--line);
}

.modal-footer {
    border-top: 1px solid var(--line);
}

.alert {
    border-radius: var(--radius-sm);
    border: 0;
}

/* ---------- Barra superior das paginas internas (toolbar.php) ---------- */
#topo.w3-top {
    position: sticky !important;
    top: 0;
    z-index: 100 !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .15), 0 4px 14px rgba(0, 0, 0, .12);
}

#topo.w3-top .w3-bar {
    display: flex;
    align-items: center;
    min-height: var(--topbar-h);
    background: var(--brand) !important;
}

#topo.w3-top .w3-bar-item {
    float: none;
}

#topo.w3-top #backButton {
    width: 48px !important;
    height: 48px;
    margin-left: 4px;
    padding: 0 !important;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
}

#topo.w3-top #backButton:hover {
    background: rgba(255, 255, 255, .16);
}

#topo.w3-top #backButton .glyphicon {
    float: none;
    font-size: 20px;
}

#topo.w3-top h4.w3-bar-item {
    flex: 1;
    min-width: 0;
    width: auto !important;
    margin: 0 !important;
    padding: 0 8px !important;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#topo.w3-top #btnFinalizarPedido {
    width: 48px !important;
    height: 48px;
    margin: 0 4px 0 0 !important;
    padding: 0 !important;
    display: grid;
    place-items: center;
    border-radius: 50%;
}

/* ---------- Paginas de conteudo: coluna central no desktop ---------- */
#divProdutos,
#divLogin>.w3-white,
#divFooter {
    max-width: 720px;
    margin-left: auto !important;
    margin-right: auto !important;
}

#divLogin {
    align-items: center;
    background: var(--bg);
}

#divLogin>.w3-white {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 16px;
    margin-top: 16px !important;
    margin-bottom: 16px !important;
    height: auto !important;
}

/* ==========================================================================
   TELA INICIAL (index.php)
   ========================================================================== */
.landing {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px 16px 96px;
    background-color: #1a1a1f;
    background-position: center;
    background-size: cover;
    position: relative;
    isolation: isolate;
}

.landing::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .65) 100%);
}

.landing-card {
    width: 100%;
    max-width: 420px;
    padding: 28px 22px 24px;
    text-align: center;
    background: rgba(255, 255, 255, .96);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    animation: rise .45s ease both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
}

.landing-logo {
    width: 170px;
    max-width: 55%;
    height: auto;
    margin: 0 auto 6px;
    display: block;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .18));
}

.landing-sub {
    margin: 0 0 20px;
    color: var(--ink-soft);
    font-size: 14px;
}

.landing-actions {
    display: grid;
    gap: 12px;
}

.landing-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    text-align: left;
    text-decoration: none !important;
    color: var(--ink) !important;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .12s, box-shadow .15s, border-color .15s;
}

.landing-btn:hover,
.landing-btn:focus {
    transform: translateY(-2px);
    border-color: var(--brand);
    box-shadow: 0 8px 20px rgba(16, 24, 40, .12);
}

.landing-btn .ico {
    flex: none;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 12px;
}

.landing-btn b {
    display: block;
    font-size: 16px;
}

.landing-btn small {
    display: block;
    color: var(--ink-soft);
    font-size: 13px;
}

.landing-btn .chev {
    margin-left: auto;
    color: var(--ink-soft);
}

.landing-btn.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff !important;
}

.landing-btn.primary .ico {
    color: #fff;
    background: rgba(255, 255, 255, .2);
}

.landing-btn.primary small,
.landing-btn.primary .chev {
    color: rgba(255, 255, 255, .85);
}

.landing-demo {
    margin: 18px 0 0;
    color: var(--brand);
    font-weight: 700;
    font-size: 14px;
}

.landing-info {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--brand);
    background: #fff;
    font-size: 22px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
}

.cookie-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 50;
    max-width: 560px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.cookie-bar p {
    margin: 0;
    flex: 1 1 240px;
}

.cookie-bar button {
    padding: 9px 18px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--brand);
    font-weight: 600;
}

/* ========================================================
   MODERN DELIVERY UX / UI (iFood & Anota.ai Style)
   ======================================================== */

/* --- Modern Header & Badges --- */
.header-moderno {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    transition: all 0.3s ease;
}

.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    min-height: 56px;
}

.header-brand {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    margin: 0 10px;
}

.header-title-text {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    position: relative;
    text-decoration: none !important;
}

.header-icon-btn:hover, .header-icon-btn:focus {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    transform: scale(1.05);
}

.header-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    min-width: 19px;
    height: 19px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--brand);
    animation: popBadge 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popBadge {
    0% { transform: scale(0); }
    80% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* --- Search Bar --- */
.header-search-bar {
    padding: 0 15px 12px 15px;
    display: none;
}

.header-search-inner {
    display: flex;
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    align-items: center;
}

.header-search-input {
    flex: 1;
    border: none;
    padding: 10px 16px;
    font-size: 15px;
    color: #333;
    outline: none;
}

.header-search-clear {
    background: none;
    border: none;
    padding: 0 12px;
    color: #888;
    cursor: pointer;
    font-size: 14px;
}

/* --- Fixed Category Navigation Bar --- */
.category-nav-wrapper {
    background: #fff;
    border-bottom: 1px solid #eef2f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    padding: 0 10px;
    height: 50px;
}

.category-nav-scroll {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    flex: 1;
    width: 100%;
}

.category-nav-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.cat-pill {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 20px;
    background: #f1f4f8;
    color: #4a5568;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    user-select: none;
    flex-shrink: 0;
}

.cat-pill:hover {
    background: #e2e8f0;
    color: #1a202c;
}

.cat-pill.active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.35);
}

/* --- Sidebar Drawer & Overlay --- */
#mySidebar.menuLateral, .sidebar-moderno {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    max-width: 85vw !important;
    background-color: #fff !important;
    z-index: 1300 !important;
    overflow-y: auto !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25) !important;
    display: none;
    padding: 0 !important;
}

#myOverlay, .overlay-moderno {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.55) !important;
    z-index: 1250 !important;
    display: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none !important;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-item:hover, .sidebar-item:focus {
    background: #f8fafc;
    color: var(--brand);
    text-decoration: none !important;
}

.sidebar-item i {
    width: 20px;
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
}

.sidebar-item:hover i {
    color: var(--brand);
}

/* --- Cardápio Container & Sections --- */
.cardapio-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 15px;
    padding-top: 120px; /* Header (56px) + Category Bar (50px) + Gap */
    padding-bottom: 100px;
}

.category-section {
    margin-bottom: 28px;
    scroll-margin-top: 120px;
}

.category-header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-header-desc {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 12px;
}

/* --- Modern Product Card (iFood / Anota.ai Style) --- */
.produtos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 768px) {
    .produtos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.produto-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9edf2;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
    cursor: pointer;
    position: relative;
}

.produto-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    border-color: #cbd5e0;
}

.produto-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 12px;
}

.produto-nome {
    font-size: 1.02rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.produto-desc {
    font-size: 0.84rem;
    color: #718096;
    margin: 0 0 10px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.produto-footer-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.produto-preco {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2e7d32;
}

.badge-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: #e3f2fd;
    color: #1976d2;
    text-transform: uppercase;
}

.badge-fracionado {
    background: #fff3e0;
    color: #e65100;
}

.produto-media-container {
    width: 100px;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.produto-thumb {
    width: 100px;
    height: 85px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f7fafc;
    margin-bottom: 6px;
}

.btn-add-prod {
    width: 100%;
    background: #fff;
    color: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-add-prod:hover {
    background: var(--brand);
    color: #fff;
}

.btn-add-prod.btn-added {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

/* --- Pizza Builders (1 Sabor & 2 Sabores) --- */
.pizza-builders-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .pizza-builders-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.card-pizza-builder {
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-pizza-builder:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.card-pizza-inteira {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1.5px solid #3b82f6;
}

.card-pizza-inteira .builder-title {
    color: #1e40af;
}

.card-pizza-inteira .builder-subtitle {
    color: #2563eb;
}

.card-pizza-inteira .btn-builder-action {
    background: #2563eb;
    color: #fff;
}

.card-pizza-meio {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1.5px solid #f97316;
}

.card-pizza-meio .builder-title {
    color: #9a3412;
}

.card-pizza-meio .builder-subtitle {
    color: #c2410c;
}

.card-pizza-meio .btn-builder-action {
    background: #ea580c;
    color: #fff;
}

.builder-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.builder-icon {
    font-size: 30px;
    line-height: 1;
}

.builder-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 3px 0;
}

.builder-subtitle {
    font-size: 0.83rem;
    margin: 0;
}

.btn-builder-action {
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

/* --- Customization Modal (Bottom Sheet on Mobile) --- */
@media (max-width: 767px) {
    #modalPersonalizarProduto .modal-dialog {
        margin: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        display: flex;
        align-items: flex-end;
    }

    #modalPersonalizarProduto .modal-content {
        width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        display: flex;
        flex-direction: column;
        border: none;
    }
}

@media (min-width: 768px) {
    #modalPersonalizarProduto .modal-dialog {
        max-width: 580px;
        margin: 30px auto;
    }

    #modalPersonalizarProduto .modal-content {
        border-radius: 16px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
}

.modal-header-custom {
    padding: 16px 20px;
    border-bottom: 1px solid #edf2f7;
    position: relative;
    background: #fff;
}

.modal-header-custom .close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f1f4f8;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    cursor: pointer;
}

.modal-prod-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 4px 0;
    padding-right: 36px;
}

.modal-prod-desc {
    font-size: 0.88rem;
    color: #718096;
    margin: 0 0 6px 0;
}

.modal-prod-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2e7d32;
    margin: 0;
}

.modal-body-scroll {
    overflow-y: auto;
    padding: 16px 20px;
    background: #fafbfc;
    flex: 1;
}

/* --- Pizza Flavor Toggle (1 Sabor vs 2 Sabores) --- */
.flavor-toggle-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 4px;
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
}

.flavor-toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.flavor-toggle-btn.active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.flavor-selection-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}

.flavor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.flavor-row + .flavor-row {
    border-top: 1px dashed #e2e8f0;
}

.flavor-tag {
    font-size: 0.78rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 6px;
    margin-right: 8px;
}

.flavor-info {
    flex: 1;
}

.flavor-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.flavor-comp {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.btn-change-flavor {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

/* --- Additionals Groups Styling --- */
.add-group-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
}

.add-group-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-group-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 2px 0;
}

.add-group-rule {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0;
}

.add-group-badge-req {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.add-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.add-item-row + .add-item-row {
    border-top: 1px solid #f1f5f9;
}

.add-item-info {
    flex: 1;
    padding-right: 10px;
}

.add-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 2px 0;
}

.add-item-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0 0 2px 0;
}

.add-item-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f766e;
    margin: 0;
}

.add-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--brand);
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-step:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.btn-step:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.step-qty {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    min-width: 18px;
    text-align: center;
}

/* --- Notes / Observações Section --- */
.notes-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}

.notes-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    display: block;
}

.notes-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.88rem;
    color: #334155;
    outline: none;
    transition: border-color 0.2s;
}

.notes-input:focus {
    border-color: var(--brand);
}

/* --- Modal Sticky Footer --- */
.modal-footer-custom {
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-pill-control {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    padding: 2px;
    background: #f8fafc;
}

.qty-pill-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #1e293b;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-pill-btn:hover {
    background: #e2e8f0;
}

.qty-pill-val {
    padding: 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    min-width: 24px;
    text-align: center;
}

.btn-add-modal-submit {
    flex: 1;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.btn-add-modal-submit:hover {
    background: #1976d2;
}

.btn-add-modal-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* --- Floating Bottom Cart Bar (iFood Style) --- */
.barra-flutuante-carrinho {
    position: fixed;
    bottom: 15px;
    left: 15px;
    right: 15px;
    max-width: 600px;
    margin: 0 auto;
    background: #2e7d32;
    color: #fff;
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    z-index: 1045;
    cursor: pointer;
    animation: slideUpCart 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none !important;
    transition: transform 0.15s, background 0.15s;
}

.barra-flutuante-carrinho:hover {
    background: #27682a;
    transform: translateY(-2px);
    color: #fff;
}

@keyframes slideUpCart {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cart-float-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-float-badge {
    background: rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 8px;
}

.cart-float-view {
    font-size: 0.92rem;
    font-weight: 600;
}

.cart-float-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-float-total {
    font-size: 1.05rem;
    font-weight: 800;
}

/* --- Toast Feedback Notification --- */
.toast-feedback {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #1e293b;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-feedback.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Modal de Seleção de Sabores de Pizza (Centralizado na Tela) --- */
#modalEscolherSegundoSabor.modal {
    text-align: center;
    padding: 0 !important;
}

#modalEscolherSegundoSabor.modal:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -4px;
}

#modalEscolherSegundoSabor .modal-dialog {
    display: inline-block;
    text-align: left;
    vertical-align: middle;
    max-width: 520px;
    width: 92%;
    margin: 15px auto;
}

#modalEscolherSegundoSabor .modal-content {
    border-radius: 16px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: none;
    overflow: hidden;
}

/* --- extras --- */
.pizza-builders-container + .produtos-grid {
    margin-top: 4px;
}

.produto-card .produto-thumb[style*="display: none"] + .btn-add-prod {
    margin-top: auto;
}

.btn-add-prod:disabled {
    opacity: .7;
    cursor: wait;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* cardapio de mesa: somente consulta (sem botoes de pedido) */
.cardapio-mesa .btn-add-prod,
.cardapio-mesa .barra-flutuante-carrinho,
.cardapio-mesa #btnCarrinhoHeader {
    display: none !important;
}

.cardapio-mesa .produto-card {
    cursor: default;
}

/* ========================================================
   GLOBAL MODERN DELIVERY DESIGN SYSTEM (All Pages)
   ======================================================== */

/* --- Universal Containers --- */
.main-content-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
    padding-top: 72px; /* Fixed Header 56px + gap */
    padding-bottom: 110px;
    min-height: 100vh;
    box-sizing: border-box;
}

.auth-container {
    max-width: 440px;
    margin: 0 auto;
    padding: 16px;
    padding-top: 76px;
    padding-bottom: 40px;
    box-sizing: border-box;
}

/* --- Modern Surface Card --- */
.card-moderno {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-title-moderno {
    font-size: 1.02rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.card-title-moderno i {
    color: var(--brand);
    font-size: 1.1rem;
}

/* --- Modern Form Elements --- */
.form-group-moderno {
    margin-bottom: 14px;
    position: relative;
}

.form-label-moderno {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 5px;
    display: block;
}

.form-control-moderno {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.92rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background-color: #fff;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-control-moderno:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

select.form-control-moderno {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 36px;
    cursor: pointer;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
}

.input-icon-wrapper .form-control-moderno {
    padding-left: 38px;
}

/* --- Modern Buttons --- */
.btn-moderno {
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none !important;
    box-sizing: border-box;
}

.btn-primary-moderno {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.btn-primary-moderno:hover, .btn-primary-moderno:focus {
    background: #1976d2;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.4);
}

.btn-success-moderno {
    background: #2e7d32;
    color: #fff;
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.3);
}

.btn-success-moderno:hover, .btn-success-moderno:focus {
    background: #27682a;
    color: #fff;
    transform: translateY(-1px);
}

.btn-danger-moderno {
    background: #e53935;
    color: #fff;
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.3);
}

.btn-danger-moderno:hover, .btn-danger-moderno:focus {
    background: #d32f2f;
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary-moderno {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-secondary-moderno:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-outline-primary-moderno {
    background: transparent;
    color: var(--brand);
    border: 1.5px solid var(--brand);
}

.btn-outline-primary-moderno:hover {
    background: #eff6ff;
    color: #1976d2;
}

.btn-block-moderno {
    width: 100%;
    display: flex;
}

.btn-moderno:disabled, .btn-moderno.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* --- Modern Cart Items --- */
.cart-item-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: border-color 0.15s;
}

.cart-item-card:hover {
    border-color: #cbd5e1;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.cart-item-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.35;
    flex: 1;
}

.cart-item-badge-half {
    font-size: 0.72rem;
    font-weight: 700;
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #ffedd5;
    padding: 2px 6px;
    border-radius: 6px;
    margin-right: 4px;
    vertical-align: middle;
}

.cart-item-subitems {
    margin: 6px 0 8px 0;
    padding-left: 10px;
    border-left: 2px solid #e2e8f0;
    font-size: 0.82rem;
    color: #64748b;
}

.cart-item-subitem-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.cart-item-obs {
    font-size: 0.8rem;
    color: #475569;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 6px 0;
    border: 1px dashed #cbd5e1;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.cart-item-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2e7d32;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-trash-item {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #fee2e2;
    background: #fff;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-trash-item:hover {
    background: #fee2e2;
    color: #b91c1c;
}

/* --- Sticky Bottom Summary Footer --- */
.sticky-summary-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    padding: 12px 16px;
    z-index: 1040;
}

.sticky-summary-content {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: #64748b;
}

.summary-row-total {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    border-top: 1px dashed #e2e8f0;
    padding-top: 6px;
    margin-top: 2px;
}

.summary-total-val {
    color: #2e7d32;
    font-size: 1.25rem;
    font-weight: 800;
}

/* --- Modern Orders Card (Painel de Controle) --- */
.order-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: border-color 0.15s;
}

.order-card-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.order-card-header:hover {
    background: #fafbfc;
}

.order-info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-id-date {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
}

.order-badge {
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.order-badge-aguardando { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.order-badge-aceito { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.order-badge-saiu { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.order-badge-entregue { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.order-badge-cancelado { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.order-info-right {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-total-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
}

.order-chevron {
    color: #94a3b8;
    font-size: 14px;
    transition: transform 0.25s ease;
}

.order-card.expanded .order-chevron {
    transform: rotate(180deg);
}

.order-card-body {
    padding: 14px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: none;
}

.order-card.expanded .order-card-body {
    display: block;
}

/* --- Modern Address Cards --- */
.address-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    transition: all 0.2s;
}

.address-card.principal {
    border-color: #3b82f6;
    background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
}

.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.address-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.address-badge-principal {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.address-body-text {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.45;
}

.address-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.btn-floating-action {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 1030;
    transition: transform 0.15s, background 0.15s;
    text-decoration: none !important;
}

.btn-floating-action:hover {
    background: #1976d2;
    transform: scale(1.08);
    color: #fff;
}

/* --- Empty States --- */
.empty-state-box {
    text-align: center;
    padding: 36px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
    margin: 20px auto;
}

.empty-state-icon {
    font-size: 44px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 16px;
}

/* --- Modern Header Back Bar (Universal) --- */
.header-moderno-simples {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.header-btn-voltar {
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.15s;
}

.header-btn-voltar:hover, .header-btn-voltar:focus {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.header-simples-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    flex: 1;
    margin-left: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   FINALIZAR VENDA (finalizar_venda.php)
   O JS ainda define a altura de #divDadosVenda; aqui a pagina rola normalmente
   com cabecalho e rodape fixos.
   ========================================================================== */
body.finalizar-venda {
    overflow: auto !important;
    background-color: #f7fafc !important;
}

body.finalizar-venda #sectionP {
    height: auto !important;
}

body.finalizar-venda #divDadosVenda {
    height: auto !important;
    min-height: 0;
    overflow: visible !important;
    padding-bottom: 190px;
}

.fv-linha {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fv-linha-top {
    align-items: flex-start;
}

.fv-linha .form-control-moderno {
    flex: 1;
    min-width: 0;
}

.fv-btn-icone {
    flex: none;
    width: 46px;
    height: 46px;
    padding: 0 !important;
}

.fv-endereco-texto {
    margin-top: 10px;
    color: #475569;
    font-size: .9rem;
}

.fv-endereco-texto p {
    margin: 0;
}

.fv-check {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}

.fv-check input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.fv-pag-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.fv-pag-toggle .btn-moderno {
    padding: 10px 8px;
    font-size: .85rem;
}

.fv-bonus {
    margin-top: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: .9rem;
}

.fv-privacidade {
    margin: 4px 0 0;
    text-align: center;
    color: #64748b;
    font-size: .8rem;
}

.switch {
    position: relative;
    display: inline-block;
    flex: none;
    width: 44px;
    height: 24px;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .3s;
}

.switch input:checked+.slider {
    background-color: var(--success);
}

.switch input:checked+.slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* rodape: subtotal / entrega a esquerda, total a direita (conteudo preenchido pelo JS) */
#foot .fv-totais {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

#foot .fv-totais h5,
#foot .fv-totais h3 {
    margin: 0;
    padding: 0;
}

#foot #ValorUnitario,
#foot #TaxaEntrega {
    color: #64748b;
    font-size: .88rem;
    font-weight: 600;
}

#foot #ValorUnitario #sub {
    width: auto !important;
    float: none !important;
    margin-right: 4px;
}

#foot #TotalPagar {
    color: var(--success);
    font-size: 1.3rem;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

#foot #detalhesForma {
    max-width: 680px;
    margin: 0 auto 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #475569;
    height: auto;
    font-size: .85rem;
}

.bloqueio-tela {
    z-index: 1500;
}

.confirmacao-box {
    z-index: 1501;
    border-radius: 18px 18px 0 0;
    border-top: 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
}

@media (min-width: 768px) {
    .confirmacao-box {
        left: 50%;
        width: 520px;
        margin-left: -260px;
    }
}

#foot #ValorUnitario>div {
    display: inline;
}

/* painel de pedidos */
.order-card-header.detalheAtivo {
    background: #f8fafc;
}

.order-card-header .fa-chevron-down {
    transition: transform .3s ease;
}

.order-card-header.divVenda {
    display: block;
}

/* ==========================================================================
   INSERIR PRODUTO NO CARRINHO (inserir_produto_carrinho.php)
   ========================================================================== */
.produto-wrap {
    padding-bottom: 130px;
    min-height: 0;
}

.produto-header {
    padding: 18px;
}

.produto-titulo {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.3;
    color: #1a202c;
}

.produto-composicao {
    margin: 0 0 10px;
    font-size: .88rem;
    color: #718096;
}

.produto-valor {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    color: #64748b;
    font-size: .9rem;
}

.produto-valor strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--success);
}

.produto-obs-texto {
    margin: 0 0 10px;
    font-size: .88rem;
    font-weight: 400;
    color: #475569;
}

.produto-obs-texto:empty {
    display: none;
}

.produto-secao-titulo {
    margin: 4px 0 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

#listaAdicionais {
    margin: 0;
    padding: 0;
}

li.add-group-card {
    list-style: none;
}

.add-group-title {
    margin: 0 0 2px;
    font-size: .95rem;
}

.add-item-info h6,
.add-group-header h6 {
    margin: 0;
    line-height: 1.35;
}

.add-item-name {
    font-size: .92rem;
    font-weight: 600;
    color: #334155;
}

.add-item-desc,
.add-group-rule {
    font-size: .78rem;
    font-weight: 400;
    color: #64748b;
}

.add-item-info .add-item-desc {
    color: #94a3b8;
}

.add-item-price {
    margin: 2px 0 0;
}

.add-item-controls .step-qty {
    margin: 0;
    min-width: 22px;
}

.produto-footer {
    flex-direction: row !important;
    align-items: center;
    gap: 12px !important;
}

.produto-footer .btn-add-modal-submit {
    min-width: 0;
}

.produto-footer .btn-add-modal-submit:disabled {
    background: #94a3b8;
}

.produto-footer .btn-add-modal-submit {
    gap: 10px;
}

/* --- Modal de detalhe do produto (botao "Adicionar") e modal de opcoes (botao "Opcoes") --- */
@media (max-width: 767px) {
    #modalDetalheProduto .modal-dialog,
    #modalOpcoesProduto .modal-dialog {
        margin: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        display: flex;
        align-items: flex-end;
    }

    #modalDetalheProduto .modal-content,
    #modalOpcoesProduto .modal-content {
        width: 100%;
        max-height: 94vh;
        border-radius: 20px 20px 0 0;
        display: flex;
        flex-direction: column;
        border: none;
    }
}

@media (min-width: 768px) {
    #modalDetalheProduto .modal-dialog,
    #modalOpcoesProduto .modal-dialog {
        max-width: 580px;
        margin: 30px auto;
    }

    #modalDetalheProduto .modal-content,
    #modalOpcoesProduto .modal-content {
        border-radius: 16px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
}

.detalhe-prod-media {
    margin: -16px -20px 14px -20px;
    background: #f1f4f8;
    text-align: center;
}

.detalhe-prod-media img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.detalhe-prod-desc {
    margin: 0;
    padding: 4px 20px 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4a5568;
    white-space: pre-line;
}

.opcoes-prod-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
}

.opcoes-prod-topo h4 {
    margin: 0;
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
}

.opcoes-prod-topo .close-btn {
    background: #f1f4f8;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    flex-shrink: 0;
}

#iframeOpcoesProduto {
    width: 100%;
    height: 78vh;
    border: 0;
    display: block;
}

/* --- Imagens na tela de opcoes (produto principal e adicionais) --- */
.produto-header-imgs {
    display: flex;
    gap: 8px;
    margin: -18px -18px 14px -18px;
    background: #f1f4f8;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.produto-header-img {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    display: block;
}

.add-item-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 12px;
    flex-shrink: 0;
    background: #f1f4f8;
}

/* --- Trava de rolagem da pagina com modal aberto (cardapio.js: travarScrollPagina) ---
   height:auto/overflow:visible evitam que o conteudo atras do modal seja cortado (sumisse dos itens) */
body.scroll-travado {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    height: auto !important;
    min-height: 100%;
    overflow: visible !important;
}

/* imagens inteiras, sem corte */
.produto-header-imgs {
    background: #fff;
}

.produto-header-img {
    object-fit: contain;
    max-height: 260px;
    height: auto;
}

.add-item-thumb {
    object-fit: contain;
    background: #fff;
}

.detalhe-prod-media {
    background: #fff;
}

.detalhe-prod-media img {
    object-fit: contain;
    max-height: 300px;
    height: auto;
}

/* Carrinho: o rodape fixo (total + botoes, ate ~190px) cobria o ultimo item; reserva espaco no fim da lista */
#divProdutos {
    padding-bottom: 220px;
    box-sizing: border-box;
}

/* X de validacao (glyphicon-remove .form-control-feedback) alinhado ao centro vertical do input
   e dentro da borda direita. Rotulo (~24px) + metade do input (~22px) => centro em ~46px. */
.form-group-moderno.has-feedback .form-control-feedback,
.form-group-moderno.has-feedback label ~ .form-control-feedback {
    top: 24px;
    right: 12px;
    width: 24px;
    height: 44px;
    line-height: 44px;
    pointer-events: none;
}

/* grupos dentro de .row/.col-* tem 15px de padding lateral: o X precisa entrar por esse recuo */
[class*="col-"].form-group-moderno.has-feedback .form-control-feedback,
[class*="col-"].form-group-moderno.has-feedback label ~ .form-control-feedback {
    right: 27px;
}
