/* ========================================
   CINTIA ANUNCIAÇÃO - CARDÁPIO ONLINE
   Sistema de Pedidos - Estilos Frontend
   MOBILE FIRST DESIGN
   ======================================== */

/* Reset e Base - MOBILE FIRST */
* {
    box-sizing: border-box;
}

/* Ocultar título da página WordPress (mas não o do cabeçalho verde) */
.page-header:not(.cardapio-header),
.entry-header:not(.cardapio-header),
.page-title:not(.cardapio-header h1),
article > header h1:not(.cardapio-header h1),
.post-title:not(.cardapio-header h1),
.entry-title:not(.cardapio-header h1),
h1.entry-title:not(.cardapio-header h1),
header.entry-header:not(.cardapio-header),
.wp-block-post-title,
body.page > main h1:first-of-type:not(.cardapio-header h1),
.site-main > article > header:not(.cardapio-header),
main > h1:first-child:not(.cardapio-header h1),
.content-area > h1:first-child:not(.cardapio-header h1) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Garantir que o cabeçalho verde e seu título fiquem visíveis */

.cardapio-header,
.cardapio-header h1,
.cardapio-header h2,
.cardapio-header p {
    display: block !important;
    visibility: visible !important;
    color: white !important;
}

#cintia-cardapio-app {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 100%;
    margin: -60px auto 0 auto;
    padding: 10px;
    width: 100%;
}

/* Header do Cardápio - MOBILE */
.cardapio-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #2c5f2d 0%, #97bf0d 100%);
    border-radius: 10px;
    color: white;
}

.cardapio-header h1 {
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    line-height: 1.2;
}

.cardapio-header p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Abas de Navegação - MOBILE */

.cardapio-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

@media (max-width: 600px) {
    .cardapio-tabs {
        flex-direction: column;
        gap: 12px;
        overflow-x: unset;
        padding-bottom: 0;
    }
    .tab-btn {
        min-width: unset;
        width: 100%;
        justify-content: flex-start;
        text-align: left;
        font-size: 1rem;
    }
}

.cardapio-tabs::-webkit-scrollbar {
    height: 4px;
}

.cardapio-tabs::-webkit-scrollbar-thumb {
    background: #2c5f2d;
    border-radius: 2px;
}

.tab-btn {
    flex: 0 0 auto;
    min-width: 100px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.tab-btn i {
    font-size: 1.2rem;
}

.tab-btn:hover {
    border-color: #2c5f2d;
}

.tab-btn.active {
    background: #2c5f2d;
    color: white;
    border-color: #2c5f2d;
}

/* Conteúdo das Abas */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content h2 {
    margin-bottom: 15px;
    color: #2c5f2d;
    font-size: 1.3rem;
    padding: 0 5px;
}

/* Grid de Produtos - MOBILE (1 coluna) */

.produtos-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 6px 6px;
}

.produto-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    padding: 14px 12px;
    min-height: 90px;
}

.produto-imagem {
    width: 70px;
    height: 70px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
    margin-right: 16px;
}

.produto-card {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    transition: all 0.18s;
    position: relative;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    min-height: 86px;
    border: 1px solid rgba(0,0,0,0.02);
}
    height: 24px;
    align-self: center;
}

.produto-info h3 {
    margin: 0;
    min-width: 0;
    font-size: 1.08rem;
    font-weight: bold;
    color: #222;
}

.produto-descricao {
    margin: 0;
    white-space: normal;
    word-break: break-word;
    font-size: 0.93rem;
    color: #666;
    line-height: 1.3;
}

.produto-footer {
    display: flex;
    white-space: normal;
    word-break: break-word;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.produto-preco {
    margin-top: 2px;
    font-size: 1.08rem;
    font-weight: bold;
    color: #222;
}

.btn-adicionar {
    display: none;
}

    flex-shrink: 0;
.produto-radio {
    margin-left: 18px;
    margin-top: 8px;
    accent-color: #2c5f2d;
    width: 22px;
    height: 22px;
}


/* Card de Produto - layout for list (horizontal) */
.produto-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.18s;
    position: relative;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

.produto-card:active { transform: translateY(0); }

.produto-card.selecionado { border: 2px solid rgba(44,95,45,0.15); }

/* Remove the duplicated pseudo-check (we'll use the input visual and a cleaner overlay remove button) */
/* Show green selection badge in corner */
.produto-card.selecionado::after {
    content: "✓ SELECIONADO";
    position: absolute;
    top: 8px;
    right: 8px;
    background: #2c5f2d;
    color: white;
    padding: 6px 10px;
    border-radius: 18px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* Smaller badge on tablets and phones */
@media (max-width: 1024px) {
    .produto-card.selecionado::after {
        font-size: 0.72rem !important;
        padding: 5px 8px !important;
        top: 6px !important;
        right: 6px !important;
    }
}

@media (max-width: 420px) {
    .produto-card.selecionado::after {
        font-size: 0.62rem !important;
        padding: 4px 6px !important;
        top: 6px !important;
        right: 6px !important;
        border-radius: 14px !important;
    }
}

/* Keep any existing toggle button hidden (we don't show remove in-card) */
.produto-card .btn-toggle-selecao { display: none !important; }

.produto-imagem { width: 72px; height: 72px; flex-shrink: 0; border-radius: 8px; background-size: cover; background-position: center; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

.produto-info { padding: 0; flex: 1 1 auto; min-width: 0; }

.produto-title-row { display:flex; align-items:center; gap:8px; }

.produto-info h3 { margin: 0 0 6px 0; color: #111; font-size: 1.04rem; font-weight: 700; }
.produto-info p { margin: 0; color: #555; font-size: 0.92rem; line-height: 1.28; }

/* Link Desmarcar: escondido por padrão, aparece ao selecionar o card */
.produto-desmarcar {
    display: none;
    color: #ff4757;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    margin-right: 6px;
    align-items: center;
}
.produto-desmarcar:hover {
    text-decoration: underline;
}
.produto-card.selecionado .produto-desmarcar {
    display: inline-flex;
    gap: 6px;
}

/* Alinhamento refinado: evita que o link empurre ou desalinha o título */
.produto-title-row { align-items: center; }
.produto-title-row .produto-desmarcar { flex: 0 0 auto; line-height: 1; }
.produto-title-row h3 { flex: 1 1 auto; min-width: 0; margin: 0; }

/* Ajustes responsivos: texto menor em telas móveis para caber melhor */
@media (max-width: 600px) {
    .produto-desmarcar {
        font-size: 0.78rem !important;
        margin-right: 6px !important;
        padding: 2px 4px !important;
    }
    .produto-title-row { gap: 6px !important; }
    .produto-info h3 { font-size: 0.98rem !important; }
}

/* Very small phones: stack title and 'Desmarcar' to avoid layout breakage */
@media (max-width: 380px) {
    .produto-card {
        padding: 10px 8px;
    }
    .produto-title-row {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px !important;
    }
    .produto-title-row h3 {
        order: 1;
        font-size: 0.96rem !important;
        margin-bottom: 0;
    }
    .produto-title-row .produto-desmarcar {
        order: 2;
        display: inline-flex !important;
        font-size: 0.72rem !important;
        padding: 2px 6px !important;
        margin: 0 !important;
        background: transparent !important;
        color: #ff4757 !important;
    }

    /* Reduce selector column width to keep layout stable */
    .produto-preco-select {
        min-width: 44px !important;
        margin-left: 6px !important;
    }

    /* Make description wrap nicely and avoid overflow */
    .produto-descricao {
        font-size: 0.88rem !important;
        line-height: 1.18 !important;
    }

    /* If still too cramped, switch card to stacked (post) layout to avoid overlap */
    .produto-card.post-mode {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .produto-card.post-mode .produto-imagem {
        width: 100% !important;
        height: 120px !important;
        border-radius: 8px !important;
    }
    .produto-card.post-mode .produto-preco-select {
        align-self: stretch !important;
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
        margin-top: 6px !important;
    }
}

/* === Mobile compatibility overrides: hide 'Desmarcar' on small screens and reduce typography === */
@media (max-width: 600px) {
    .produto-card .produto-desmarcar { display: none !important; }
}

/* Make titles and descriptions wrap and be smaller on small screens */
@media (max-width: 600px) {
    .produto-info h3 {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        line-height: 1.12 !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        text-transform: none !important;
    }
    .produto-descricao {
        font-size: 0.88rem !important;
        line-height: 1.2 !important;
    }
    .produto-preco {
        font-size: 1rem !important;
    }
    .produto-imagem {
        width: 64px !important;
        height: 64px !important;
    }
    .produto-preco-select { min-width: 44px !important; }
    .produto-card { padding: 10px !important; }
}

/* Targeted smaller typography for Proteínas, Acompanhamentos and Bebidas on mobile
   Keep weight and color for high contrast and readability */
@media (max-width: 600px) {
    #tab-pratos .produto-info h3,
    #tab-acompanhamentos .produto-info h3,
    #tab-bebidas .produto-info h3 {
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        color: #111 !important;
        line-height: 1.14 !important;
    }

    #tab-pratos .produto-info .produto-descricao,
    #tab-acompanhamentos .produto-info .produto-descricao,
    #tab-bebidas .produto-info .produto-descricao {
        font-size: 0.85rem !important;
        color: #444 !important;
        line-height: 1.18 !important;
    }

    #tab-pratos .produto-info .produto-preco,
    #tab-acompanhamentos .produto-info .produto-preco,
    #tab-bebidas .produto-info .produto-preco {
        font-size: 0.98rem !important;
        font-weight: 700 !important;
        color: #111 !important;
    }
}

/* Force 12px typography for produto items on mobile as requested */
@media (max-width: 600px) {
    #tab-pratos .produto-info h3,
    #tab-acompanhamentos .produto-info h3,
    #tab-bebidas .produto-info h3 {
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    #tab-pratos .produto-info .produto-descricao,
    #tab-acompanhamentos .produto-info .produto-descricao,
    #tab-bebidas .produto-info .produto-descricao {
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    #tab-pratos .produto-info .produto-preco,
    #tab-acompanhamentos .produto-info .produto-preco,
    #tab-bebidas .produto-info .produto-preco {
        font-size: 12px !important;
        font-weight: 700 !important;
    }
}

@media (max-width: 420px) {
    #tab-pratos .produto-info h3,
    #tab-acompanhamentos .produto-info h3,
    #tab-bebidas .produto-info h3 {
        font-size: 0.88rem !important;
    }
    #tab-pratos .produto-info .produto-descricao,
    #tab-acompanhamentos .produto-info .produto-descricao,
    #tab-bebidas .produto-info .produto-descricao {
        font-size: 0.82rem !important;
    }
    #tab-pratos .produto-info .produto-preco,
    #tab-acompanhamentos .produto-info .produto-preco,
    #tab-bebidas .produto-info .produto-preco {
        font-size: 0.92rem !important;
    }
}

/* Very small phones: further reduce fonts and allow stacked layout if needed */
@media (max-width: 420px) {
    .produto-info h3 { font-size: 0.92rem !important; }
    .produto-descricao { font-size: 0.86rem !important; }
    .produto-preco { font-size: 0.95rem !important; }
    .produto-imagem { width: 58px !important; height: 58px !important; }
}

@media (max-width: 360px) {
    .produto-info h3 { font-size: 0.9rem !important; }
    .produto-descricao { font-size: 0.84rem !important; }
    .produto-preco { font-size: 0.92rem !important; }
    .produto-imagem { width: 56px !important; height: 56px !important; }
    /* Force card into stacked mode to avoid overlap on very narrow screens */
    .produto-card { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }
    .produto-preco-select { width: 100% !important; display:flex !important; justify-content:space-between !important; }
}

/* Ensure cart item names wrap instead of truncating */
.item-nome { white-space: normal !important; overflow-wrap: break-word !important; word-break: break-word !important; }

/* Success modal list items wrap */
.lista-itens-sucesso li { flex-wrap: wrap; }

/* Avoid ALL-uppercase labels that may be set by theme */
.produto-info h3, .item-nome, .produto-descricao { text-transform: none !important; }

.produto-preco-select { display:flex; flex-direction:column; align-items:flex-end; gap:6px; min-width:86px; margin-left:8px; }
.produto-preco { font-size: 1.05rem; font-weight: 700; color: #222; }
.produto-radio { width:22px; height:22px; accent-color:#2c5f2d; }

.btn-adicionar { display:none !important; }

/* CARRINHO FLUTUANTE - MOBILE */
.carrinho-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.btn-carrinho {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.btn-carrinho:active {
    transform: scale(0.9);
}

.carrinho-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    border: 3px solid white;
}

.carrinho-badge::after {
    content: 'Clique aqui para finalizar';
    position: absolute;
    top: 5px;
    right: 40px;
    background: #2c5f2d;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: showHideMessage 30s infinite;
    pointer-events: none;
}

@keyframes showHideMessage {
    0% { opacity: 0; transform: translateX(10px); }
    66.6% { opacity: 0; transform: translateX(10px); }
    68% { opacity: 1; transform: translateX(0); }
    98% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(10px); }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }
    50% { 
        transform: scale(1.15); 
        box-shadow: 0 0 0 8px rgba(255, 71, 87, 0);
    }
}

/* MODAIS - MOBILE */
.modal-carrinho, .modal-checkout, .modal-sucesso {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 15px;
    overflow-y: auto;
}

.modal-carrinho.active, .modal-checkout.active, .modal-sucesso.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 600px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    margin: auto;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 18px 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.btn-close:active {
    background: #ff4757;
    color: white;
    transform: scale(0.9);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 2px solid #f0f0f0;
    flex-shrink: 0;
}

/* ITENS DO CARRINHO - MOBILE */
.carrinho-vazio {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 0.95rem;
    line-height: 1.6;
}

.carrinho-categorias {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.carrinho-categoria h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 6px;
}

.carrinho-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 10px;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-nome {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-preco {
    color: #667eea;
    font-weight: bold;
    font-size: 1rem;
}

/* FORCE HORIZONTAL LAYOUT OVERRIDES - ensure plugin cards stay row-oriented */
#cintia-cardapio-app .produtos-grid .produto-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
}

#cintia-cardapio-app .produtos-grid .produto-imagem {
    width: 96px !important;
    height: 96px !important;
    flex-shrink: 0 !important;
    margin-right: 14px !important;
    background-size: cover !important;
    background-position: center !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
    border: 2px solid rgba(255,255,255,0.85) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}

/* Hover destaque: leve aumento e sombra mais intensa */
#cintia-cardapio-app .produtos-grid .produto-card:hover .produto-imagem {
    transform: scale(1.06) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18) !important;
}

/* Slightly increase card min-height to accommodate larger image */
#cintia-cardapio-app .produtos-grid .produto-card {
    min-height: 110px !important;
}

#cintia-cardapio-app .produtos-grid .produto-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

#cintia-cardapio-app .produtos-grid .produto-preco-select {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    min-width: 80px !important;
}

/* Price moved into .produto-info: make it visually close to title/description */
#cintia-cardapio-app .produtos-grid .produto-info .produto-preco {
    display: block !important;
    margin-top: 6px !important;
    color: #222 !important;
    font-size: 1.02rem !important;
    font-weight: 700 !important;
}

/* Narrow the selector column so price sits with the info */
#cintia-cardapio-app .produtos-grid .produto-preco-select {
    min-width: 48px !important;
    padding-left: 6px !important;
}

/* Ensure radio/checkbox vertically centered on right */
#cintia-cardapio-app .produtos-grid .produto-preco-select .produto-radio {
    margin: 0 !important;
    align-self: center !important;
}

/* RESPONSIVE GRID: 1 column on small (mobile/tablet), 2 columns on large screens */
#cintia-cardapio-app .produtos-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding: 6px !important;
}

@media (min-width: 1024px) {
    /* Two cards per row on wide/desktop screens */
    #cintia-cardapio-app .produtos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* UNIFY SELECTION CONTROL STYLE (radios and checkboxes look the same)
   We hide native appearance and draw a circular control for both inputs. */
#cintia-cardapio-app .produtos-grid input.produto-radio {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(0,0,0,0.12) !important;
    background: #ffffff !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06) inset !important;
    display: inline-block !important;
    vertical-align: middle !important;
    transition: all 0.14s ease !important;
}

#cintia-cardapio-app .produtos-grid input.produto-radio:checked {
    background: #2c5f2d !important;
    border-color: #2c5f2d !important;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.12) inset !important;
}

#cintia-cardapio-app .produtos-grid input.produto-radio:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(44,95,45,0.12) !important;
}

/* Keep the selector column compact on wide screens */
#cintia-cardapio-app .produtos-grid .produto-preco-select {
    min-width: 56px !important;
    padding-left: 8px !important;
}

/* Debug helper (temporary): uncomment to visualize boxes
#cintia-cardapio-app .produtos-grid .produto-card { outline: 2px dashed magenta !important; }
*/

.btn-remover-item {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: #ff4757;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.btn-remover-item:active {
    transform: scale(0.9);
}

/* RESUMO DO CARRINHO - MOBILE */
.carrinho-resumo {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #e9ecef;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}

.resumo-linha.total {
    font-size: 1.2rem;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #667eea;
    color: #667eea;
    font-weight: bold;
}

/* FORMULÁRIO CHECKOUT - MOBILE */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.2s;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.pagamento-opcoes {
    display: grid;
    gap: 12px;
    margin-bottom: 15px;
}

.pagamento-card {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.pagamento-card:active {
    transform: scale(0.98);
    border-color: #667eea;
}

.pagamento-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.pagamento-card input[type="radio"]:checked + .pagamento-content {
    color: #667eea;
}

.pagamento-card:has(input:checked) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.pagamento-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pagamento-content i {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.pagamento-content strong {
    font-size: 0.95rem;
}

.pagamento-content span {
    font-size: 0.8rem;
    color: #666;
}

/* ALERTAS - MOBILE */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 0.9rem;
}

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.alert-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

.alert h4 {
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.alert code {
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
}

/* RESUMO FINAL - MOBILE */
.resumo-final {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0 15px 0;
}

.resumo-final h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
}

.resumo-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.resumo-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 2px solid #667eea;
    font-size: 1.2rem;
    color: #667eea;
    font-weight: bold;
}

/* BOTÕES - MOBILE (44px min touch target) */
.btn {
    padding: 14px 20px;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 1.05rem;
    min-height: 50px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

.btn-success:active {
    transform: scale(0.97);
}

/* ========================================
   ESTILOS ADICIONAIS
   ======================================== */

/* Garantir que imagens não capturem cliques */
.produto-imagem {
    pointer-events: none;
}

/* Garantir que o badge "SELECIONADO" não bloqueie cliques */
.produto-card.selecionado::after {
    pointer-events: none;
}

/* Botão Adicionar sempre acessível */
.btn-adicionar {
    position: relative !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}

.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 1rem;
}

/* Cliente não encontrado alert */
#cliente-nao-encontrado {
    margin-bottom: 10px;
}

#campos-cliente {
    display: none;
}

/* Botão disabled */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal de Sucesso - MOBILE */
.modal-sucesso .modal-content {
    text-align: center;
    padding: 30px 20px;
    max-width: 600px;
}

.sucesso-icon {
    font-size: 4rem;
    color: #4caf50;
    margin-bottom: 15px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.modal-sucesso h2 {
    color: #2c5f2d;
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.sucesso-mensagem {
    background: linear-gradient(135deg, #2c5f2d 0%, #97bf0d 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.sucesso-mensagem h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.sucesso-mensagem p {
    margin: 5px 0;
    color: white;
    font-size: 0.95rem;
}

.resumo-pedido-sucesso {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.resumo-detalhado h4 {
    margin: 0 0 15px 0;
    color: #2c5f2d;
    font-size: 1.1rem;
}

.resumo-detalhado p {
    margin: 8px 0;
    color: #333;
    font-size: 0.9rem;
}

.resumo-detalhado hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 15px 0;
}

.lista-itens-sucesso {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.lista-itens-sucesso li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lista-itens-sucesso li:last-child {
    border-bottom: none;
}

.preco-item {
    color: #2c5f2d;
    font-weight: bold;
}

.total-sucesso {
    background: #2c5f2d;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 1.1rem !important;
}

.total-sucesso strong {
    color: white;
}

.acoes-sucesso {
    margin: 20px 0;
}

.acoes-sucesso .btn {
    margin: 8px 0;
}

.acoes-sucesso .btn-success {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    font-size: 1.05rem;
}

.acoes-sucesso .btn-success i {
    font-size: 1.2rem;
}

.nota-sucesso {
    color: #666;
    font-size: 0.85rem;
    margin-top: 15px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 0.9rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ========================================
   MEDIA QUERIES - MOBILE FIRST
   ======================================== */

/* TABLET - 600px+ */
@media (min-width: 600px) {
    #cintia-cardapio-app {
        padding: 20px;
    }

    .cardapio-header {
        padding: 30px 20px;
    }

    .cardapio-header h1 {
        font-size: 2rem;
    }

    .cardapio-header p {
        font-size: 1rem;
    }

    .tab-btn {
        min-width: 140px;
        font-size: 0.95rem;
    }

    .produtos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .produto-imagem {
        height: 200px;
    }

    .produto-info {
        padding: 15px;
    }

    .produto-info h3 {
        font-size: 1.1rem;
    }

    .btn-carrinho {
        width: 65px;
        height: 65px;
        font-size: 26px;
    }

    .carrinho-badge::after {
        font-size: 12px;
        right: 42px;
    }

    .modal-content {
        border-radius: 20px;
    }

    .modal-header {
        padding: 25px;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .modal-body {
        padding: 25px;
    }

    .modal-footer {
        padding: 20px 25px;
    }
}

/* TABLET LANDSCAPE - 768px+ */
@media (min-width: 768px) {
    .cardapio-tabs {
        overflow-x: visible;
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 150px;
    }

    .tab-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .produtos-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .produto-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }

    .produto-card.selecionado::after {
        content: "✓ SELECIONADO";
        width: auto;
        height: auto;
        border-radius: 20px;
        padding: 5px 12px;
        font-size: 0.75rem;
    }

    .btn-carrinho {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

    .btn-carrinho:hover {
        transform: scale(1.1);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
    }

    .carrinho-float {
        bottom: 30px;
        right: 30px;
    }

    .btn-close:hover {
        background: #ff4757;
        color: white;
        transform: rotate(90deg);
    }

    .carrinho-item:hover {
        background: #e9ecef;
        transform: translateX(-5px);
    }

    .btn-remover-item:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
    }

    .pagamento-card:hover {
        border-color: #667eea;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    }

    .btn-success:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
    }
}

/* DESKTOP - 1024px+ */
@media (min-width: 1024px) {
    #cintia-cardapio-app {
        max-width: 1200px;
        padding: 30px;
    }

    .cardapio-header {
        padding: 40px 30px;
    }

    .cardapio-header h1 {
        font-size: 2.5rem;
    }

    .cardapio-header p {
        font-size: 1.2rem;
    }

    .tab-content h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .produtos-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .produto-imagem {
        height: 220px;
    }

    .produto-info h3 {
        font-size: 1.15rem;
    }

    .produto-info p {
        font-size: 0.9rem;
    }

    .produto-preco {
        font-size: 1.4rem;
    }

    .modal-header {
        padding: 30px;
    }

    .modal-header h2 {
        font-size: 1.6rem;
    }

    .modal-body {
        padding: 30px;
    }

    .modal-footer {
        padding: 25px 30px;
    }

    .carrinho-vazio {
        padding: 60px 20px;
        font-size: 1.1rem;
    }

    .carrinho-categoria h4 {
        font-size: 1.15rem;
    }

    .item-nome {
        font-size: 1rem;
    }

    .item-preco {
        font-size: 1.1rem;
    }

    .resumo-linha {
        font-size: 1rem;
    }

    .resumo-linha.total {
        font-size: 1.4rem;
    }

    .pagamento-content i {
        font-size: 2rem;
    }

    .pagamento-content strong {
        font-size: 1.1rem;
    }

    .pagamento-content span {
        font-size: 0.9rem;
    }

    .alert {
        padding: 20px;
        font-size: 1rem;
    }

    .resumo-final {
        padding: 20px;
    }

    .resumo-final h3 {
        font-size: 1.3rem;
    }

    .sucesso-icon {
        font-size: 5rem;
    }

    .modal-sucesso h2 {
        font-size: 1.8rem;
    }

    .sucesso-mensagem h3 {
        font-size: 1.5rem;
    }

    .sucesso-mensagem p {
        font-size: 1.05rem;
    }
    
    .resumo-pedido-sucesso {
        padding: 25px;
    }
    
    .resumo-detalhado h4 {
        font-size: 1.2rem;
    }
    
    .total-sucesso {
        font-size: 1.3rem !important;
    }
}

/* Force single column for Proteínas on large screens (desktop) */
@media (min-width: 1024px) {
    #tab-pratos .produtos-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Force single column for Acompanhamentos and Bebidas on large screens */
@media (min-width: 1024px) {
    #tab-acompanhamentos .produtos-grid,
    #tab-bebidas .produtos-grid {
        grid-template-columns: 1fr !important;
    }
}

/* LARGE DESKTOP - 1440px+ */
@media (min-width: 1440px) {
    .produtos-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
