/* =========================================
   PALETA DE CORES GLOBAL
   ========================================= */
:root {
    --cor-primaria: #28a745;
    --cor-secundaria: #1e7e34;
    --cor-fundo: #f4f6f9;
    --cor-texto: #333333;
    --cor-footer: #111111;
    --cor-footer-legal: #0a0a0a;
}

/* =========================================
   RESET BÁSICO
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--cor-footer-legal) !important;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;

    display: flex;
    flex-direction: column;

    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--cor-footer-legal) !important;
    color: var(--cor-texto);

    overflow-x: hidden;
}

/* =========================================
   CABEÇALHO (HEADER)
   ========================================= */
.main-header {
    background-color: #111111;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 4px solid var(--cor-primaria) !important;
    outline: none !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

/* Força a remoção total de bordas no campo de busca do header */
.main-header form,
.main-header input,
.main-header button {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* =========================================
   UTILITÁRIOS GERAIS
   ========================================= */
.main-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    background-color: var(--cor-fundo);
}

main {
    flex: 1 0 auto;
    background-color: var(--cor-fundo);
}

/* =========================================
   PADRÃO DE PÁGINAS INTERNAS
   ========================================= */
.pagina-padrao,
.pagina-compras,
.pagina-favoritos,
.pagina-notificacoes,
.pagina-historico,
.pagina-ajuda,
.pagina-institucional,
.pagina-vendedor,
.pagina-pagamento-seguranca,
.cart-page {
    background-color: var(--cor-fundo);
}

/* =========================================
   BOTÕES PADRÃO
   ========================================= */
.btn-verde {
    background-color: var(--cor-primaria);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.btn-verde:hover {
    background-color: #218838;
    color: #ffffff;
}

.btn-continuar-comprando {
    color: var(--cor-primaria);
    border: 1px solid var(--cor-primaria);
    background-color: transparent;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-continuar-comprando:hover {
    background-color: var(--cor-primaria);
    color: #ffffff;
}

.btn-voltar {
    border-radius: 6px;
}

/* =========================================
   RODAPÉ (FOOTER)
   ========================================= */
.site-footer {
    background-color: var(--cor-footer) !important;
    color: #ffffff;
    border-top: 4px solid var(--cor-primaria);
    padding: 50px 5% 0;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    width: 100%;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--cor-primaria);
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s, padding-left 0.2s;
}

.footer-col ul li a:hover {
    color: var(--cor-primaria);
    padding-left: 5px;
}

.footer-icon-text {
    color: #cccccc;
}

.footer-legal,
.footer-bottom,
.footer-copy,
.footer-copyright {
    background-color: var(--cor-footer-legal) !important;
    color: #888888;
    margin: 0 !important;
    padding-bottom: 18px !important;
    flex-shrink: 0;
}

.site-footer p:last-child,
.footer-legal p:last-child,
.footer-bottom p:last-child,
.footer-copy p:last-child,
.footer-copyright p:last-child {
    margin-bottom: 0 !important;
}

/* Remove qualquer espaço claro depois do rodapé */
body::after {
    content: none !important;
    display: none !important;
}

/* =========================================
   GRADE DE PRODUTOS E CARDS
   ========================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 40px 5%;
}

.product-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    text-decoration: none;
    color: var(--cor-texto);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s, transform 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.transition-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.transition-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

/* =========================================
   CARROSSEL E CATEGORIAS
   ========================================= */
.banner-img {
    height: 350px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .banner-img {
        height: 180px;
    }
}

/* =========================================
   DETALHES DO PRODUTO E PAGAMENTO
   ========================================= */
.product-container {
    display: flex;
    gap: 40px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.payment-container {
    max-width: 600px;
    margin: 40px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.pix-qr-box {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
}

.copy-paste-area {
    width: 100%;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px dashed #cccccc;
    font-family: monospace;
    font-size: 0.85rem;
    resize: none;
    margin-top: 10px;
}

/* =========================================
   REMOÇÃO DO CONTORNO AZUL DE FOCO (BOOTSTRAP)
   ========================================= */
*:focus,
input:focus,
textarea:focus,
select:focus,
button:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn-close:focus,
.page-link:focus {
    outline: 0 !important;
    box-shadow: none !important;
}

/* Mantém a borda verde nos campos quando estiverem focados */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--cor-primaria) !important;
}

/* =========================================
   CORREÇÃO DEFINITIVA DA FAIXA BRANCA DO RODAPÉ
   ========================================= */

html {
    min-height: 100%;
    background: #0a0a0a !important;
}

body {
    min-height: 100vh;
    background: #0a0a0a !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Área principal da loja */
.main-wrapper {
    flex: 1 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f4f6f9 !important;
}

/* Quando a página tiver pouco conteúdo, empurra o rodapé para baixo */
.main-wrapper > main,
.main-wrapper > .container,
.main-wrapper > .pagina-padrao,
.main-wrapper > .home-page,
.main-wrapper > .product-grid,
main {
    flex: 1 0 auto !important;
}

/* Rodapé preto ocupando o final */
.site-footer,
.footer-legal,
.footer-bottom,
.footer-copy,
.footer-copyright,
footer {
    background: #0a0a0a !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

/* Garante que não tenha margem interna criando faixa */
.site-footer {
    margin-top: auto !important;
    padding-bottom: 0 !important;
}

.footer-legal,
.footer-bottom,
.footer-copy,
.footer-copyright {
    padding-bottom: 25px !important;
}

/* Se existir algum container depois do footer, força preto também */
body > div:last-child,
body > section:last-child {
    background: #0a0a0a !important;
}

/* Remove margem padrão de último elemento */
body > *:last-child {
    margin-bottom: 0 !important;
}