/* CSS Corrigido e Atualizado */

.categoria-section {
    display: none;
}

.categoria-section.active {
    display: block;
}

.highlight-card {
    display: flex;
    margin-bottom: 1rem;
    background: #1E1E1E;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
}

.highlight-card:hover {
    transform: scale(1.02);
}

.highlight-card img {
    width: 120px;
    height: auto;
}

.highlight-card .info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1rem;
    flex: 1;
    position: relative;
}

.highlight-card h3 {
    margin-top: 6px;
    text-align: start;
}

.highlight-card p {
    margin: 3px 0;
}

.highlight-card div {
    padding: 1rem;
}

select {
    margin: 20px 8px;
    padding: 8px;
    font-size: 16px;
    border-radius: 8px;
    outline: none;
    width: 95%;
}

@media (max-width: 600px) {
    select {
        font-size: 14px;
        padding: 6px;
    }
}

.highlight-card p:nth-last-child(2) {
    color: #ff6b6b;
    font-family: bold;
}

.highlight-card p:nth-last-child(1) {
    color: #55dd99;
    font-weight: bold;
}

.btn-add {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 15px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 128px;
    margin-bottom: 5px;
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: 12px;
    text-align: center;
    outline: none;
}

.btn-add:hover {
    background-color: #c0392b;
}

#carrinho {
    position: fixed;
  right: 0;
  top: 60px;
  width: 350px;
  max-height: 90vh;
  background: #fff;
  border-left: 2px solid #ccc;
  padding: 15px;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  display: none;
  display: flex;
  flex-direction: column;
}

#carrinho h3 {
    margin-top: 0;
}

#abrirCarrinho {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

#contadorCarrinho {
    font-weight: bold;
    color: red;
}

#listaCarrinho {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}

#listaCarrinho li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

#listaCarrinho img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

@media (max-width: 768px) {
    #carrinho {
        width: 90%;
        max-height: 85vh;
        overflow-y: auto;
    }

    #listaCarrinho img {
        width: 50px;
        height: 50px;
    }
}

#carrinho button {
    background-color: #c62828;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

#carrinho button:hover {
    background-color: #b71c1c;
}

.botao-modal {
    margin: 10px;
    padding: 8px 16px;
    background-color: #2e7d32;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
}

.botao-modal:hover {
    background-color: #1b5e20;
}

#finalizarCompra {
    margin-top: 10px;
    background-color: #2e7d32 !important;
}

#finalizarCompra:hover {
    background-color: #1b5e20 !important;
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

#modalCompra {
    position: fixed;
    z-index: 9999;
    background-color: #1E1E1E;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    height: auto;
    max-width: 500px;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 998;
}

#mensagemCompra {
    font-size: 18px;
    font-weight: bold;
    color: #2e7d32;
}

#confirmacao {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

#valorTotal {
    font-size: 16px;
    font-weight: bold;
    color: black;
    margin-top: 10px;
    text-align: center;
}

#pagamentoForm {
    margin-top: 10px;
    display: none;
}

#pagamentoForm label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: bold;
}

#pagamentoForm select,
#pagamentoForm input {
    padding: 8px;
    width: 90%;
    max-width: 300px;
    margin: 5px auto;
    border-radius: 5px;
    border: none;
    font-size: 14px;
    display: block;
}

#erroPagamento {
    color: red;
    margin-top: 8px;
    font-weight: bold;
    display: none;
}

@media (max-width: 600px) {
    .highlight-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .highlight-card img {
        width: 94%;
        margin-top: 10px;
        height: auto;
        border-radius: 12px 12px 0 0;
    }

    .highlight-card .info {
        padding: 10px;
    }

    .btn-add {
        font-size: 0.9rem;
        padding: 8px 12px;
        margin-top: auto;
        margin-bottom: 10px;
        width: 90%;
    }
}

@media (max-width: 478px) {
    #modalCompra {
        width: 350px;
        padding: 25px;
    }

    #modalCompra #mensagemCompra {
        color: #2e7d32;
    }

    #modalCompra #confirmacao {
        color: #fff;
    }

    #modalCompra .botao-modal {
        margin-top: 15px;
    }
}
