/* Container Principal do Carrinho Lateral */
.carrinho-lateral {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px; /* Largura do carrinho desktop */
    max-width: 100%; /* Garante que ocupe a tela toda em celulares */
    height: 100vh;
    background-color: #d6c69b;  
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(100%); /* Esconde o carrinho para a direita */
    transition: transform 0.3s ease-in-out;
}

/* Classe que será adicionada via JS para mostrar o carrinho */
.carrinho-lateral.ativo {
    transform: translateX(0);
}

/* Estrutura interna */
.carrinho-conteudo {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.carrinho-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.carrinho-corpo {
    flex: 1;
    overflow-y: auto; /* Permite scroll se o carrinho for grande */
    padding: 20px;
}

/* Botão Fechar */
.btn-fechar {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* Overlay Escuro de Fundo */
.carrinho-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.carrinho-overlay.ativo {
    display: block;
    opacity: 1;
}