﻿/***********************************************************
  CSS GLOBAL - AGÊNCIA KCMS (VERSÃO DARK MODE)
***********************************************************/

* {
    -webkit-box-sizing: border-box !important;
    -moz-box-sizing: border-box !important;
    box-sizing: border-box !important;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    color: #ffffff;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    text-align: left;
    line-height: 150%;
    background-color: #050505;
    color: #d1d1d1;
}

    /* ==================================================================
   REGRAS INTELIGENTES PARA OVERRIDE DA MASTER PAGE
================================================================== */
    body:has(.contato-bg) .rodape,
    body:has(.login-bg) .rodape,
    body:has(.cadastro-bg) .rodape,
    body:has(.editar-bg) .rodape {
        display: none !important;
    }

.conteudo:has(.contato-bg),
.conteudo:has(.login-bg),
.conteudo:has(.cadastro-bg),
.conteudo:has(.editar-bg) {
    max-width: 100% !important;
    padding-top: 81px !important;
    min-height: 0 !important;
    margin: 0 !important;
}

body:has(.contato-bg),
body:has(.login-bg) {
    overflow: hidden !important;
}

/* AJUSTE DO CARROSSEL (FLEXSLIDER) */
.flexslider {
    background: transparent !important;
    border: none !important;
    margin: 0 0 20px 0 !important;
    box-shadow: none !important;
}

    .flexslider .slides img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 8px;
    }

a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

    a:hover {
        opacity: 0.8;
    }

hr {
    height: 1px;
    border-width: 0;
    border-top: 1px solid #222222;
    width: 100%;
    display: inline-block;
}

/**************************************** SISTEMA DE GRIDS (COLUNAS)
*****************************************/
.row {
    display: flex;
    display: -webkit-flex;
    gap: 15px;
    flex-direction: row;
    align-items: initial;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
}

.col-12 {
    width: 100%;
}

.col-11 {
    width: 91.66666666%;
}

.col-10 {
    width: 83.3333333%;
}

.col-9 {
    width: 75%;
}

.col-8 {
    width: 66.66666667%;
}

.col-7 {
    width: 58.33333333%;
}

.col-6 {
    width: 50%;
}

.col-5 {
    width: 41.66666667%;
}

.col-4 {
    width: 33.33333333%;
}

.col-3 {
    width: 25%;
}

.col-2 {
    width: 16.66666667%;
}

.col-1 {
    width: 8.33333333%;
}

[class^="col-"] {
    margin-bottom: 5px;
    padding: 0;
}

/**************************************** BOX, BORDAS E ESPAÇAMENTOS
*****************************************/
.box {
    height: 100%;
    position: relative;
}

.box-shadow {
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.padding-14 {
    padding: 14px;
}

.border {
    border: 1px solid #222222;
    border-radius: 8px;
}

.text-align-right {
    text-align: right;
}

/**************************************************************
   CONTROLES DE FORMULÁRIOS GERAIS
***************************************************************/
input[type="text"], input[type="password"], input[type="email"], textarea, select, input[type="number"] {
    border: 1px solid #333333;
    border-radius: 8px;
    background: #121212;
    color: #ffffff;
    font-size: 15px;
    padding: 12px 16px;
    width: 100%;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
}

/**************************************************************
   BOTÕES ESTILO PÍLULA COM ZOOM
***************************************************************/
input[type="submit"], input[type="button"], button, .botao {
    margin-top: 20px;
    border: 1px solid #444444;
    border-radius: 30px;
    color: #ffffff !important;
    background-color: #1a1a1a !important;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 25px;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

    input[type="submit"]:hover, .botao:hover {
        background-color: #ffffff !important;
        color: #000000 !important;
        transform: scale(1.05);
    }

/**************************************************************
   LAYOUT DO CATÁLOGO
**************************************************************/
.produto-layout-livre {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 60px;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #1a1a1a;
}

.produto-imagem-redonda {
    width: 40%;
    min-width: 280px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.img-efeito-zoom {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.produto-layout-livre:hover .img-efeito-zoom {
    transform: scale(1.10);
}

/**************************************************************
   PÁGINA DE CONTATO, LOGIN E CADASTRO - GLASSMORPHISM
**************************************************************/
.contato-bg, .login-bg, .cadastro-bg {
    width: 100%;
    min-height: calc(100vh - 81px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Fundo específico com foto para o contato e login */
.contato-bg, .login-bg {
    background-image: url('../Images/Motocross.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.glass-card {
    background: rgba(15, 15, 15, 0.65) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    padding: 45px 40px !important;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6) !important;
}

/* O cartão de cadastro ganha uma largura maior */
.glass-card-cadastro {
    max-width: 650px !important;
    text-align: left !important;
}

.glass-card h2 {
    color: #ffffff !important;
    margin-bottom: 35px !important;
    font-size: 28px !important;
    font-weight: bold !important;
    letter-spacing: 0.5px;
    text-align: center;
}

.glass-card-cadastro h2 {
    text-align: left;
}

.glass-card input,
.glass-card textarea,
.glass-card select {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 30px !important;
    color: #ffffff !important;
    padding: 14px 20px !important;
    margin-bottom: 15px !important;
    width: 100%;
    font-size: 14px !important;
}

.glass-card textarea {
    border-radius: 18px !important;
}

.glass-card select {
    cursor: pointer;
    background-color: #0c0c0c !important;
}

.label-formulario {
    margin-top: 5px;
    margin-bottom: 8px;
    display: block;
    color: #a0a0a0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-upload-moderno {
    padding: 10px !important;
    border-radius: 10px !important;
}

.glass-card input[type="submit"] {
    margin-top: 15px !important;
    background: #ffffff !important;
    color: #000000 !important;
    width: 100% !important;
    border: none !important;
    font-weight: bold !important;
    font-size: 15px !important;
    letter-spacing: 1px;
}

    .glass-card input[type="submit"]:hover {
        background-color: #e0e0e0 !important;
        transform: scale(1.03) !important;
    }


/**************************************************************
   === NOVO LAYOUT: PÁGINA DE EDIÇÃO COM DUAS COLUNAS LADO A LADO ===
**************************************************************/
.editar-bg {
    width: 100%;
    min-height: calc(100vh - 81px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-color: #050505; /* Troque pela URL da imagem se quiser foto de fundo */
}

/* O container principal que força as metades a ficarem lado a lado */
.layout-editar-duplo {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
    align-items: stretch;
}

/* Configuração para cada um dos dois cartões de vidro */
.panel-metade {
    flex: 1;
    margin: 0 !important;
    max-width: none !important;
    text-align: left !important;
}

/* Painel específico da imagem */
.panel-imagem-direita {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Quadro com fundo sutil para segurar a foto */
.imagem-container-direita {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    width: 100%;
    text-align: center;
}

    .imagem-container-direita img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        object-fit: cover;
    }

/* Se a tela do usuário for pequena (celular), as caixas empilham uma embaixo da outra */
@media only screen and (max-width: 800px) {
    .layout-editar-duplo {
        flex-direction: column;
    }
}


/**************************************************************
   PAINEL ADMINISTRATIVO (EXIBIR PRODUTOS)
**************************************************************/
.painel-admin {
    padding: 20px;
}

.busca-container-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 600px;
    margin-bottom: 25px;
}

.input-busca-moderno {
    flex: 1;
    border: 1px solid #333333 !important;
    border-radius: 30px !important;
    background: #121212 !important;
    color: #ffffff !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
    outline: none;
    margin: 0 !important;
}

.btn-admin-linha {
    margin-top: 0 !important;
    border-radius: 30px !important;
    padding: 10px 25px !important;
    font-size: 14px !important;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buscar-moderno {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: none !important;
}

    .btn-buscar-moderno:hover {
        background-color: #e0e0e0 !important;
        transform: scale(1.05);
    }

.btn-cancelar-moderno {
    background-color: rgba(255, 77, 79, 0.05) !important;
    color: #ff4d4f !important;
    border: 1px solid #ff4d4f !important;
}

    .btn-cancelar-moderno:hover {
        background-color: #ff4d4f !important;
        color: #ffffff !important;
        transform: scale(1.05);
        box-shadow: 0 0 12px rgba(255, 77, 79, 0.5);
    }

.tabela-dark {
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 10px;
}

.cabecalho-tabela th {
    background-color: #0f0f0f !important;
    color: #ffffff !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    padding: 15px 12px !important;
    border-bottom: 2px solid #222222 !important;
    text-align: center !important;
}

.linha-tabela td, .linha-alternada td {
    background-color: #121212;
    color: #d1d1d1;
    padding: 14px 12px !important;
    border-top: 1px solid #1c1c1c;
    border-bottom: 1px solid #1c1c1c;
    transition: all 0.2s ease;
    text-align: center !important;
}

.linha-alternada td {
    background-color: #161616;
}

    .linha-tabela td a, .linha-alternada td a {
        color: #d1d1d1 !important;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 11px;
        background: rgba(255, 255, 255, 0.05) !important;
        padding: 6px 14px;
        border-radius: 15px;
        border: 1px solid #333333 !important;
        transition: all 0.2s ease;
        display: inline-block;
    }

        .linha-tabela td a:hover, .linha-alternada td a:hover {
            background: #ffffff !important;
            color: #000000 !important;
            border-color: #ffffff !important;
            transform: translateY(-1px);
        }

    .linha-tabela td:first-child, .linha-alternada td:first-child {
        border-radius: 8px 0 0 8px;
    }

    .linha-tabela td:last-child, .linha-alternada td:last-child {
        border-radius: 0 8px 8px 0;
    }

.tabela-dark tr:hover td {
    background-color: #1f1f1f !important;
    color: #ffffff !important;
}

.btn-inserir-novo {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid #333333 !important;
    color: #d1d1d1 !important;
    border-radius: 30px !important;
}

    .btn-inserir-novo:hover {
        background-color: #ffffff !important;
        color: #000000 !important;
        border-color: #ffffff !important;
        transform: scale(1.05);
    }

/* ==========================================
   ALINHAMENTO DO LOGO E TEXTO (CABEÇALHO) WITH HOVER EFFECT
========================================== */

/* Container que segura a imagem e o texto juntos */
.logo-container {
    display: flex;
    align-items: center; /* Alinha no meio verticalmente */
    gap: 15px; /* Espaço entre a imagem e a palavra PRODUTOS */
    float: left; /* Mantém o logo à esquerda */
    cursor: pointer; /* Transforma o mouse na mãozinha de clique */
}

/* Trava o tamanho da imagem e prepara a animação */
.logo-img {
    width: 80px !important;
    height: 80px !important;
    object-fit: contain;
    transition: all 0.3s ease-in-out; /* MÁGICA: Deixa o efeito de zoom e brilho suave */
}

/* Estilo da palavra PRODUTOS e preparação da animação */
.logo-texto {
    font-size: 20px;
    font-weight: bold;
    color: #FFFFFF;
    letter-spacing: 1px;
    transition: all 0.3s ease-in-out; /* Deixa a mudança de cor do texto suave também */
}

/* ==========================================
   EFEITO HOVER (PASSAR O MOUSE)
========================================== */

/* Quando passar o mouse no container, a imagem ganha zoom e brilho */
.logo-container:hover .logo-img {
    transform: scale(1.08); /* Dá um zoom de 8% na imagem */
    filter: brightness(1.4); /* Aumenta o brilho da imagem em 40% */
}

/* Quando passar o mouse no container, o texto também ganha um leve destaque */
.logo-container:hover .logo-texto {
    color: #3b82f6; /* Se quiser que o texto mude para um azul destaque no hover (opcional) */
    filter: brightness(1.2);
}






/**************************************************************
   RESPONSIVIDADE (CELULARES E TABLETS) - WEB CROSS COMPLETO
**************************************************************/
@media only screen and (max-width: 768px) {
    /* 1. Força todas as colunas a ocuparem 100% da tela */
    [class^="col-"] {
        width: 100% !important;
        margin-bottom: 15px;
    }

    /* 2. Trava Global de Imagens */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 3. CABEÇALHO DINÂMICO: Estica para caber os botões do Admin */
    .barra-fixa {
        position: relative !important;
        height: auto !important;
        min-height: auto !important; /* Essencial para a barra crescer */
        background-color: #050505 !important;
        padding-bottom: 20px !important; /* Empurra o fundo preto para baixo da última linha de botões */
        overflow: visible !important;
        z-index: 100 !important;
    }

    .cabecalho.content-wrap {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        height: auto !important;
        min-height: auto !important;
        padding: 20px 10px 0 10px !important;
    }

    .logo-container {
        position: relative !important;
        float: none !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 20px !important;
        top: 0 !important;
        left: 0 !important;
    }

    .barra-menu {
        position: relative !important;
        display: flex !important;
        flex-wrap: wrap !important; /* Permite botões irem para a linha de baixo */
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        height: auto !important; /* Força o menu a assumir a altura das 2 linhas */
        gap: 10px !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }

        /* Transforma os links em botões fáceis de clicar no celular */
        .barra-menu a {
            padding: 10px 16px !important;
            background-color: rgba(255, 255, 255, 0.1) !important;
            border: 1px solid rgba(255, 255, 255, 0.2) !important;
            border-radius: 25px !important;
            font-size: 12px !important;
            margin: 0 !important;
            display: inline-block !important;
        }

    /* 4. CONTEÚDO: Afasta do menu para não sobrepor nas telas normais */
    .conteudo {
        position: relative !important;
        padding-top: 25px !important; /* Distância segura entre o fim do cabeçalho e as fotos */
        clear: both !important;
    }

        /* MATADOR DE BURACO NEGRO: Zera os espaços apenas nas telas com foto (Login/Contato) */
        .conteudo:has(.contato-bg),
        .conteudo:has(.login-bg),
        .conteudo:has(.cadastro-bg),
        .conteudo:has(.editar-bg) {
            padding-top: 0 !important;
            margin-top: 0 !important;
        }

    /* 5. Cartões de Vidro (Login, Contato) */
    .contato-bg, .login-bg, .cadastro-bg, .editar-bg {
        height: auto !important;
        min-height: calc(100vh - 160px) !important; /* Desconta o tamanho do menu para caber certinho */
        padding: 20px 15px !important;
        background-size: cover !important;
        /* A MÁGICA AQUI: Puxa a imagem para mostrar a parte de cima! */
        background-position: top center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .glass-card {
        width: 100% !important;
        max-width: 90% !important;
        /* Reduz o respiro interno do cartão para ele ficar mais baixo */
        padding: 25px 20px 30px 20px !important;
        margin: 0 auto !important;
        height: auto !important; /* Permite que o cartão mostre todo o conteúdo */
        background: rgba(15, 15, 15, 0.85) !important;
    }

        .glass-card h2 {
            font-size: 22px !important;
            margin-bottom: 20px !important;
            text-align: center !important;
        }

        /* Diminui a altura dos inputs normais e o espaço entre eles */
        .glass-card input[type="text"],
        .glass-card input[type="email"],
        .glass-card input[type="password"] {
            padding: 10px 15px !important;
            margin-bottom: 12px !important;
            font-size: 13px !important;
        }

        /* O SEGREDO: Diminui bastante a caixa de mensagem (textarea) no celular */
        .glass-card textarea {
            height: 70px !important; /* Deixa a caixa bem mais baixa */
            padding: 10px 15px !important;
            margin-bottom: 15px !important;
            font-size: 13px !important;
        }

        /* Garante que o botão ENVIAR apareça na base do cartão */
        .glass-card input[type="submit"] {
            display: block !important;
            width: 100% !important;
            padding: 12px !important;
            margin-top: 5px !important;
            font-size: 14px !important;
        }

    /* 6. Catálogo de Produtos */
    .produto-layout-livre {
        flex-direction: column !important;
        text-align: center !important;
        gap: 20px !important;
        padding-bottom: 20px !important;
    }

    .produto-imagem-redonda {
        width: 100% !important;
        min-width: unset !important;
    }

    /* 7. PAINEL ADMINISTRATIVO E TABELAS - BOTÕES LADO A LADO */
    .busca-container-horizontal {
        display: flex !important;
        flex-direction: row !important; /* Define a direção em linha */
        flex-wrap: wrap !important; /* Permite que os itens "quebrem" para a linha de baixo */
        align-items: center !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .input-busca-moderno {
        -webkit-appearance: none !important;
        width: 100% !important;
        flex: 1 1 100% !important; /* Força o input a ocupar 100% da primeira linha */
        margin-bottom: 5px !important;
        border-radius: 25px !important;
    }

    /* Faz os dois botões dividirem o espaço perfeitamente embaixo */
    .btn-admin-linha {
        -webkit-appearance: none !important;
        appearance: none !important;
        flex: 1 !important; /* Faz os botões crescerem igualmente (50% / 50%) */
        width: auto !important; /* Remove aquele 100% que deixava eles gigantes */
        text-align: center !important;
        margin-bottom: 15px !important;
        padding: 12px 10px !important;
        border-radius: 25px !important;
        font-size: 12px !important; /* Texto um pouquinho menor para não espremer */
        letter-spacing: 0.5px !important;
    }

    /* Tira o scroll do painel inteiro para não arrastar a busca junto */
    .painel-admin {
        overflow-x: visible !important;
        padding: 10px 0 !important;
        width: 100% !important;
    }

    /* O SEGREDO: Coloca o scroll EXCLUSIVAMENTE na tabela */
    .tabela-dark {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        border-radius: 8px !important;
    }

    /* =======================================================
       8. TELA DE EDIÇÃO: JUNTAR CAIXAS E MOVER O BOTÃO (MAGIA FLEXBOX)
    ======================================================= */

    /* Transforma o container que segura as duas metades na ÚNICA caixa de vidro */
    .layout-editar-duplo {
        display: flex !important;
        flex-direction: column !important;
        background: rgba(15, 15, 15, 0.85) !important;
        border-radius: 15px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 25px 20px 30px 20px !important;
        width: 100% !important;
        max-width: 90% !important;
        margin: 0 auto !important;
    }

        /* "Derrete" as caixas internas para fundir o conteúdo em uma lista só */
        .layout-editar-duplo .panel-metade {
            display: contents !important;
        }

        /* Remove o fundo duplicado caso exista */
        .layout-editar-duplo .glass-card {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            padding: 0 !important;
        }

    /* O SEGREDO DA ORDEM: Força a imagem a ficar ABAIXO da "Situação" */
    .panel-imagem-direita > * {
        order: 10 !important;
    }

    /* Manda o botão EDITAR para o absoluto FINAL da caixa */
    .layout-editar-duplo input[type="submit"],
    .layout-editar-duplo button,
    .layout-editar-duplo .botao {
        order: 99 !important;
        width: 100% !important;
        margin-top: 25px !important;
        display: block !important;
    }

    /* Tira o fundo cinza em volta da imagem para ela ficar limpa na caixa nova */
    .imagem-container-direita {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin-top: 15px !important;
        margin-bottom: 15px !important;
    }
}
}
