/* 🎨 Estilo geral do corpo da página */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 🧭 Barra de navegação superior */
.navbar {
    background-color: #212529;
}

.navbar-brand,
.nav-link {
    color: #ffffff !important;
}

.nav-link:hover {
    color: #0d6efd !important;
}

/* 🧾 Títulos */
h1, h2, h3, h4 {
    color: #212529;
    font-weight: 600;
}

/* 🃏 Cartões de produto */
.card {
    box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease;
}
.card:hover {
    transform: scale(1.02);
}
.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.card-title a {
    text-decoration: none;
    color: #000;
}
.card-title a:hover {
    color: #0d6efd;
}
.card-footer {
    background-color: #fff;
    border-top: none;
}

/* 🦶 Rodapé */
footer {
    background-color: #212529;
    color: #ccc;
    padding: 30px 0;
    font-size: 0.9rem;
}
footer h5 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1rem;
}
footer p, footer li, footer a, footer small {
    font-size: 0.85rem;
    line-height: 1.4;
}
footer a {
    color: #ccc;
    text-decoration: none;
}
footer a:hover {
    color: #0d6efd;
    text-decoration: underline;
}
footer .text-muted {
    color: #aaa !important;
}
footer .list-unstyled li {
    margin-bottom: 8px;
}

/* 🔘 Botões */
.btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}
.btn-primary:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}
.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}
.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

/* 🧩 Categorias (home) */
.faixa-topo {
    background-color: #28a745; /* verde */
    height: 30px;     /* altura menor */
    width: 100%;
    margin: 10px 0;   /* mesmo espaço em cima e embaixo */
}

.faixa-rodape {
    background-color: #ff6600; /* laranja */
    height: 30px;     /* altura menor */
    width: 100%;
    margin: 10px 0;   /* mesmo espaço em cima e embaixo */
}

.categorias-container {
    margin: 20px 0;   /* antes estava 40px, agora reduzido */
}

.categoria-bloco {
    margin-bottom: 30px;
}

.categoria-botao {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 18px;
    color: #fff;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    overflow: hidden; /* garante que a imagem não estoure */
    background-size: cover;
    background-position: center;
}

/* 🔍 Overlay para legibilidade */
.categoria-botao .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.categoria-botao .overlay span {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

/* ✨ Hover Effect Moderno */
.categoria-botao:hover {
    transform: scale(1.05); /* leve zoom no card */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.categoria-botao:hover .overlay {
    background: rgba(0, 0, 0, 0.65); /* escurece mais no hover */
}

/* 🧭 Estilo de link ativo no menu */
.nav-link.active {
    font-weight: bold;
    border-bottom: 2px solid #007bff;
}

/* 🔧 Logo alinhada */
.navbar-brand img {
    height: 60px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    padding-top: 4px;
    padding-bottom: 4px;
    margin-left: 80px;
}
.navbar-brand {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

/* ✏️ Texto de descrição */
.texto-descricao,
.descricao-produto {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.6;
}
@media (max-width: 768px) {
    .texto-descricao, .descricao-produto { font-size: 11px; }
}
@media (max-width: 480px) {
    .texto-descricao, .descricao-produto { font-size: 10px; }
}

/* ✅ Admin personalizado */
.form-row input,
.submit-row input[type="submit"] {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    margin-bottom: 20px;
}
.submit-row {
    margin: 0;
    padding: 0;
}

/* 📊 Tabelas de monitoramento */
th.column-status_colorido, td.field-status_colorido,
th.column-status_preco, td.field-status_preco {
    width: 100px;
}
th.column-produto, td.field-produto {
    width: 200px;
}
th.column-link_clicavel, td.field-link_clicavel {
    width: 250px;
}
th.column-preco_fornecedor, td.field-preco_fornecedor,
th.column-imposto_formatado, td.field-imposto_formatado,
th.column-preco_site_formatado, td.field-preco_site_formatado,
th.column-impacto_formatado, td.field-impacto_formatado {
    width: 120px;
    text-align: center;
}

/* Status colorido */
.status-colorido {
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
    padding: 4px 8px;
    display: inline-block;
    min-width: 120px;
}
.status-colorido.disponivel {
    background-color: #b6f0b6;
    color: #0a5c0a;
}
.status-colorido.fora-estoque {
    background-color: #f8d7da;
    color: #842029;
}
.status-colorido.na {
    background-color: #ccc;
    color: white;
}

/* 🔥 Hover moderno para cards de produtos */
.card-link .card {
    transition: all 0.2s ease-in-out;
}

.card-link:hover .card {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-4px) scale(1.02);
}

/* 🎯 Efeito clique (pressed) */
.card-link:active .card {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    transition: all 0.1s ease-in-out;
}

/* 🏷️ Títulos das páginas de produto */
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 30px;    /* espaçamento acima */
    margin-bottom: 20px;  /* espaçamento abaixo */
    text-align: center;
}

/* 📦 Garante 4 produtos por linha */
.col-sm-6.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

/* 🃏 Card padronizado */
.card {
    height: auto;
    min-height: 260px; /* mais compacto sem descrição */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 🖼️ Imagens proporcionais */
.card-img-top {
    height: 180px;
    object-fit: contain;
    padding: 10px;
}

/* 🔠 Nome do produto */
.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 40px; /* mantém simetria */
    text-align: center;
}

/* 💰 Preço */
.card-text.text-success {
    font-size: 1.1rem; /* levemente maior */
    font-weight: bold;
    color: #198754 !important; /* verde bootstrap */
    text-align: center;
    margin-top: 6px;
}

/* 📂 Subcategoria */
.card-subcategoria {
    font-size: 0.8rem; /* menor, menos destaque */
    color: #6c757d;
    text-align: center;
    margin-top: 4px;
}

/* ===== Página Detalhe Produto ===== */
.produto-nome {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3em;
    margin-bottom: 0.5rem;
}

.produto-preco {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007b00;
    margin-bottom: 1rem;
}

.produto-descricao {
    font-size: 0.85rem;     /* menor que antes */
    line-height: 1.5em;
    color: #444;
    margin-bottom: 1.5rem;
    text-align: justify;    /* alinhado justificado */
}

.produto-categoria,
.produto-subcategoria {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.produto-specs-title {
    font-size: 1.0rem;      /* menor que estava */
    font-weight: 600;
    margin: 1rem 0 0.5rem;
}

.produto-specs-list {
    font-size: 0.9rem;      /* menor que antes */
    line-height: 1.4em;
    color: #333;
}

/* ===== Miniaturas das imagens extras ===== */
.img-extra {
    width: 80px;            /* desktop */
    height: 80px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: transform 0.2s;
}

.img-extra:hover {
    transform: scale(1.05);
}

/* Versão mobile (telas menores que 576px) */
@media (max-width: 576px) {
    .img-extra {
        width: 60px;        /* menor no celular */
        height: 60px;
    }
}

/* 🔽 Navbar mais compacta */
.navbar {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
    min-height: 50px; /* garante altura menor */
}

.navbar-brand img {
    height: 32px; /* reduz logo proporcionalmente */
}

/* 🔽 Ajustes de espaçamentos da home */

/* Faixa verde e laranja mais finas */
.faixa-topo,
.faixa-rodape {
    height: 25px !important;   /* antes 40px */
}

/* Reduz espaço entre filtro e categorias */
.categorias-container {
    margin: 10px 0 !important;  /* antes 40px */
}

/* Reduz espaço entre cada bloco de categoria */
.categoria-bloco {
    margin-bottom: 10px !important; /* antes 30px */
}

/* Remove excesso de espaço acima da faixa verde e abaixo da faixa laranja */
.container.my-5 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.faixa-rodape {
    margin-bottom: 0 !important;
}
footer.limpo {
    margin-top: 0 !important;  /* remove espaço acima da barra laranja */
}

/* 🔧 Espaço no detalhe do produto antes do rodapé */
.detalhe-produto-footer {
    margin-top: 30px;
}

/* Espaço extra no detalhe do produto (antes do rodapé) */
.d-grid.gap-2.mt-4 {
    margin-bottom: 40px !important;  /* aumenta espaço entre os botões e o rodapé */
}


/* Botões na página de detalhe do produto */
.detalhe-produto .d-grid a.btn {
    width: auto !important;      /* não ocupar toda largura */
    display: inline-block !important;
    padding: 8px 20px !important; /* tamanho mais compacto */
    font-size: 1rem !important;
}

/* 🔘 Botões lado a lado e compactos */
.botoes-detalhe {
    display: flex;
    gap: 12px;
    justify-content: flex-start; /* pode mudar para center se quiser centralizar */
}

.botoes-detalhe .btn {
    width: auto !important;
    padding: 8px 20px !important;
    font-size: 1rem !important;
}

/* 🔧 Remove espaço gigante antes do rodapé */
.detalhe-produto-footer {
    margin-top: 20px;
    height: auto !important;
}

/* ===== Correções página de detalhe ===== */

/* Botões lado a lado */
.botoes-detalhe {
    display: flex !important;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.botoes-detalhe .btn {
    width: auto !important;   /* impede 100% */
    min-width: 160px;         /* só pra consistência */
    flex: 0 0 auto;
}


/* 2. Remover espaço extra do rodapé vazio */
.detalhe-produto-footer {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* 3. Especificações sempre alinhadas à esquerda */
.produto-specs-list li {
    text-align: left;
    margin-bottom: 6px; /* respiro entre linhas */
}

/* === Correção de espaçamentos na página de detalhe === */

/* Compactar lista de categoria/subcategoria */
.list-group-item {
    padding: 4px 8px;  /* bem menor */
    margin-bottom: 2px;
    border: none;      /* tira borda duplicada */
}

/* Reduzir espaço acima/título especificações */
.produto-specs-title {
    margin: 0.5rem 0;  /* menos espaço */
}

/* Ajustar espaçamento entre linhas da lista */
.produto-specs-list li {
    margin-bottom: 3px;
    line-height: 1.3em; /* menor altura */
}

/* ===== Ajustes finais página de detalhe ===== */

/* Espaçamento refinado */
.produto-descricao {
    margin-bottom: 1rem; /* estava 1.5rem, reduzi */
}

.produto-categoria,
.produto-subcategoria {
    margin-bottom: 0.25rem; /* menos espaço entre categoria e subcategoria */
}

.produto-specs-title {
    margin-top: 0.75rem; /* menor espaço antes do título "Technical Specifications" */
}

/* Padronização dos botões */
.botoes-detalhe {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
    justify-content: center;
}

.botoes-detalhe .btn {
    flex: 1 1 auto;
    max-width: 220px;   /* largura consistente, não ocupa 100% */
    padding: 10px 14px;
    font-size: 0.95rem;
}

/* Espaço entre botões e rodapé */
.detalhe-produto-footer {
    margin-bottom: 20px; /* reduz espaço sobrando */
}

/* Mais respiro abaixo dos botões */
.botoes-detalhe {
    margin-bottom: 2.5rem; /* garante espaço agradável antes do rodapé */
}
