/* Estilos para tema T – novo componente com scroll-snap */
.category-carousel {
    overflow-x: auto;
    white-space: nowrap;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    background-color: #fff;
    cursor: grab;
}

    .category-carousel.active {
        cursor: grabbing;
    }

    .category-carousel::-webkit-scrollbar {
        display: none;
    }

.category-item {
    display: inline-block;
    scroll-snap-align: center;
    margin: 0 10px;
    padding: 10px 20px;
    background-color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
}

    .category-item:hover {
        background-color: lightgrey;
    }

    .category-item.selected {
        background-color: #f7654b;
        color: white;
    }

/* Barra fixa para categorias */
.nav-cardapio {
    transition: all 0.3s ease;
}

    .nav-cardapio.item-fixado {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

/* Estilos para OwlCarousel */
.owl-carousel .item {
    margin: 0 5px;
    padding: 0;
    text-align: center;
    justify-content: center;
    min-width: 150px;
}

/* Cards Elegantes */
.card-elegante {
    border: none;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

    .card-elegante::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.05) 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .card-elegante:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.12);
    }

        .card-elegante:hover::before {
            opacity: 1;
        }

.divisoria-cards {
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.card-elegante::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-elegante:hover::after {
    opacity: 0.3;
}

.card-elegante .destaque {
    color: #000000;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-elegante .detalhe {
    color: #555555;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Card Mercadoria */
.card-mercadoria {
    display: flex;
    flex-direction: row;
    height: 200px;
    min-height: 200px;
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.mercadoria-container {
    display: flex;
    flex-direction: row-reverse;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Container da Imagem */
.img-container {
    min-width: 100px; /* Aumentei de 90px para 100px */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Mudei de flex-end para center para centralizar melhor */
    order: 2;
    padding: 12px; 
}

.img-mercadoria {
    max-width: 100%;
    max-height: 150px; /* Aumentei de 120px para 140px */
    height: auto;
    object-fit: contain;
    border-radius: 10%;
}

.card-hover-effect {
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

    .card-hover-effect:hover {
        transform: translateY(-3px);
        border-color: black;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

/* Contentor de conteúdo */
.conteudo-mercadoria {
    flex: 1;
    min-width: 60%;
    padding: 10px;
}

.nome-mercadoria {
    -webkit-line-clamp: 1 !important;
     margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: #f7654b;
}

.info-mercadoria {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 4.5em;
    font-size: 0.9em;
    margin-bottom: 0 !important;
}

.info-extra {
    margin: 5px 0;
    font-size: 0.75rem;
    color: #666;
    flex-grow: 1;
}

.info-item {
    display: flex;
    align-items: center;
    margin: 3px 0;
}

    .info-item i {
        font-size: 10px;
        margin-right: 5px;
        width: 12px;
    }

/* Preço */
.preco-container {
    position: absolute;
    bottom: 5px;
    left: 10px;
    width: calc(100% - 20px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.preco-atual {
    font-size: 1rem;
    font-weight: 700;
    color: #2e7d32;
}

.preco-antigo {
    font-size: 0.7rem;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.badge-promocao {
    font-size: 0.6rem;
    background: #ff1744;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Media Queries para Mobile */
@media (max-width: 767px) {
    /* Ajustes gerais */
    .linha{
        margin-top:0 !important;
    }

    .category-carousel {
        padding: 6px 0;
    }

    .category-item {
        padding: 8px 16px;
        margin: 0 8px;
        font-size: 0.85rem;
    }

    /* Cards Mercadoria */
    .card-mercadoria {
        height: 130px;
        min-height: 130px;
    }

    .img-container {
        min-width: 120px;
        padding: 8px;
    }

    .img-mercadoria {
        max-height: 120px;
        max-width: 120px;
    }

    .conteudo-mercadoria {
        padding: 8px;
    }

    .nome-mercadoria {
        -webkit-line-clamp: 1 !important;
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .info-mercadoria {
        -webkit-line-clamp: 3; /* Reduz para 2 linhas em tablets */
        line-height: 1.3;
        font-size: 0.8em;
    }

    .info-extra {
        font-size: 0.65rem;
    }

    .info-item i {
        font-size: 8px;
    }

    .preco-atual {
        font-size: 1rem;
    }

    .preco-antigo {
        font-size: 0.65rem;
    }

    .badge-promocao {
        font-size: 0.55rem;
    }

    /* Cards Elegantes */
    .card-elegante {
        margin-bottom: 1rem;
    }

        .card-elegante .destaque {
            font-size: 0.85rem;
            margin-bottom: 0.5rem;
        }

        .card-elegante .detalhe {
            font-size: 0.75rem;
        }
}

/* Ajustes para telas muito pequenas (até 480px) */
@media (max-width: 480px) {
    /* Cards Mercadoria */
    .card-mercadoria {
        height: 110px;
        min-height: 110px;
    }

    .img-container {
        min-width: 60px;
        padding: 10px;
    }

    .img-mercadoria {
        max-height: 100px;
        max-width: 100px;
    }

    .conteudo-mercadoria {
        padding: 6px;
    }

    .nome-mercadoria {
        -webkit-line-clamp: 1 !important;
        font-size: 0.75rem;
    }

    .info-mercadoria {
        -webkit-line-clamp: 3; /* Mantém 2 linhas em celulares */
        display: -webkit-box; /* Garante que o sistema de clamping funcione */
        overflow: hidden;
    }

    .preco-atual {
        font-size: 1rem;
    }

    /* Carrossel */
    .category-item {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Ajustes para dispositivos muito pequenos (até 360px) */
@media (max-width: 360px) {
    .card-mercadoria {
        height: 100px;
        min-height: 100px;
    }

    .img-mercadoria {
        max-height: 80px;
        max-width: 80px;
    }

    .nome-mercadoria {
        -webkit-line-clamp: 1 !important;
        font-size: 0.7rem;
    }

    .info-mercadoria {
        font-size: 0.65em;
        -webkit-line-clamp: 3; /* Mantém 2 linhas em celulares */
        display: -webkit-box; /* Garante que o sistema de clamping funcione */
        overflow: hidden;
    }

    .preco-atual {
        font-size: 1rem;
    }

    .category-item {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}


/* ========================================
   ESTILOS OTIMIZADOS PARA CARDS DE MERCADORIA
   ======================================== */

/* Tag de promoção posicionada no canto superior direito */
.badge-promocao {
    position: absolute;
    top: 18px;
    left: -28px;
    background-color: #dc3545;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    z-index: 10;
    transform: rotate(-45deg);
    padding: 0 22px 0 22px;
}

.linha-preco-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Para responsividade */
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.preco-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-direction: row-reverse !important;
    bottom: -2px !important;
}

.preco-antigo {
    text-decoration: line-through;
    color: #888;
    font-size: 0.75rem;
}

/* Seção dos badges dentro do card */
.info-badges-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
    /* Garante que o container não ultrapasse o limite do card */
    max-width: 100%;
    box-sizing: border-box;
}

/* Badge padrão */
.info-badge {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 16px;
    padding: 0.3rem 0.6rem;
    font-size: 1.1vh;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
    transition: background-color 0.3s;
    overflow: hidden;
}

    /* Ícones dos badges */
    .info-badge i {
        margin-right: 0.4rem;
        font-size: 0.9rem;
    }

/* Ajustes para telas médias */
@media (max-width: 760px) {

    .card-mercadoria {
        height: 10px !important;
        min-height: 130px !important;
    }

    .info-badge {
        font-size: 1.1vh;
        padding: 0.25rem 0.5rem;
    }

        .info-badge i {
            font-size: 0.85rem;
        }
}

@media (max-width: 720px) {
    .info-badge {
        font-size: 0.50rem;
        padding: 0.25rem 0.5rem;
    }

}

@media (max-width: 490px) {
    .info-badges-container {
        justify-content: flex-end;
        gap: 0.3rem;
        padding: 0 0.5rem; /* substitui o antigo "0 5px" para consistência */
    }

    .info-badge {
        font-size: 0.5rem;
        padding: 0.2rem 0.35rem;
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
    }

        .info-badge i {
            font-size: 0.7rem;
            margin-right: 0.25rem;
        }
}

@media (max-width: 350px) {
    .info-badges-container {
        justify-content: center;
        padding: 0 0.4rem;
    }

    .info-badge {
        font-size: 0.45rem;
        padding: 0.15rem 0.3rem;
        margin-bottom: 0.2rem;
        max-width: 100%;
    }

        .info-badge i {
            font-size: 0.65rem;
        }
}

