/* RESET BÁSICO */
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    background: #f5f5f5;
}

/* ================= HEADER ================= */
.header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Faixa superior */
.top-bar {
    background: #0d6efd;
    padding: 15px 20px;
}

.logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

/* Menu */
.menu {
    background: #e9ecef;
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.menu a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.menu a:hover {
    color: #0d6efd;
}

/* Botão hamburguer */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    padding: 10px 15px;
}

/* ================= CONTEÚDO ================= */
.container {
    padding: 20px;
}

main {
    padding-top: 10px;
}

/* ================= LISTAGEM DE PRODUTOS ================= */
.produtos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.produto {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.produto img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
}

.produto-link {
    text-decoration: none;
    color: inherit;
}

.descricao {
    font-size: 14px;
    margin-bottom: 8px;
}

.preco {
    font-size: 18px;
    font-weight: bold;
    color: #0d6efd;
}

/* ================= DETALHE DO PRODUTO ================= */
.produto-detalhe {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Galeria */
.produto-galeria {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Imagem principal */
.imagem-principal {
    width: 420px;
    height: 420px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
}

/* Miniaturas */
.miniaturas {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.miniaturas img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: 0.3s;
}

.miniaturas img:hover {
    transform: scale(1.05);
}

.miniaturas img.ativa {
    border-color: #0d6efd;
}

/* Informações */
.produto-info h1 {
    margin-top: 0;
}

.produto-info .categoria {
    color: #666;
    font-size: 14px;
}

.detalhes {
    margin-top: 15px;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

/* ================= RESPONSIVO ================= */
@media (max-width: 768px) {

    .menu-toggle {
        display: block;
        margin: 0 auto;
    }

    .menu {
        display: none;
        flex-direction: column;
        background: #e9ecef;
    }

    .menu a {
        padding: 12px;
        border-top: 1px solid #ddd;
        text-align: center;
    }

    .menu.active {
        display: flex;
    }

    .produto-detalhe {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .imagem-principal {
        width: 100%;
        height: 320px;
    }

    .miniaturas img {
        width: 70px;
        height: 70px;
    }
}

.texto-pre {
    white-space: pre-line;
}

.pedido-sucesso {
    max-width: 500px;
    margin: 60px auto;
    background: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.numero-pedido {
    font-size: 18px;
    margin: 20px 0;
}

.btn-voltar {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 20px;
    background: #0d6efd;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}

/* TABELA DO CARRINHO */
.tabela-carrinho {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.tabela-carrinho th,
.tabela-carrinho td {
    padding: 12px 15px;
    text-align: left;
}

.tabela-carrinho thead {
    background: #f1f3f5;
}

.tabela-carrinho th {
    font-size: 14px;
    color: #333;
}

.tabela-carrinho tbody tr {
    border-bottom: 1px solid #eee;
}

.tabela-carrinho tbody tr:last-child {
    border-bottom: none;
}

.tabela-carrinho td {
    font-size: 14px;
}

.tabela-carrinho tfoot td {
    padding-top: 15px;
    font-size: 16px;
}

.botoes-carrinho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.btn-finalizar {
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.btn-continuar {
    display: inline-block;
    padding: 12px 26px;
    background-color: #1f8f3e;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-continuar:hover {
    background-color: #166d2f;
    transform: translateY(-1px);
}

.btn-finalizar {
    background: #0d6efd;
    color: #fff;
    border: none;
    cursor: pointer;
}

.btn-finalizar:hover {
    background: #0b5ed7;
}

.topo-empresa {
    background-color: #1f1f1f;   /* mesmo fundo do nome */
    color: #ffffff;
    padding: 18px 10px 12px;
    text-align: center;
}

.topo-empresa h1 {
    margin: 0;
    font-size: 28px;
    font-weight: bold;
}

.topo-empresa .endereco {
    margin-top: 6px;
    font-size: 13px;
    color: #b5b5b5;  /* cinza elegante */
    letter-spacing: 0.3px;
}

.btn-excluir {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}
.btn-excluir:hover {
    color: red;
}

/* ============================= */
/* FORMULÁRIO DO CLIENTE        */
/* ============================= */

.form-cliente {
    max-width: 650px;          /* 🔴 limita o tamanho */
    margin-top: 30px;
    padding: 18px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Grid principal */
.form-cliente .linha {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;       /* 🔴 menos espaçamento */
}

/* Duas colunas */
.form-cliente .linha.dupla {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;                 /* 🔴 mais compacto */
}

/* Labels */
.form-cliente label {
    font-size: 0.75rem;        /* 🔴 menor */
    color: #666;
    margin-bottom: 3px;
}

/* Inputs */
.form-cliente input,
.form-cliente select {
    padding: 6px 8px;          /* 🔴 mais baixo */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;         /* 🔴 fonte menor */
    height: 34px;              /* 🔴 padrão visual ERP */
    width: 100%;
    box-sizing: border-box;
}

.link-carrinho {
    position: relative;
    font-weight: bold;
    text-decoration: none;
    color: #000;
}

.badge-carrinho {
    position: absolute;
    top: -6px;
    right: -12px;
    background: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}
