/* Reset básico */
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, form, input, button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Corpo da página */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5; /* Cinza bem clarinho */
    color: #2E3090; /* Azul principal */
    line-height: 1.6;
}

/* Links */
a {
    color: #2E3090; /* Azul */
    text-decoration: none;
}

a:hover {
    color: #FEF100; /* Amarelo ao passar o mouse */
}

/* Títulos */
h1, h2, h3, h4, h5, h6 {
    color: #2E3090; /* Azul principal */
    margin-bottom: 1rem;
}

/* Parágrafos */
p {
    color: #2E3090; /* Azul principal */
    margin-bottom: 1rem;
}

/* Botões */
button {
    background-color: #2E3090; /* Fundo azul */
    color: #FEF100; /* Texto amarelo */
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #23257A; /* Azul mais escuro no hover */
}

/* Inputs e Formulários */
input, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

input:focus, textarea:focus {
    border-color: #2E3090; /* Azul ao focar */
    outline: none;
}

main {
    padding-top: 100px;
}

/* Contêiner para formulários e áreas centrais */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff; /* Fundo branco para contraste */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Erro e Sucesso */
.erro {
    color: red;
    background: #ffe5e5;
    border: 1px solid red;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.sucesso {
    color: green;
    background: #e5ffe5;
    border: 1px solid green;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* Responsividade para Tabelas */
/* Tabelas padrão */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: #fff;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

table th {
    background-color: #2E3090; /* Fundo azul */
    color: #FEF100; /* Texto amarelo */
    font-weight: bold;
}

/* Tabela adaptada para dispositivos móveis */
@media (max-width: 768px) {
    table {
        display: block; /* Exibe como bloco */
    }

    table thead {
        display: none; /* Esconde o cabeçalho */
    }

    table tr {
        display: block; /* Cada linha se torna um bloco */
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        padding: 10px;
    }

    table td {
        display: flex;
        justify-content: space-between;
        padding: 10px;
        border: none;
        border-bottom: 1px solid #ddd;
    }

    table td::before {
        content: attr(data-label); /* Mostra o rótulo da coluna */
        font-weight: bold;
        color: #2E3090;
        width: 50%; /* Rótulo ocupa 50% */
        display: inline-block;
    }
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #2E3090; /* Azul principal */
    color: #FFFFFF; /* Texto amarelo */
    margin-top: 2rem;
}

/* Banner */
.banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #2E3090; /* Azul principal */
    color: #FEF100; /* Texto amarelo */
    padding: 20px;
    flex-wrap: wrap;
}

.banner .logo {
    max-height: 100px;
    margin-right: 20px;
}

.banner h1 {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

/* Menu */
.menu {
    background-color: #fff; /* Branco */
    padding: 10px 20px;
    margin-bottom: 20px;
}

.menu ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.menu ul li {
    margin: 5px 10px;
}

.menu ul li a {
    text-decoration: none;
    color: #2E3090; /* Azul */
    font-weight: bold;
}

.menu ul li a:hover {
    color: #FEF100; /* Amarelo ao passar o mouse */
}

/* Botão de Logout */
.logout-btn {
    color: red;
    font-weight: bold;
}

/* Lista de produtos */
.produto-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Card do produto */
.produto-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    width: calc(33.33% - 20px); /* 3 cards por linha no desktop */
    max-width: 300px; /* Limita a largura máxima do card */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.produto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Imagem do produto */
.produto-imagem {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Nome e informações do produto */
.produto-card h2 {
    font-size: 16px;
    color: #2E3090;
    margin-bottom: 10px;
}

.produto-card p {
    margin: 5px 0;
    color: #555;
}

/* Botão de adicionar ao carrinho */
.produto-card button {
    background-color: #2E3090;
    color: #FEF100;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.produto-card button:hover {
    background-color: #23257A;
}

/* Responsividade */
@media (max-width: 1024px) {
    .produto-card {
        width: calc(50% - 20px); /* 2 cards por linha em telas intermediárias */
    }
}

@media (max-width: 768px) {
    .produto-card {
        width: calc(100% - 20px); /* 1 card por linha em telas pequenas */
    }
}


/* Toast - Mensagem de Sucesso */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2E3090;
    color: #FEF100;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsividade */
@media (max-width: 768px) {
    .produto-card {
        width: 100%; /* 100% para dispositivos menores */
    }

    .banner {
        flex-direction: column;
        text-align: center;
    }

    .banner h1 {
        font-size: 20px;
        margin-top: 10px;
    }

    .menu ul {
        flex-direction: column;
        align-items: center;
    }

    .menu ul li {
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    h1, h2, h3 {
        font-size: 20px; /* Reduz tamanho do título */
    }

    button {
        font-size: 14px;
        padding: 8px 10px;
    }
}

.produto-imagem-preview {
    max-width: 200px;
    height: auto;
    margin-top: 10px;
    border-radius: 5px;
}

/* Botão Editar Produto */
.edit-product-btn {
    background-color: #2E3090;
    color: #FEF100;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.edit-product-btn:hover {
    background-color: #23257A; /* Azul mais escuro no hover */
}

/* Botão Criar Produto */
.add-product-btn {
    margin-bottom:30px;
    background-color: #2E3090;
    color: #FEF100;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.add-product-btn:hover {
    background-color: #23257A; /* Azul mais escuro no hover */
}

/* Estilos para o container de cards */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

/* Estilo para cada card */
.dashboard-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    width: calc(25% - 20px); /* 4 cards por linha em telas grandes */
    max-width: 300px;
    text-align: center;
    text-decoration: none;
    color: #2E3090;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover para os cards */
.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: #f9f9f9;
}

/* Títulos nos cards */
.dashboard-card h2 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Parágrafos nos cards */
.dashboard-card p {
    font-size: 14px;
    color: #555;
}

/* Responsividade: 2 cards por linha em telas intermediárias */
@media (max-width: 1024px) {
    .dashboard-card {
        width: calc(50% - 20px);
    }
}

/* Responsividade: 1 card por linha em telas pequenas */
@media (max-width: 768px) {
    .dashboard-card {
        width: 100%;
    }
}

footer {
    background-color: #2E3090; /* Fundo azul */
    color: #FEFfff !important; /* Força o texto amarelo */
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

footer a {
    color: #fef100 !important; /* Link amarelo */
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    color: #fef100 !important; /* Link muda para branco no hover */
}

.rodape-container p {
    margin: 5px 0; /* Espaço entre linhas */
    color: #FEFfff !important; /* Força o texto amarelo */
}

/* Botão Flutuante */
.btn-topo {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #2E3090; /* Azul principal */
    color: #FEF100; /* Amarelo */
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    font-size: 24px;
    cursor: pointer;
    display: none; /* Escondido inicialmente */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-topo:hover {
    background-color: #23257A; /* Azul mais escuro */
    transform: scale(1.1); /* Aumenta levemente ao passar o mouse */
}

