:root {
    --primary-blue: #1e3a8a; /* Azul escuro do fundo */
    --secondary-blue: #3b82f6; /* Azul claro / gradientes */
    --accent-red: #dc2626; /* Vermelho vibrante SN */
    --text-light: #ffffff;
    --text-dark: #333333;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: #f0f4f8;
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

/* Container que simula uma página A4 */
.page {
    width: 210mm;
    min-height: 297mm;
    background: linear-gradient(135deg, var(--primary-blue), #2563eb);
    background-color: var(--primary-blue);
    color: var(--text-light);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    padding: 40px 40px 30px 40px; /* Reduzi um pouco o fundo para caber o rodapé */
}

/* ==================================
   PÁGINA 1: CAPA
================================== */
.cover-page {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.cover-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('img/globo_brasil.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.65; /* Aumentado para o globo aparecer mais forte */
    z-index: -1;
}

.cover-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Estica ambos os blocos para terem a mesma altura */
}

.logo-container {
    text-align: center;
}

.logo-img {
    height: 230px; /* Aumentado para ficar da mesma altura da lista de categorias ao lado */
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.logo-page-1 {
    position: relative;
    display: inline-block;
}

.logo-page-1::before {
    content: '';
    position: absolute;
    top: 40%; left: 50%;
    transform: translate(-50%, -50%);
    width: 140%; height: 140%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

.logo-page-1 .logo-sub {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0px; 
    margin-top: -60px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.logo-page-4 .logo-sub {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    letter-spacing: 0px;
    margin-top: -60px;
}

.cover-categories {
    display: flex;
    padding-top: 35px; /* Aumentado para descer o texto e alinhar ao topo do SN */
    padding-bottom: 25px; /* Compensar margem inferior do logo */
}

.cover-categories ul {
    list-style: none;
    font-size: 1.15rem; /* Um pouco maior para ter mais presença */
    font-weight: 800; /* Mais negrito, como na imagem */
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribui perfeitamente os itens do topo até embaixo */
}

.cover-categories li {
    letter-spacing: 1px;
    margin: 0; /* Removido, o space-between já cuida da separação */
}

.cover-categories span {
    color: var(--accent-red);
    font-weight: bold;
    margin-right: 5px;
}

.cover-main-image {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-images-container {
    width: 100%;
    height: 500px; /* Aumentado para dar espaço às imagens maiores */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 40px;
}

.hero-knife {
    max-height: 466px; /* Aumentado em ~1/3 (era 350px) */
    max-width: 50%; /* Levemente ajustado para permitir o crescimento */
    object-fit: contain;
    filter: drop-shadow(10px 20px 25px rgba(0,0,0,0.5));
}

/* Inclinado: parte redonda para baixo, parte reta para cima */
/* Ângulos ajustáveis conforme a necessidade da foto original */
.left-knife {
    transform: rotate(-45deg);
}

.right-knife {
    transform: rotate(45deg);
}

.cover-footer {
    text-align: center;
    font-family: var(--font-heading);
}

.cover-footer h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.cover-footer p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e0e7ff;
}

/* ==================================
   PÁGINA 2: PRODUTOS (GRID)
================================== */
.page-header {
    margin-bottom: 30px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    display: inline-block;
}

.section-title span {
    color: var(--accent-red);
    margin-right: 8px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #cbd5e1;
    max-width: 80%;
}

.header-divider {
    border: none;
    height: 2px;
    background: linear-gradient(to right, var(--text-light) 30%, transparent);
    margin-top: 15px;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.product-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, background 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.1);
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.product-title span {
    color: var(--accent-red);
    margin-right: 5px;
}

.product-subtitle {
    font-size: 0.9rem;
    color: #93c5fd; /* Azul claro / lilás como na imagem */
    margin-top: 4px;
    font-weight: 500;
}

.product-code {
    display: inline-block;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 6px;
    margin-top: 8px;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}

.product-image-placeholder {
    width: 100%;
    height: 150px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    border: 1px dashed rgba(255,255,255,0.2);
}

.product-img {
    width: 100%;
    height: 150px;
    object-fit: contain; /* Encaixa a imagem inteira sem distorcer ou vazar */
    margin: 15px 0;
    filter: drop-shadow(2px 5px 8px rgba(0,0,0,0.3)); /* Adiciona uma sombra bonita no estilete */
}

.product-desc {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin-top: auto;
}

/* ==================================
   PÁGINAS 3 E 4: ESTRUTURAS ADICIONAIS
================================== */
.page-top-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.category-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
}

.line-box {
    margin-bottom: 10px; /* Reduzi de 20px para 10px para ganhar espaço */
}

.category-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 5px;
    display: inline-block;
}

.category-title span {
    color: var(--accent-red);
    margin-right: 8px;
}

.category-subtitle {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.flex-row {
    display: flex;
}

/* ==================================
   PÁGINA 4: FOOTER
================================== */
.footer-page {
    justify-content: flex-start;
}

.main-footer {
    background-color: #ffffff;
    color: var(--text-dark);
    margin: 0 -40px -40px -40px;
    padding: 15px 40px; /* Reduzi mais 5px */
    border-top: 5px solid var(--accent-red);
}

.footer-cta {
    color: var(--accent-red);
    font-size: 0.88rem; /* Reduzi a fonte para caber em menos linhas */
    font-weight: 700;
    text-align: center;
    margin-bottom: 3px;
}

.footer-link {
    text-align: center;
    font-weight: 800;
    font-size: 1.05rem; /* Ajuste leve */
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.footer-contact-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-details {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.5;
    text-align: right;
    font-weight: 500;
}

/* ==================================
   RESPONSIVIDADE (MOBILE)
================================== */
@media screen and (max-width: 768px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important; /* Remove o espaço entre as páginas no mobile */
        align-items: stretch !important; /* Força os filhos a ocuparem 100% da largura */
        background: var(--primary-blue) !important; /* Fundo combina com a página para evitar bordas brancas */
    }

    .page {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 20px 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important; /* Permite que o conteúdo cresça sem cortar */
    }

    .cover-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: left; /* Base para a lista */
    }

    .cover-categories {
        width: auto !important; /* Deixa ele se ajustar ao texto */
        margin-top: 20px !important;
        padding: 0 20px !important; /* Espaço para não colar o texto no vidro */
    }

    .cover-categories ul {
        column-count: 1 !important;
        padding: 0 !important;
        text-align: left !important; /* Alinhado à esquerda como pedido */
        list-style: none;
    }

    /* URL da Capa - Remove o www e diminui a fonte no celular */
    .cover-footer h2 {
        font-size: 1.2rem !important;
    }
    .cover-footer h2 span {
        display: none;
    }

    /* Ajuste da Capa */
    .cover-main-image {
        height: auto !important;
        padding: 20px 0;
    }

    .cover-main-image > div[style*="width: 100%"] > div {
        font-size: 1rem !important; /* Diminui o badge para não vazar */
        padding: 10px 20px !important;
        max-width: 90%;
        line-height: 1.2;
    }

    .logo-img {
        height: 150px !important; /* Diminui o logo no mobile */
    }

    .logo-page-1 .logo-sub,
    .logo-page-4 .logo-sub {
        margin-top: -20px !important; /* Ajusta para não sobrepor o SN no celular */
        font-size: 1.2rem !important;
    }

    .hero-images-container {
        flex-direction: column !important;
        gap: 20px;
    }

    .hero-knife {
        max-width: 90% !important;
        height: auto !important;
        position: static !important;
        transform: none !important;
        margin: 0 auto;
    }

    /* Ajuste da Grade de Produtos */
    .product-grid {
        display: block !important; /* Muda de Grid para Bloco no celular */
    }

    .product-card {
        width: 100% !important;
        margin-bottom: 15px;
        padding: 10px; /* Reduzi o padding interno */
    }

    .product-img {
        width: 100% !important;
        height: auto !important;
        max-height: 200px !important;
    }

    /* Ajuste das Categorias */
    .category-box {
        padding: 15px 10px !important;
    }

    .flex-row {
        display: block !important; /* Empilha tudo verticalmente */
    }

    .category-box div[style*="width"],
    .category-box img {
        width: 100% !important;
        height: auto !important;
        margin: 10px 0 !important;
        padding: 0 !important;
    }

    /* Rodapé */
    .footer-contact-area {
        display: block !important;
        text-align: center;
    }

    .contact-details {
        text-align: center !important;
        margin-top: 20px;
        font-size: 0.8rem !important;
    }

    .main-footer {
        margin: 20px 0 0 0 !important; /* Remove margens negativas que cortam o rodapé */
        padding: 30px 10px !important;
    }
}

/* Print CSS - Para exportar em PDF perfeitamente */
@page {
    size: A4;
    margin: 0; /* Remove margens do navegador e cabeçalhos/rodapés automáticos */
}

@media print {
    body {
        background: none;
        padding: 0 !important;
        margin: 0 !important;
        gap: 0;
    }
    .page {
        box-shadow: none;
        margin: 0 !important;
        width: 210mm;
        height: 297mm; /* Trava na altura exata da folha */
        page-break-after: always;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    /* Garante que o aviso de PDF não apareça na impressão */
    .no-print-aviso, 
    div[style*="z-index:9999"] {
        display: none !important;
    }
}
