/* ==========================================================================
   1. CONFIGURAÇÕES GERAIS E VARIÁVEIS
   ========================================================================== */

:root {
    --primary-color: #007bff;
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    --text-color: #333;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --error-color: #dc2626;
    --error-bg: #fee2e2;
    --success-color: #155724;
    --success-bg: #d4edda;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 80px 0;
}

h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    text-align: center;
    margin-bottom: 10px;
}

hr {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border: none;
    margin: 0 auto 40px auto;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   2. BARRA DE NAVEGAÇÃO (NAVBAR)
   ========================================================================== */

.navbar {
    background-color: var(--dark-color);
    padding: 20px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--white);
}

.btn-nav {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 5px;
}

.btn-nav:hover {
    background-color: #0056b3;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
}

/* ==========================================================================
   AJUSTE DA LOGO NA BARRA DE NAVEGAÇÃO
   ========================================================================== */

/* Garante que o link da logo se comporte como um contêiner flexível alinhado */
.logo {
    display: flex;
    align-items: center;
    gap: 10px; 
    text-decoration: none;
}

/* Controla diretamente a imagem inserida na logo */
.logo img {
    height: 45px;            
    width: auto;            
    max-width: 180px;        
    object-fit: contain;     
    display: block;         
}

/* ==========================================================================
   3. SEÇÃO HERO (VÍDEO DE DESTAQUE)
   ========================================================================== */

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    color: var(--white);
}

.video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: -1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 30px;
    padding: 0 20px;
    font-weight: 700;
}

.btn-cta {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 40px;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-cta:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* ==========================================================================
   4. SEÇÃO SOBRE A EMPRESA
   ========================================================================== */

.sobre-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.sobre-texto h2 {
    text-align: left;
}

.sobre-texto hr {
    margin: 0 0 25px 0;
}

.sobre-texto p {
    margin-bottom: 20px;
    color: #555;
}

.sobre-imagem img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   5. SEÇÃO VITRINE DE PRODUTOS (CARROSSEL NATIVO)
   ========================================================================== */

.produtos {
    background-color: var(--light-color);
}

.slide-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

/* Customização de Scrollbar para Webkit (Chrome/Safari/Edge) */
.slide-container::-webkit-scrollbar {
    height: 8px;
}

.slide-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.produto-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.produto-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
}

.produto-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.produto-card .preco {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.btn-produto {
    display: block;
    background-color: var(--dark-color);
    color: var(--white);
    padding: 10px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-produto:hover {
    background-color: var(--primary-color);
}

/* ==========================================================================
   6. SEÇÃO DE CONTATO DA HOME
   ========================================================================== */

.form-container {
    max-width: 600px;
}

.contato-form {
    background-color: var(--light-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.captcha-group {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.captcha-group input {
    max-width: 150px;
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #0056b3;
}

/* Mensagens do Sistema */
.success { 
    color: var(--success-color); 
    background: var(--success-bg); 
    padding: 15px; 
    margin-bottom: 20px; 
    border-radius: 4px; 
    font-weight: 500; 
    text-align: center;
}

.error { 
    color: var(--error-color); 
    background: var(--error-bg); 
    padding: 15px; 
    margin-bottom: 20px; 
    border-radius: 4px; 
    font-weight: 500; 
    text-align: center;
}

/* ==========================================================================
   7. RODAPÉ (FOOTER)
   ========================================================================== */

.footer {
    background-color: var(--dark-color);
    color: #888;
    padding: 30px 0;
    font-size: 0.9rem;
}

/* ==========================================================================
   8. EXTENSÃO: PÁGINA INTERNA DA LOJA
   ========================================================================== */

.page-margin {
    margin-top: 80px;
}

.search-form {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    border-radius: 25px;
    padding: 2px 15px;
    max-width: 450px;
    width: 100%;
}

.search-form input {
    background: none;
    border: none;
    color: var(--white);
    padding: 8px;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
}

.search-form button {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1rem;
}

.search-title {
    font-size: 1.8rem;
    text-align: left;
    margin-bottom: 30px;
}

.search-title span { 
    color: var(--primary-color); 
}

.loja-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.flex-card {
    flex: unset;
    width: 100%;
    min-height: 400px;
}

.card-info {
    text-align: left;
    margin-top: 10px;
}

.badge-fabricante {
    font-size: 0.75rem;
    text-transform: uppercase;
    background-color: #e9ecef;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: bold;
    color: #666;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
}

.no-results p { 
    margin-bottom: 20px; 
    font-size: 1.2rem; 
    color: #666; 
}

/* ==========================================================================
   9. PÁGINA DE DETALHES DO PRODUTO
   ========================================================================== */

.produto-detalhe-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    padding: 40px 0;
}

.produto-detalhe-imagem img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.marca-info { 
    font-size: 0.9rem; 
    color: #777; 
}

.produto-detalhe-info h1 { 
    font-size: 2.5rem; 
    margin: 10px 0 15px 0; 
    color: var(--dark-color); 
    line-height: 1.2;
}

.detalhe-preco { 
    font-size: 2.2rem; 
    font-weight: bold; 
    color: var(--primary-color); 
    margin-bottom: 25px; 
}

.detalhe-descricao { 
    margin-bottom: 35px; 
    border-top: 1px solid #eee; 
    padding-top: 20px; 
}

.detalhe-descricao h3 { 
    margin-bottom: 10px; 
    font-size: 1.2rem; 
}

.detalhe-descricao p { 
    color: #555; 
    text-align: justify; 
}

.produto-botoes-acao {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-comprar, 
.btn-whatsapp {
    display: block;
    text-align: center;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: filter 0.2s;
}

.btn-comprar { 
    background-color: #28a745; 
    color: var(--white); 
}

.btn-whatsapp { 
    background-color: #25d366; 
    color: var(--white); 
}

.btn-comprar:hover, 
.btn-whatsapp:hover { 
    filter: brightness(0.9); 
}

/* ==========================================================================
   10. EXTENSÃO: PAINEL ADMINISTRATIVO (CADASTRO)
   ========================================================================== */

.admin-padding {
    padding-top: 40px;
    padding-bottom: 60px;
}

.admin-box {
    background-color: var(--white);
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.table-margin {
    margin-top: 40px;
}

.admin-box h2 {
    text-align: left;
    font-size: 1.8rem;
}

.admin-box hr {
    margin: 0 0 25px 0;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-form .form-group input,
.admin-form .form-group textarea {
    border: 1px solid #cbd5e1;
    background-color: #fff;
}

.admin-form-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-salvar {
    max-width: 250px;
    margin-top: 10px;
}

.btn-cancelar {
    display: inline-block;
    padding: 14px 25px;
    background-color: #6c757d;
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.btn-cancelar:hover { 
    background-color: #5a6268; 
}

.btn-logout {
    background-color: #dc3545;
    color: var(--white) !important;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.btn-logout:hover { 
    background-color: #bd2130; 
}

/* Tabela de Dados Interna */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    text-align: left;
}

.admin-table th, 
.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
}

.table-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.table-price {
    font-weight: bold;
    color: var(--dark-color);
}

.table-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.edit-btn { 
    background-color: #fef3c7; 
    color: #d97706; 
}

.edit-btn:hover { 
    background-color: #fde68a; 
}

.delete-btn { 
    background-color: #fee2e2; 
    color: var(--error-color); 
}

.delete-btn:hover { 
    background-color: #fecaca; 
}

/* ==========================================================================
   11. EXTENSÃO: TELA DE LOGIN ADMINISTRATIVO
   ========================================================================== */

.login-page-body {
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background-color: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    color: var(--dark-color);
    font-size: 1.8rem;
    display: block;
    margin-bottom: 5px;
}

.login-header p {
    font-size: 0.9rem;
    color: #64748b;
}

.error-login {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
    border: 1px solid #fca5a5;
}

.login-captcha-box {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.captcha-question {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

.login-footer a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   12. REGRAS DE MEDIA QUERIES (RESPONSIVIDADE)
   ========================================================================== */

@media (max-width: 992px) {
    .sobre-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    .sobre-texto h2 { 
        text-align: center; 
    }
    .sobre-texto hr { 
        margin: 0 auto 25px auto; 
    }
    .hero-content h1 { 
        font-size: 2.5rem; 
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--dark-color);
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .btn-nav {
        display: inline-block;
        width: auto;
    }
    
    .contato-form {
        padding: 20px;
    }

    .navbar-loja .nav-container {
        flex-wrap: wrap;
        gap: 15px;
    }

    .search-form { 
        order: 3; 
        max-width: 100%; 
    }

    .produto-detalhe-grid { 
        grid-template-columns: 1fr; 
        gap: 30px; 
    }

    .produto-detalhe-info h1 { 
        font-size: 1.8rem; 
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .admin-form-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-salvar { 
        max-width: 100%; 
    }

    .btn-cancelar { 
        text-align: center; 
    }
    
    .admin-table th, 
    .admin-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
}