/* ==================================== */
/* 1. Variáveis e Estilos Base          */
/* ==================================== */
:root {
    --cor-principal: #2d5016;      /* Verde natureza */
    --cor-secundaria: #8b6f47;     /* Marrom terra */
    --cor-destaque: #d4a574;       /* Bege dourado */
    --cor-fundo: #f8f6f3;          /* Bege claro */
    --cor-card: #ffffff;
    --cor-texto-escuro: #2c2c2c;
    --cor-texto-claro: #666;
    --sombra-leve: 0 2px 4px rgba(0, 0, 0, 0.1);
    --sombra-media: 0 3px 6px rgba(0, 0, 0, 0.15);
    --sombra-pesada: 0 6px 12px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--cor-fundo);
    padding-bottom: 100px;
    color: var(--cor-texto-escuro);
}

/* ==================================== */
/* 2. Cabeçalho                         */
/* ==================================== */

#cabecalho-principal {
    background-color: var(--cor-secundaria);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

#cabecalho-principal img:first-child {
    height: auto;
    max-height: 50px;
    width: auto;
}

#cabecalho-principal h1 {
    font-size: 1.5em;
    margin: 0;
    flex-grow: 1;
    text-align: center;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icons img {
    height: 24px;
    width: 24px;
}

#carrinho-link {
    position: relative;
    display: inline-block;
}

.contador-carrinho {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #f44336;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75em;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
    display: none;
}

/* ==================================== */
/* 3. Catálogo de Experiências          */
/* ==================================== */
#catalogo-produtos {
    padding: 25px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

#catalogo-produtos h2 {
    color: var(--cor-principal);
    font-size: 1.8em;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--cor-destaque);
    font-weight: 600;
}

#catalogo-produtos h2:first-of-type {
    margin-top: 0;
}

.categoria-intro {
    color: var(--cor-texto-claro);
    margin-bottom: 20px;
    font-size: 1.05em;
    line-height: 1.6;
}

.produto {
    background-color: var(--cor-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--sombra-leve);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.produto:hover {
    box-shadow: var(--sombra-pesada);
    border-color: var(--cor-destaque);
    transform: translateY(-2px);
}

/* ==================================== */
/* Carrossel de Imagens do Produto      */
/* ==================================== */
.produto-imagens {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

.carrossel-container {
    display: flex;
    transition: transform 0.4s ease;
    height: 100%;
    width: 100%;
}

.produto-imagens img {
    min-width: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
}

.carrossel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 10;
    transition: all 0.2s ease;
}

.carrossel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carrossel-btn.prev {
    left: 5px;
}

.carrossel-btn.next {
    right: 5px;
}

.produto-imagens:hover .carrossel-btn {
    display: flex;
}

.carrossel-indicadores {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 10;
}

.indicador {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.indicador.ativo {
    background: white;
    width: 8px;
    height: 8px;
}

.produto-info {
    flex-grow: 1;
}

.produto-info h3 {
    color: var(--cor-principal);
    font-size: 1.3em;
    margin-bottom: 8px;
    font-weight: 600;
}

.produto-info .detalhes {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.produto-info .detalhes span {
    background: var(--cor-fundo);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    color: var(--cor-texto-claro);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.produto-info p {
    color: var(--cor-texto-claro);
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 10px;
    text-align: justify; /* <--- ADICIONE ESTA LINHA */
}
/* Estilo específico para a lista de informações */
.lista-informacoes {
    list-style-type: disc;      /* Garante que apareçam as "bolinhas" */
    margin-left: 20px;          /* Dá o recuo para as bolinhas não sumirem */
    text-align: left;           /* Força o alinhamento à esquerda, mesmo no celular */
    margin-bottom: 15px;
}

.lista-informacoes li {
    color: var(--cor-texto-claro);
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 5px;
    padding-left: 5px;          /* Espaço entre a bolinha e o texto */
}

.preco {
    font-weight: bold;
    color: var(--cor-secundaria);
    font-size: 1.4em;
}

/* ==================================== */
/* 4. Controle de Quantidade            */
/* ==================================== */
.controle-quantidade {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.controle-quantidade button {
    background-color: var(--cor-principal);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.4em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--sombra-media);
    transition: all 0.3s ease;
    font-weight: bold;
}

.controle-quantidade button:hover {
    background-color: var(--cor-secundaria);
    transform: scale(1.1);
}

.controle-quantidade button:active {
    transform: scale(0.95);
}

.controle-quantidade .btn-menos {
    background-color: #888;
}

.controle-quantidade .btn-menos:hover {
    background-color: #666;
}

.quantidade-display {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--cor-texto-escuro);
    min-width: 30px;
    text-align: center;
}

/* ==================================== */
/* 5. Modal (Carrinho)                  */
/* ==================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.modal-conteudo {
    background-color: var(--cor-card);
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-conteudo h2 {
    color: var(--cor-principal);
    margin-bottom: 20px;
    font-size: 1.8em;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--cor-destaque);
}

#lista-carrinho {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

#lista-carrinho li {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: var(--cor-fundo);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px; /* Aumentado levemente para dar respiro */
}

/* --- AQUI ESTÁ A ALTERAÇÃO PRINCIPAL --- */
#lista-carrinho li > span:first-child {
    font-weight: 600;
    color: var(--cor-principal);
    flex: 1;
    
    /* Regras para quebra de texto inteligente */
    overflow-wrap: break-word;  
    word-wrap: break-word;
    hyphens: auto;              /* Adiciona o hífen se necessário */
    max-width: 150px;           /* Limita a largura para não "atropelar" o preço */
    line-height: 1.2;
}

.carrinho-botoes-acao {
    display: flex;
    gap: 8px;
    align-items: center;
}

.carrinho-botoes-acao > span {
    font-weight: bold;
    color: var(--cor-secundaria);
    min-width: 90px; /* Ajustado para caber melhor em telas pequenas */
    text-align: right;
    font-size: 0.95em;
}

.modal-conteudo p {
    text-align: center;
    font-size: 1.3em;
    margin: 20px 0;
    color: var(--cor-texto-escuro);
}

#total-carrinho {
    font-weight: bold;
    color: var(--cor-secundaria);
    font-size: 1.4em;
}

.modal-conteudo button {
    width: 100%;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 1.05em;
    font-weight: 600;
    transition: all 0.3s ease;
}

#fechar-carrinho {
    background-color: #888;
}

#enviar-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #20ba5a 100%);
}

#fechar-carrinho:hover {
    background-color: #666;
}

#enviar-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.modal-alerta {
    max-width: 450px;
}

#alerta-mensagem {
    font-size: 1.1em;
    color: var(--cor-texto-escuro);
    margin: 20px 0;
    line-height: 1.6;
}

#fechar-alerta {
    background-color: var(--cor-principal);
}

#fechar-alerta:hover {
    background-color: var(--cor-secundaria);
}

/* ==================================== */
/* 6. Botões do Modal                   */
/* ==================================== */
.remover-item,
.limpar-item {
    background-color: #f58b32;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.remover-item:hover,
.limpar-item:hover {
    background-color: #ee5a52;
    transform: scale(1.05);
}

/* ==================================== */
/* 7. Botão Flutuante                   */
/* ==================================== */
.botao-flutuante {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 99;
    background: linear-gradient(135deg, var(--cor-principal) 0%, var(--cor-secundaria) 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 50px;
    font-size: 1.15em;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.botao-flutuante:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* ==================================== */
/* 8. Responsividade                    */
/* ==================================== */
@media (max-width: 768px) {
    .produto {
        flex-direction: column;
        text-align: center;
    }

    .produto-imagens {
        width: 100%;
        height: 250px;
        border-radius: 12px;
    }

    .produto-imagens img {
        height: 100%;
    }

    .produto-info .detalhes {
        justify-content: flex-start;
    }

    .controle-quantidade {
        width: 100%;
        justify-content: center;
    }

    #catalogo-produtos h2 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    #cabecalho-principal .logo-container h1 {
        font-size: 1.2em;
    }

    .modal-conteudo {
        margin: 5% auto;
        padding: 20px;
    }
}