:root {
  --primary: #005f87;
  --accent: #008cba;
  /* Ajustei para o tom azul mais claro */
  --bg: #f5f8fb;
  /* Ajustei para o tom de fundo original */
  --card: #fff;
  --text: #263238;
  --radius: 12px;
  --maxw: 1200px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* * ESTILO BASE DO BODY
 * padding-top define o espaço para o header fixo no desktop (80px)
 */
body {
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-top: 80px;
  /* PADDING CORRETO PARA DESKTOP */
}

/* ===========================
   HEADER & NAV (DESKTOP)
=========================== */

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  /* Altura padrão no desktop */
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
  z-index: 1000;
}

header.scrolled {
  height: 70px;
  /* Altura ao rolar */
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.nav-container {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.nav-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

/* Oculta o botão hambúrguer em telas grandes */
.menu-toggle {
  display: none;
  /* ESCONDIDO POR PADRÃO NO DESKTOP */
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary);
  background: none;
  border: none;
  z-index: 1100;
}

/* Menu de navegação (desktop) */
nav ul {
  list-style: none;
  display: flex;
  gap: 1.8rem;
}

nav ul li a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: color .2s;
}

nav ul li a:hover {
  color: var(--accent);
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .3s;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

/* ===========================
   HERO & CONTEÚDO (Geral)
=========================== */

/* HERO */
.hero {
  max-width: var(--maxw);
  margin: 2rem auto;
  /* Ajustado para 2rem para espaçamento */
  background: linear-gradient(135deg, #0077a8 0%, #003f5c 100%);
  /* Fundo azul do HERO */
  color: #fff;

  border-radius: var(--radius);
  padding: 3rem 2rem;
  /* Aumentado o padding para visual do HERO */
  box-shadow: var(--shadow);
  text-align: center;
}

.hero-left {
      flex:1;
      background:linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0.15)),
        url('imagens/portaPaletes.jpg') center/cover no-repeat;
      border-radius:var(--radius);
      color:#fff;
      display:flex;
      flex-direction:column;
      justify-content:flex-end;
      padding:3rem;
      box-shadow:var(--shadow);
      min-height:360px;
    }

.hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: .8rem;
}

.hero p {
  max-width: 720px;
  margin: 0 auto 1.5rem auto;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* SEÇÃO DE PRODUTOS */
.produtos {
  max-width: var(--maxw);
  margin: 2rem auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.produto-card {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  background: var(--card);
  border-radius: var(--radius);

  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}

.produto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.produto-card img {
  width: 360px;
  height: 260px;
  object-fit: cover;
}

.produto-info {
  flex: 1;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.produto-info h3 {
  color: var(--primary);
  margin-bottom: .6rem;
  font-size: 1.4rem;
}

.produto-info p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #444;
}

.btn {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: .7rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;

  transition: background .3s;
}

.btn:hover {
  background: #0077a8;
  /* Ajuste do hover para combinar com o HERO */
}


/* FOOTER */
footer {
  margin-top: 3rem;
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
  line-height: 1.6;
}

/* ===========================
   RESPONSIVIDADE (MEDIA QUERIES)
=========================== */




/* Ajustes para Telas de Tablet (Hero e Colunas) */
@media (max-width: 960px) {
  .produto-card {
    flex-direction: column;

  }

  .produto-card img {
    width: 100%;
    height: 220px;
  }
}



/* Ajustes Finais para Mobile (Menu e Header) */

/* ===========================
   RESPONSIVIDADE (MEDIA QUERIES)
=========================== */
/* ... (Seu código @media (max-width: 960px) vem antes) ... */

/* Ajustes Finais para Mobile (Menu e Header) */
@media (max-width: 780px) {

    /* CORREÇÃO CRÍTICA: Ajusta o padding-top do body para o mobile */
    body {
        padding-top: 70px; 
    }

    /* Padroniza a altura do header no mobile */
    header,
    header.scrolled {
        height: 70px;
    }

    /* 1. MOSTRA o botão hambúrguer no mobile */
    .menu-toggle {
        display: block; 
    }
    
    /* CORREÇÃO CHAVE: ESCONDE A NAVEGAÇÃO HORIZONTAL E POSICIONA-A */
    nav {
        /* No mobile, a tag nav deve estar pronta para conter o menu flutuante */
        display: block; /* Garante que o nav possa ser manipulado */
        /* O nav no desktop tem display flex, no mobile ele deve ser block
           para que o UL flutuante não interfira */
    }

    /* 2. Configura o MENU POP-UP UL */
    nav ul {
        /* Desativa o display flex do desktop e o torna um elemento flutuante */
        display: flex; /* Mantido como flex para empilhar links */
        flex-direction: column;
        align-items: center;

        /* Posicionamento flutuante e absoluto */
        position: absolute;
        top: 70px; /* Alinhado logo abaixo do header */
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 300px; 
        
        background-color: var(--card);
        border-radius: 12px;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25); /* Sombra um pouco mais forte */

        gap: 0.8rem;

        /* Animação e estado inicial (fechado) */
        max-height: 0;
        opacity: 0;
        padding: 0;
        overflow: hidden; 
        transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1); /* Curva de animação mais suave */
        
        /* O UL não deve ser visível na linha do header, ele é um pop-up */
    }
    
    /* 3. Classe .open que o JavaScript adiciona para MOSTRAR o menu */
    nav ul.open {
        max-height: 600px; /* Valor grande o suficiente para o menu */
        opacity: 1;
        padding: 1rem 0;
        overflow: visible;
    }

    /* 4. Estilo dos links dentro do menu mobile */
    nav ul li {
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        display: block;
        width: 100%;
        padding: 12px 0;
        color: var(--primary);
        font-weight: 600;
    }

    nav ul li a:hover {
        background: #e9ecef;
    }

    nav ul li a::after {
        display: none;
    }
}

