/**
 * Tema Moderno - Loja Online SaaS ERP
 * Layout inspirado em e-commerce moderno com header clean, categorias visuais e cards de produtos elegantes
 */

:root {
    /* Cores primárias - Azul profissional */
    --cor-primaria: #1e40af;
    --cor-primaria-light: #3b82f6;
    --cor-primaria-dark: #1e3a8a;
    
    /* Cores secundárias */
    --cor-secundaria: #64748b;
    --cor-accent: #f59e0b;
    --cor-accent-dark: #d97706;
    
    /* Cores de fundo */
    --cor-fundo: #f8fafc;
    --cor-fundo-card: #ffffff;
    --cor-borda: #e2e8f0;
    --cor-texto: #1e293b;
    --cor-texto-secundario: #64748b;
    
    /* Gradientes */
    --gradiente-header: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --gradiente-card: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    
    /* Sombras */
    --sombra-suave: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --sombra-media: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sombra-forte: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Bordas */
    --borda-arredondada: 12px;
    --borda-arredondada-suave: 8px;
    --borda-arredondada-forte: 16px;
}

/* Reset e estilos base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--cor-fundo);
    color: var(--cor-texto);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Header moderno */
.header-moderno {
    background: var(--gradiente-header);
    color: white;
    padding: 0;
    box-shadow: var(--sombra-media);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-topo {
    background: rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    font-size: 13px;
}

.header-topo .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contato-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.contato-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.redes-sociais {
    display: flex;
    gap: 12px;
}

.redes-sociais a {
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.redes-sociais a:hover {
    opacity: 1;
}

.header-principal {
    padding: 16px 0;
}

.header-principal .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    height: 48px;
    width: auto;
}

.logo-texto {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.header-acoes {
    display: flex;
    align-items: center;
    gap: 20px;
}

.busca-container {
    position: relative;
    width: 300px;
}

.busca-input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: none;
    border-radius: var(--borda-arredondada-suave);
    background: rgba(255, 255, 255, 0.95);
    color: var(--cor-texto);
    font-size: 14px;
    transition: all 0.3s;
}

.busca-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.busca-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--cor-primaria);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.3s;
}

.busca-btn:hover {
    background: rgba(59, 130, 246, 0.1);
}

.icones-header {
    display: flex;
    gap: 16px;
}

.icone-header {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.icone-header:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.icone-header .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--cor-accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Menu de categorias */
.menu-categorias {
    background: white;
    border-bottom: 1px solid var(--cor-borda);
    padding: 0;
    position: sticky;
    top: 88px;
    z-index: 90;
}

.menu-categorias .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.categorias-lista {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categorias-lista::-webkit-scrollbar {
    display: none;
}

.categoria-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--borda-arredondada-suave);
    background: var(--cor-fundo);
    border: 1px solid var(--cor-borda);
    color: var(--cor-texto);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
    cursor: pointer;
}

.categoria-item:hover {
    background: var(--cor-primaria);
    color: white;
    border-color: var(--cor-primaria);
    transform: translateY(-2px);
    box-shadow: var(--sombra-suave);
}

.categoria-item.active {
    background: var(--cor-primaria);
    color: white;
    border-color: var(--cor-primaria);
}

.categoria-item i {
    font-size: 16px;
}

.categoria-item .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.categoria-item:hover .count {
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0;
    margin-bottom: 40px;
}

.hero-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-conteudo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-texto h1 {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.hero-texto p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.hero-botoes {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 12px 24px;
    border-radius: var(--borda-arredondada-suave);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-heroprimario {
    background: white;
    color: var(--cor-primaria);
}

.btn-heroprimario:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-forte);
}

.btn-herosecundario {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-herosecundario:hover {
    background: white;
    color: var(--cor-primaria);
}

.hero-imagem {
    position: relative;
}

.hero-imagem img {
    width: 100%;
    height: auto;
    border-radius: var(--borda-arredondada-forte);
    box-shadow: var(--sombra-forte);
}

/* Seção de produtos */
.produtos-section {
    padding: 40px 0;
}

.produtos-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--cor-texto);
    margin: 0 0 8px 0;
}

.section-header p {
    font-size: 18px;
    color: var(--cor-texto-secundario);
    margin: 0;
}

.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.produto-card {
    background: var(--cor-fundo-card);
    border-radius: var(--borda-arredondada);
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    transition: all 0.3s;
    border: 1px solid var(--cor-borda);
    position: relative;
}

.produto-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-forte);
}

.produto-imagem {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--cor-fundo);
}

.produto-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.produto-card:hover .produto-imagem img {
    transform: scale(1.05);
}

.produto-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--cor-accent);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.produto-badge.novo {
    background: #10b981;
}

.produto-badge.promocao {
    background: #ef4444;
}

.produto-acoes {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.produto-card:hover .produto-acoes {
    opacity: 1;
}

.acao-produto {
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--sombra-suave);
    transition: all 0.3s;
    color: var(--cor-texto);
}

.acao-produto:hover {
    background: var(--cor-primaria);
    color: white;
    transform: scale(1.1);
}

.produto-info {
    padding: 16px;
}

.produto-categoria {
    color: var(--cor-primaria);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.produto-nome {
    font-size: 16px;
    font-weight: 600;
    color: var(--cor-texto);
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.produto-descricao {
    font-size: 14px;
    color: var(--cor-texto-secundario);
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.produto-preco {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.preco-actual {
    font-size: 20px;
    font-weight: 700;
    color: var(--cor-texto);
}

.preco-antigo {
    font-size: 14px;
    color: var(--cor-texto-secundario);
    text-decoration: line-through;
}

.desconto {
    background: #dc2626;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.produto-estoque {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.estoque-disponivel {
    color: #10b981;
}

.estoque-baixo {
    color: var(--cor-accent);
}

.estoque-esgotado {
    color: #dc2626;
}

.btn-adicionar {
    width: 100%;
    padding: 10px;
    background: var(--cor-primaria);
    color: white;
    border: none;
    border-radius: var(--borda-arredondada-suave);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-adicionar:hover:not(:disabled) {
    background: var(--cor-primaria-dark);
    transform: translateY(-1px);
    box-shadow: var(--sombra-media);
}

.btn-adicionar:disabled {
    background: var(--cor-texto-secundario);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Footer */
.footer-moderno {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 40px 0 20px 0;
    margin-top: 60px;
}

.footer-moderno .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-conteudo {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-secao h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.footer-secao p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-contato {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contato-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.pagamento-metodos {
    display: flex;
    gap: 8px;
}

.pagamento-metodos img {
    height: 24px;
    width: auto;
}

/* Responsivo */
@media (max-width: 768px) {
    .header-topo {
        display: none;
    }
    
    .header-principal .container {
        flex-direction: column;
        gap: 16px;
    }
    
    .busca-container {
        width: 100%;
    }
    
    .hero-conteudo {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-texto h1 {
        font-size: 32px;
    }
    
    .hero-botoes {
        justify-content: center;
    }
    
    .produtos-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .footer-conteudo {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .categorias-lista {
        gap: 4px;
    }
    
    .categoria-item {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .produtos-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.produto-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Loading skeleton */
.skeleton-produto {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--borda-arredondada);
    height: 320px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
