/* style.css (Visual Moderno Refinado + Responsividade Mobile Corrigida) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

/* --- Variáveis (Paleta Profissional e de Vendas) --- */
:root{
  --bg:#f8f9fa; /* Fundo muito claro */
  --card:#ffffff;
  --primary:#0066cc; /* Azul forte, cor de destaque principal (Botões, links) */
  --primary-hover:#004c99;
  --success:#198754; /* Verde forte para destaque de Preço à Vista (similar ao site de referência) */
  --success-light:#e9f4eb; /* Fundo claro para o preço */
  --danger:#dc3545; /* Vermelho para oferta/exclusão */
  --secondary:#6c757d; /* Cinza para texto secundário */
  --title:#212529;
  --radius:8px;
  --gap:20px;
  --maxwidth:1200px;
  --transition:.3s;
  --shadow-subtle:0 2px 4px rgba(0,0,0,0.05); /* Sombra mais discreta */
  --shadow-card:0 6px 15px rgba(0,0,0,0.1); /* Sombra para cards */
}

/* --- Base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--secondary);
    line-height: 1.6;
}
.container {
    max-width: var(--maxwidth);
    margin: 0 auto;
    padding: 0 var(--gap);
}
h1, h2, h3, h4 {
    color: var(--title);
    margin-bottom: 0.5em;
    font-weight: 700;
}
a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}
section, main {
    padding: 20px 0;
}
label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--title);
}
input[type="text"], input[type="search"], input[type="number"], textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    transition: border-color 0.3s;
    font-family: inherit;
}
input:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
}
textarea {
    resize: vertical;
    min-height: 100px;
}
.danger-text {
    color: var(--danger);
    font-size: 0.9em;
    font-weight: 600;
}

/* --- Botões --- */
.primary-btn, .secondary-btn, .danger-btn {
    padding: 10px 15px;
    border-radius: var(--radius);
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    display: inline-block;
}
.primary-btn {
    background-color: var(--primary);
    color: var(--card);
}
.primary-btn:hover {
    background-color: var(--primary-hover);
}
.secondary-btn {
    background-color: var(--secondary);
    color: var(--card);
}
.secondary-btn:hover {
    background-color: #5a6268;
}
.danger-btn {
    background-color: var(--danger);
    color: var(--card);
}
.danger-btn:hover {
    background-color: #c82333;
}
/* Estilo para links que parecem botões */
.primary-btn[href], .secondary-btn[href], .danger-btn[href] {
    line-height: 1; /* Alinhamento visual */
}
.site-header {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: background-image 0.3s ease-in-out;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  border-radius: 5px;
  z-index: 1; /* cabeçalho acima do fundo, abaixo do carrinho */
}

/* Certifique-se que o elemento "oferta" esteja com z-index menor, por exemplo: */
.oferta {
  position: absolute; /* ou fixed se precisar flutuar */
  z-index: 0; /* abaixo do cabeçalho */
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    max-width: var(--maxwidth);
    margin: 0 auto;
    padding: 0 var(--gap);
}
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 200px; /* ajuste a altura conforme desejar */
    width: auto;
}
.main-nav a {
    margin-left: var(--gap);
    color: var(--title);
    font-weight: 600;
    padding: 5px 0;
}
.main-nav a:hover {
    color: var(--primary);
}

/* Carrinho no Header */
.cart-btn {
    position: relative;
    padding: 8px 15px;
    background: none;
    border: 1px solid var(--secondary);
    border-radius: var(--radius);
    color: var(--title);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.cart-btn:hover, .cart-btn.has-items {
    border-color: var(--primary);
    color: var(--primary);
}
#cart-count {
    font-weight: 700;
    color: var(--danger);
    margin-left: 5px;
}
.cart-btn.has-items #cart-count {
    color: var(--primary);
}

/* Busca no Header */
.header-search {
    display: flex;
    gap: 10px;
    padding: 15px var(--gap);
    background-color: #e9ecef;
    margin-bottom: 20px;
    border-radius: var(--radius);
    align-items: center;
}
.header-search input {
    margin: 0;
    flex-grow: 1;
}
.header-search button {
    white-space: nowrap;
}


/* --- Footer --- */
.site-footer {
    background-color: var(--title);
    color: var(--bg);
    padding: 20px 0;
    margin-top: 30px;
}
.footer-content {
    max-width: var(--maxwidth);
    margin: 0 auto;
    padding: 0 var(--gap);
    text-align: center;
    font-size: 0.9em;
}
.footer-links a {
    color: var(--bg);
    margin: 0 5px;
}
.footer-links a:hover {
    color: var(--primary);
}


/* --- Carrossel (Hero) --- */
.hero {
    position: relative;
    height: 400px;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: var(--radius);
}
#hero-carousel {
    width: 100%;
    height: 100%;
}
.carousel-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.carousel-image.active {
    opacity: 1;
}

/* --- Produto / Catálogo / Cards --- */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: calc(25% - 15px); /* 4 cards por fileira */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* garante botão no fim */
    box-sizing: border-box;
    padding: 15px;
    transition: transform 0.2s;
    min-height: 380px; /* Altura mínima consistente */
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-img-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa; /* Fundo neutro para padronizar */
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-img-container img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: pointer;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.product-meta {
    margin-top: auto; /* botão sempre no fim */
    padding-top: 10px;
}

/* Modal de imagem */
.modal-image-viewer {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

.modal-image-viewer img {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.modal-image-viewer img.zoomed {
    transform: scale(2); /* zoom ao clicar */
    cursor: zoom-out;
}

.modal-close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    z-index: 10;
}

/* Preços */
.product-prices {
    margin: 8px 0;
}
.price-cash {
    display: block;
    font-size: 1.4em;
    font-weight: 900;
    color: var(--success);
    margin-bottom: 2px;
}
.price-discount {
    display: block;
    font-size: 0.75em;
    color: var(--success);
    font-weight: 600;
    margin-bottom: 5px;
}
.price-credit-installment {
    font-size: 0.85em;
    color: var(--secondary);
    font-weight: 600;
}
.price-credit-total {
    font-size: 0.75em;
    color: var(--secondary);
    margin-top: 2px;
}

/* REMOVER DESCRIÇÃO DOS CARDS */
.product-desc-wrapper {
    display: none !important;
}
.read-more-btn {
    display: none !important;
}

/* Botão Adicionar Carrinho */
.add-cart {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.add-cart:hover {
    background-color: var(--primary-hover);
}

/* --- Admin Layout (Lista Horizontal Corrigida) --- */

/* 1. O NOVO CONTAINER de lista do Admin */
.admin-product-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espaço entre os cards da lista */
    margin-top: 20px;
    /* CORREÇÃO: Define a largura máxima que a lista deve ocupar */
    max-width: 900px; 
    width: 100%;
}

/* 2. Estilo do Card dentro das listas Admin/Cadastro */
.admin-product-list .product-card {
    display: flex;
    flex-direction: row; /* Força horizontal */
    align-items: center;
    gap: 15px;
    padding: 10px;
    box-shadow: var(--shadow-subtle);
    border: 1px solid #e9ecef;
    transition: background-color 0.2s;
    height: auto;
    width: 100%; /* Ocupa 100% do novo container de 900px */
    flex-grow: 0; /* IMPEDE que o card se estique */
}
.admin-product-list .product-card:hover {
    background-color: #f1f1f1;
}

/* 3. Tamanho da Imagem na lista Admin */
.admin-product-list .product-card .product-img-container {
    width: 80px; /* Tamanho fixo da imagem (pequena) */
    min-width: 80px;
    height: 80px; 
    padding-top: 0; /* Desabilita o padding-top de proporção */
    border-radius: var(--radius);
    overflow: hidden;
}
.admin-product-list .product-card .product-img {
    cursor: default; 
    transform: none; 
}
.admin-product-list .product-card:hover .product-img {
    transform: none;
}

/* 4. Conteúdo do Card na lista Admin */
.admin-product-list .product-card .card-content {
    flex-direction: row; /* Layout horizontal do conteúdo interno */
    align-items: center;
    flex-grow: 1; /* Permite que o conteúdo interno use o espaço restante */
    padding: 0;
    gap: 15px;
    flex-wrap: nowrap; /* Evita quebras desnecessárias em telas maiores */
}
.admin-product-list .product-card h4 {
    margin: 0;
    min-width: 150px; /* Dá um espaço mínimo para o nome */
    font-size: 1em;
}
.admin-product-list .product-card .product-prices {
    min-width: 100px; /* Dá espaço para o preço */
}
.admin-product-list .product-card .product-prices .price-cash {
    font-size: 1.1em;
}
.admin-product-list .product-card .admin-actions {
    display: flex;
    gap: 5px;
    margin-left: auto; /* Empurra as ações para a direita */
    flex-shrink: 0; /* Evita que os botões diminuam */
}


/* Formulário de Admin (Cadastro) */
.product-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
    background-color: var(--card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.product-form .full-width {
    grid-column: 1 / -1;
}
.product-form .form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 10px;
}
.image-preview {
    width: 100%;
    max-width: 250px;
    height: 250px;
    border: 1px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-top: 5px;
}
.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.banner-config-group {
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: var(--radius);
}
.banner-config-group h4 {
    font-size: 1em;
    margin-bottom: 10px;
    color: var(--primary);
}


/* --- Modal (Carrinho / Imagem) --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: flex-end; /* Alinha o modal do carrinho à direita */
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s;
}
.modal.hidden {
    display: none;
    opacity: 0;
}
.modal-content {
    background-color: var(--card);
    width: 90%;
    max-width: 400px; /* Largura padrão para o carrinho */
    height: 100%;
    position: relative;
    padding: var(--gap);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    transform: translateX(0);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
}
.modal-image-viewer {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    border-radius: var(--radius);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.modal-image-viewer #modal-image-full {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}
/* Esconde o scrollbar do body quando o modal está aberto */
body.modal-open {
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: var(--secondary);
    transition: color 0.3s;
    z-index: 1010;
}
.modal-close:hover {
    color: var(--danger);
}

/* Carrinho */
#cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 10px;
}
.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.cart-item-name {
    color: var(--title);
    font-weight: 600;
}
.item-quantity-controls {
    display: flex;
    align-items: center;
    margin-left: auto;
}
.qty-minus, .qty-plus {
    background: var(--primary);
    color: var(--card);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
}
.qty {
    margin: 0 10px;
    font-weight: 700;
    color: var(--title);
}
.cart-summary {
    border-top: 2px solid var(--primary);
    padding-top: 15px;
    margin-top: 15px;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--title);
}
.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}
#clear-cart {
    background-color: var(--danger);
}


/* --- Sidebar de Categorias (Catálogo) --- */
.catalog-layout {
    display: flex;
    gap: var(--gap);
    align-items: flex-start;
}
.category-sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: var(--card);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-subtle);
    position: sticky;
    top: 90px;
}
.sidebar-title {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 5px;
    margin-bottom: 10px;
}
.category-list {
    list-style: none;
    padding: 0;
}
.category-item {
    padding: 8px 0;
    cursor: pointer;
    color: var(--title);
    font-weight: 500;
    transition: var(--transition);
    border-radius: 4px;
}
.category-item:hover, .category-item.active {
    color: var(--card);
    background-color: var(--primary);
    padding-left: 5px;
}
.product-content {
    flex-grow: 1;
}

/* --- RESPONSIVIDADE MOBILE CORRIGIDA --- */

/* Tablet */
@media (max-width: 1024px) {
    .catalog-layout {
        flex-direction: column;
    }
    .category-sidebar {
        width: 100%;
        position: static;
        top: auto;
        margin-bottom: 20px;
    }
    .hero {
        height: 300px;
    }
    .product-card {
        width: calc(33.333% - 15px); /* 3 cards por linha */
    }
    .nav-bar-below {
        gap: 30px;
        padding: 12px 0;
    }
}

/* Mobile Large - CORREÇÕES PRINCIPAIS */
@media (max-width: 768px) {
    /* 1. CABEÇALHO RESPONSIVO */
    .site-header {
        height: 150px;
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 0;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        margin: 0 auto;
    }
    
    .container {
        max-width: 100%;
        width: 100%;
        padding: 0 10px;
        overflow-x: hidden;
    }
    
    body {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* 2. NAVEGAÇÃO HORIZONTAL EM TODAS AS PÁGINAS */
    .nav-bar-below {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        justify-content: flex-start !important;
        gap: 15px !important;
        padding: 12px 15px !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .nav-bar-below a {
        display: inline-block !important;
        flex-shrink: 0 !important;
        padding: 10px 16px !important;
        background: #f8f9fa !important;
        border-radius: 25px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        color: #082a74 !important;
        border: 1px solid #e9ecef !important;
        white-space: nowrap !important;
    }
    
    .nav-bar-below a:hover {
        background: var(--primary) !important;
        color: white !important;
        border-color: var(--primary) !important;
    }
    
    /* 3. PRODUTOS 2 POR LADO */
    .product-card {
        width: calc(50% - 8px) !important; /* 2 produtos por linha */
    }
    
    .product-grid {
        gap: 12px;
        justify-content: space-between;
    }
    
    .header-top {
        flex-wrap: wrap;
        justify-content: center;
        padding: 8px 0;
    }
    .main-nav {
        margin: 8px 0;
        width: 100%;
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }
    .header-search {
        flex-direction: column;
        padding: 10px;
    }
    .hero {
        height: 200px;
    }
    .product-form {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 15px;
    }
    .form-actions {
        justify-content: center;
        flex-direction: column;
    }
    
    /* Mobile: Layout vertical para lista admin */
    .admin-product-list .product-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }
    .admin-product-list .product-card .product-img-container {
        width: 100%;
        height: 120px;
        min-width: 0;
        margin-bottom: 10px;
    }
    .admin-product-list .product-card .card-content {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 8px;
    }
    .admin-product-list .product-card h4,
    .admin-product-list .product-card .product-prices,
    .admin-product-list .product-card .admin-actions {
        min-width: 0;
        width: 100%;
        margin-left: 0;
    }
    .admin-product-list .product-card .admin-actions {
        justify-content: space-between;
        margin-top: 10px;
    }
    .admin-product-list .product-card .admin-actions button {
        flex: 1;
        margin: 2px;
        padding: 8px 12px;
    }
    
    /* Mobile: Ajustes de texto */
    h1 {
        font-size: 1.6em;
    }
    h2 {
        font-size: 1.4em;
    }
    .price-cash {
        font-size: 1.3em;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .site-header {
        height: 120px;
    }
    
    /* Mantém produtos 2 por linha */
    .product-card {
        width: calc(50% - 6px) !important;
    }
    
    .product-card .product-img-container {
        height: 120px;
    }
    
    /* Mobile: Botões maiores para touch */
    .primary-btn, .secondary-btn, .danger-btn, .add-cart {
        padding: 12px 16px;
        font-size: 16px;
        min-height: 44px;
    }
    
    /* Mobile: Header e navegação */
    .header-top .cart-btn {
        margin-top: 8px;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1001;
        background: white;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    .nav-bar-below {
        gap: 10px !important;
        padding: 10px 10px !important;
    }
    
    .nav-bar-below a {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
    
    /* Mobile: Modal full width */
    .modal-content {
        max-width: 100%;
        width: 100%;
    }
    
    .hero {
        height: 120px;
    }
    
    .hero-content h1 {
        font-size: 1.3em;
    }
    
    .hero-content p {
        font-size: 0.8em;
    }
    
    /* Mobile: Ajustes no carrinho */
    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 12px 0;
    }
    
    .item-quantity-controls {
        margin-left: 0;
    }
    
    /* Mobile: Melhorias de legibilidade */
    body {
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
    }
    
    .product-desc-text {
        font-size: 0.8em;
    }
    
    /* Mobile: Remove hover effects */
    .product-card:hover {
        transform: none;
    }
}

/* Mobile Extra Small */
@media (max-width: 360px) {
    .site-header {
        height: 100px;
    }
    
    .nav-bar-below {
        gap: 8px !important;
        padding: 8px 8px !important;
    }
    
    .nav-bar-below a {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
    
    .product-card {
        width: calc(50% - 5px) !important;
    }
    
    .product-card .product-img-container {
        height: 100px;
    }
}

/* Remove qualquer menu mobile */
.mobile-menu, .mobile-menu-btn {
    display: none !important;
}
/* === CORREÇÃO DEFINITIVA - NAVEGAÇÃO HORIZONTAL TODAS PÁGINAS === */

@media (max-width: 768px) {
    /* FORÇA ABSOLUTA - seleciona TODAS as nav-bars em TODOS os contextos */
    nav.nav-bar-below,
    .nav-bar-below,
    body .nav-bar-below,
    html body .nav-bar-below,
    * .nav-bar-below {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        justify-content: flex-start !important;
        gap: 15px !important;
        padding: 12px 15px !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        -webkit-overflow-scrolling: touch !important;
        max-width: 100vw !important;
    }
    
    /* FORÇA ABSOLUTA - seleciona TODOS os links em TODOS os contextos */
    nav.nav-bar-below a,
    .nav-bar-below a,
    body .nav-bar-below a,
    html body .nav-bar-below a,
    * .nav-bar-below a {
        display: inline-block !important;
        flex-shrink: 0 !important;
        padding: 10px 16px !important;
        background: #f8f9fa !important;
        border-radius: 25px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        color: #082a74 !important;
        border: 1px solid #e9ecef !important;
        white-space: nowrap !important;
        min-width: max-content !important;
    }
    
    nav.nav-bar-below a:hover,
    .nav-bar-below a:hover,
    body .nav-bar-below a:hover {
        background: var(--primary) !important;
        color: white !important;
        border-color: var(--primary) !important;
    }
    
    /* REMOVE qualquer estilo que force vertical em outras páginas */
    .nav-bar-below[style*="flex-direction: column"],
    .nav-bar-below[style*="flex-direction:column"] {
        flex-direction: row !important;
    }
    
    .nav-bar-below a[style*="display: block"],
    .nav-bar-below a[style*="display:block"] {
        display: inline-block !important;
    }
}

@media (max-width: 480px) {
    nav.nav-bar-below,
    .nav-bar-below {
        gap: 10px !important;
        padding: 10px 10px !important;
    }
    
    nav.nav-bar-below a,
    .nav-bar-below a {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 360px) {
    nav.nav-bar-below,
    .nav-bar-below {
        gap: 8px !important;
        padding: 8px 8px !important;
    }
    
    nav.nav-bar-below a,
    .nav-bar-below a {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 768px) {
    /* Remove qualquer estilo inline que possa estar forçando vertical */
    [class*="nav-bar-below"] {
        flex-direction: row !important;
        display: flex !important;
    }
    
    [class*="nav-bar-below"] a {
        display: inline-block !important;
        float: none !important;
    }
}
/* style.css (Adicione este bloco no final) */

/* === Estilos para o Login (login.html) === */

#login-container {
    /* É controlado pelo HTML, mas este estilo é essencial */
    background-color: var(--bg);
}

.login-box {
    background-color: var(--card);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 800;
}

.login-box label {
    text-align: left;
    margin-top: 10px;
    display: block;
}

.login-box input[type="email"], 
.login-box input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    box-sizing: border-box;
}

.login-box .primary-btn {
    width: 100%;
    margin-top: 10px;
}

#login-error {
    color: var(--danger);
    margin-top: 15px;
    font-size: 0.9em;
    font-weight: 600;
}

/* === ESTILOS PARA PRODUTOS OCULTOS === */
.admin-product-list .product-card.hidden-product {
    opacity: 0.6;
    border-left: 5px solid var(--danger);
    background-color: #fffafa; /* Um fundo levemente avermelhado */
}

/* Tag de status OCULTO/VISÍVEL no Admin */
.hidden-tag, .visible-tag {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 700;
    z-index: 5;
    color: var(--card);
}
.hidden-tag {
    background-color: var(--danger);
}
.visible-tag {
    background-color: var(--success);
}

/* Estilo para o botão "Ocultar" para diferenciá-lo do "Mostrar" (secondary-btn) */
.admin-actions .hide-btn {
    background-color: #ffc107; /* Amarelo/Atenção */
    color: var(--title);
}
.admin-actions .hide-btn:hover {
    background-color: #e0a800;
}

/* Estilo para o botão "Mostrar" */
.admin-actions .show-btn {
    background-color: var(--success);
    color: var(--card);
}
.admin-actions .show-btn:hover {
    background-color: #157347;
}
/* === Estilos para Controle de Estoque === */
.inventory-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: #fff;
}

.inventory-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.item-info {
    flex-grow: 1;
}

.item-name {
    font-weight: bold;
}

.inventory-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inventory-control label {
    display: flex;
    align-items: center;
    font-weight: normal;
    gap: 5px;
}

.inventory-control input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    transition: border-color 0.3s;
}

.inventory-control input:focus {
    border-color: var(--primary);
    outline: none;
}

.stock-status {
    font-size: 0.9em;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    margin-top: 5px;
}

.stock-in {
    background-color: var(--success);
    color: white;
}

.stock-out {
    background-color: var(--danger);
    color: white;
}

.stock-low {
    background-color: #ffc107;
    color: black;
}

.search-bar-admin {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-bar-admin input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
/* Estilo para descrição recolhida */
.product-desc-text {
    font-size: 0.9em;
    color: var(--secondary);
    max-height: 60px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.product-desc-text.expanded {
    max-height: none;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    padding: 0;
    margin-top: 5px;
}

/* Modal com descrição */
/* Modal com descrição */
.modal-content.modal-image-viewer {
    display: flex;
    max-width: 90%;
    max-height: 90%;
    flex-direction: row;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    padding: 0;
}

.modal-content.modal-image-viewer img {
    width: 50%;
    height: auto;
    object-fit: contain;
    border-right: 1px solid #eee;
}

.modal-product-desc {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: 80vh;
}

.modal-product-desc h3 {
    color: var(--title);
    margin-bottom: 10px;
    font-size: 1.4em;
}

.modal-product-desc h4 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 1.1em;
    font-weight: normal;
}

.modal-product-desc .specs-title {
    color: var(--title);
    font-weight: 600;
    margin: 20px 0 10px 0;
    font-size: 1.1em;
}

.modal-product-desc .specs-content {
    color: var(--secondary);
    line-height: 1.6;
    font-size: 0.95em;
}

.modal-product-desc .price-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal-product-desc .price-cash-modal {
    font-size: 1.5em;
    font-weight: 900;
    color: var(--success);
    margin-bottom: 5px;
}

.modal-product-desc .price-discount-modal {
    font-size: 0.9em;
    color: var(--success);
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-product-desc .price-installment-modal {
    font-size: 0.9em;
    color: var(--secondary);
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .modal-content.modal-image-viewer {
        flex-direction: column;
        max-width: 95%;
    }
    
    .modal-content.modal-image-viewer img {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .modal-product-desc {
        max-height: 40vh;
        padding: 20px;
    }
}