/* Cardápio Simples WP - Layout de Lista Vertical */

.cswp-cardapio-wrapper {
    font-family: 'Arial', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cswp-categorias-menu {
    background: #f8f9fa;
    padding: 25px 50px 1px 0px;
    border-radius: 8px;
    margin-bottom: 30px;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.cswp-categorias-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.cswp-categorias-menu li {
    margin: 0;
}

.cswp-categorias-menu a {
    text-decoration: none;
    background: #2c3e50;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.cswp-categorias-menu a:hover {
    background: #000;
    transform: translateY(-2px);
}

.cswp-categoria-section {
    margin-bottom: 50px;
    scroll-margin-top: 100px;
}

.cswp-categoria-titulo {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 28px;
}

/* MODIFICAÇÃO: Mudar grid para lista vertical */
.cswp-itens-lista {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Estilo para cada item em linha única */
.cswp-item-linha {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 200px;
}

.cswp-item-linha:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cswp-item-linha.cswp-indisponivel {
    opacity: 0.7;
    position: relative;
}

.cswp-item-linha.cswp-indisponivel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

/* Imagem do item */
.cswp-item-linha-imagem {
    flex: 0 0 250px;
    overflow: hidden;
    position: relative;
}

.cswp-item-linha-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cswp-item-linha:hover .cswp-item-linha-imagem img {
    transform: scale(1.05);
}

/* Conteúdo do item */
.cswp-item-linha-conteudo {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Cabeçalho do item */
.cswp-item-linha-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.cswp-item-linha-titulo {
    color: #2c3e50;
    margin: 0;
    font-size: 22px;
    flex: 1;
}

.cswp-item-linha-preco {
    color: #27ae60;
    font-size: 28px;
    font-weight: bold;
    white-space: nowrap;
}

/* Descrição do item */
.cswp-item-linha-descricao {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* Rodapé do item */
.cswp-item-linha-rodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Status de disponibilidade */
.cswp-item-indisponivel-linha {
    color: #e74c3c;
    font-weight: bold;
    font-size: 14px;
    padding: 6px 12px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
}

.cswp-item-disponivel-linha {
    color: #27ae60;
    font-weight: bold;
    font-size: 14px;
    padding: 6px 12px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 4px;
}

/* Botão ver detalhes */
.cswp-ver-detalhes-linha {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.cswp-ver-detalhes-linha:hover {
    background: #2980b9;
}

/* Modal (mantido igual) */
.cswp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.cswp-modal.cswp-modal-aberto {
    display: flex;
    opacity: 1;
}

.cswp-modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cswp-modal.cswp-modal-aberto .cswp-modal-content {
    transform: translateY(0);
}

.cswp-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #333;
    cursor: pointer;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
}

.cswp-modal-close:hover {
    background: #f1f1f1;
    color: #e74c3c;
}

.cswp-modal-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

/* Loading */
.cswp-loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

/* Efeito de foco para acessibilidade */
.cswp-ver-detalhes-linha:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Scrollbar para o modal */
.cswp-modal-content::-webkit-scrollbar {
    width: 8px;
}

.cswp-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cswp-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.cswp-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/* Responsivo para layout de linha */
@media (max-width: 768px) {
    .cswp-item-linha {
        flex-direction: row; /* Mudar de column para row */
        min-height: 120px; /* Altura menor para mobile */
        padding: 10px;
        gap: 15px;
        align-items: center;
    }
    
    .cswp-item-linha-imagem {
        flex: 0 0 100px; /* Imagem menor em mobile */
        height: 100px;
        min-height: 100px;
        width: 100px;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .cswp-item-linha-imagem img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .cswp-item-linha-conteudo {
        padding: 0;
        flex: 1;
        min-width: 0; /* Importante para texto não estourar */
    }
    
    .cswp-item-linha-cabecalho {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        margin-bottom: 8px;
    }
    
    .cswp-item-linha-titulo {
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }
    
    .cswp-item-linha-preco {
        font-size: 18px;
        white-space: nowrap;
    }
    
    .cswp-item-linha-descricao {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Apenas 2 linhas em mobile */
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-height: 2.8em; /* 2 linhas * 1.4 line-height */
    }
    
    .cswp-item-linha-rodape {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 0;
    }
    
    .cswp-ver-detalhes-linha {
        padding: 8px 15px;
        font-size: 13px;
        white-space: nowrap;
        min-width: 120px;
    }
    
    .cswp-item-indisponivel-linha,
    .cswp-item-disponivel-linha {
        font-size: 12px;
        padding: 4px 8px;
        white-space: nowrap;
    }
    
    /* Menu de categorias em mobile */
    .cswp-categorias-menu ul {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 10px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .cswp-categorias-menu li {
        flex-shrink: 0;
    }
    
    .cswp-categorias-menu a {
        padding: 8px 15px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* Ajustar título da categoria */
    .cswp-categoria-titulo {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    /* Ajustar grid de categorias */
    .cswp-itens-lista {
        gap: 15px;
    }
    
    /* Modal em mobile */
    .cswp-modal-item {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cswp-modal-imagem img {
        max-height: 200px;
        object-fit: cover;
    }
}

/* Ajustes para telas muito pequenas (celulares menores) */
@media (max-width: 480px) {
    .cswp-item-linha {
        min-height: 110px;
        padding: 8px;
        gap: 12px;
    }
    
    .cswp-item-linha-imagem {
        flex: 0 0 90px;
        height: 90px;
        min-height: 90px;
        width: 90px;
    }
    
    .cswp-item-linha-titulo {
        font-size: 15px;
    }
    
    .cswp-item-linha-preco {
        font-size: 16px;
    }
    
    .cswp-item-linha-descricao {
        font-size: 11px;
        -webkit-line-clamp: 2;
        max-height: 2.8em;
    }
    
    .cswp-ver-detalhes-linha {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 110px;
    }
    
    .cswp-item-indisponivel-linha,
    .cswp-item-disponivel-linha {
        font-size: 8px;
        padding: 0px 2px;
    }
    
    .cswp-categorias-menu a {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* Ajustar espaçamento geral */
    .cswp-cardapio-wrapper {
        padding: 15px 10px;
    }
    
    .cswp-categoria-section {
        margin-bottom: 30px;
    }
}

/* Ajustes para telas muito estreitas (retrato de celulares) */
@media (max-width: 360px) {
    .cswp-item-linha {
        min-height: 100px;
        padding: 6px;
        gap: 10px;
    }
    
    .cswp-item-linha-imagem {
        flex: 0 0 80px;
        height: 80px;
        min-height: 80px;
        width: 80px;
    }
    
    .cswp-item-linha-titulo {
        font-size: 14px;
    }
    
    .cswp-item-linha-preco {
        font-size: 15px;
    }
    
    .cswp-item-linha-descricao {
        -webkit-line-clamp: 2;
        font-size: 11px;
    }
    
    .cswp-ver-detalhes-linha {
        padding: 5px 10px;
        font-size: 11px;
        min-width: 100px;
    }
    
    .cswp-item-linha-rodape {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    /* Em telas muito pequenas, botão ocupa linha inteira */
    @media (max-width: 320px) {
        .cswp-ver-detalhes-linha {
            width: 100%;
            text-align: center;
        }
    }
}

/* Garantir que o scroll horizontal do menu de categorias funcione bem */
.cswp-categorias-menu::-webkit-scrollbar {
    height: 4px;
}

.cswp-categorias-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.cswp-categorias-menu::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.cswp-categorias-menu::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Melhorar toque em dispositivos touch */
.cswp-ver-detalhes-linha,
.cswp-categorias-menu a,
.cswp-toggle-disponibilidade-btn {
    touch-action: manipulation;
}

/* Evitar zoom em inputs em iOS */
@media (max-width: 768px) {
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    input[type="color"] {
        font-size: 16px; /* Previne zoom em iOS */
    }
}

/* Animações suaves para transições de layout */
.cswp-item-linha {
    transition: all 0.3s ease;
}

/* Garantir que imagens não quebrem o layout */
.cswp-item-linha-imagem img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Melhorar a legibilidade do texto em mobile */
@media (max-width: 768px) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .cswp-item-linha-conteudo {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}
/* Melhorias para touch em mobile */
@media (hover: none) and (pointer: coarse) {
    .cswp-ver-detalhes-linha {
        min-height: 44px; /* Tamanho mínimo recomendado para toque */
        min-width: 44px;
    }
    
    .cswp-categorias-menu a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Aumentar área de toque para botões */
    .cswp-ver-detalhes-linha {
        position: relative;
    }
    
    .cswp-ver-detalhes-linha:after {
        content: '';
        position: absolute;
        top: -10px;
        right: -10px;
        bottom: -10px;
        left: -10px;
    }
}

/* Prevenir overscroll em mobile */
@media (max-width: 768px) {
    html, body {
        overscroll-behavior-y: none;
    }
}

/* Suporte a dark mode em mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {

    .cswp-item-linha-preco {
        color: #4caf50;
    }
    
    .cswp-categorias-menu {
        background: #2d2d2d;
    }
    
    .cswp-categorias-menu a {
        background: #404040;
        color: #e0e0e0;
    }

}

/* Ajustes específicos para tablets (entre 768px e 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .cswp-item-linha {
        min-height: 150px;
    }
    
    .cswp-item-linha-imagem {
        flex: 0 0 180px;
        height: 150px;
    }
    

    .cswp-item-linha-descricao {
        font-size: 14px;
        -webkit-line-clamp: 2;
        max-height: 3em;
    }
}

/* Garantir que o layout não quebre em telas médias */
@media (max-width: 1024px) {
    .cswp-cardapio-wrapper {
        padding: 20px 15px;
    }
}

/* Correção para Safari em iOS */
@supports (-webkit-touch-callout: none) {
    .cswp-item-linha {
        -webkit-transform: translateZ(0);
    }
    
    .cswp-categorias-menu {
        position: -webkit-sticky;
    }
}

/* Melhorar performance de animações em mobile */
@media (max-width: 768px) {
    .cswp-item-linha {
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000;
    }
}
/* Menu de categorias - Desktop */
.cswp-categorias-menu {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.cswp-categorias-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.cswp-categorias-menu li {
    margin: 0;
}

.cswp-categorias-menu a {
    text-decoration: none;
    background: #2c3e50;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.cswp-categorias-menu a:hover {
    background: #000;
    transform: translateY(-2px);
}

/* Menu fixo para mobile */
@media (max-width: 768px) {
    .cswp-categorias-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        padding: 10px 15px;
        border-radius: 0;
        border-bottom: 1px solid #dee2e6;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        background: white;
        height: auto;
        min-height: auto;
    }
    
    .cswp-categorias-menu ul {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        justify-content: flex-start;
        padding-bottom: 0px;
        margin-bottom: -6px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .cswp-categorias-menu ul::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .cswp-categorias-menu li {
        flex: 0 0 auto;
    }
    
    .cswp-categorias-menu a {
        padding: 8px 16px;
        font-size: 14px;
        white-space: nowrap;
        display: block;
    }
    
    .cswp-categorias-menu a:hover {
        background: #000;
        transform: none;
    }
    
    /* Indicador visual de categoria ativa */
    .cswp-categorias-menu a.active {
        background: #3498db;
        font-weight: bold;
    }
    
    /* Espaçamento para o conteúdo não ficar atrás do menu fixo */
    .cswp-cardapio-wrapper {
        padding-top: 0px; /* Altura do menu fixo + padding */
    }
    
    /* Ajustar seções para considerar o menu fixo */
    .cswp-categoria-section {
        scroll-margin-top: 70px; /* Para a âncora parar na posição correta */
    }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 480px) {
    .cswp-categorias-menu {
        padding: 8px 10px;
    }
    
    .cswp-categorias-menu a {
        padding: 7px 12px;
        font-size: 13px;
    }
    
    .cswp-cardapio-wrapper {
        padding-top: 65px;
    }
    
    .cswp-categoria-section {
        scroll-margin-top: 65px;
    }
}

/* Para tablets (entre 768px e 1024px) - manter sticky */
@media (min-width: 769px) and (max-width: 1024px) {
    .cswp-categorias-menu {
        position: sticky;
        top: 10px;
    }
}