/* --------------------------- TOKENS (DESIGN SYSTEM) ---------------------------- */
:root {
  --primary: #1A485D;
  --primary-dark: #133646;
  --primary-light: rgba(26, 72, 93, 0.08);
  --accent: #18A0FB;
  --wa: #16A34A;
  --wa-dark: #0F7A36;
  --text: #1A485D;
  --muted: #4C5C74;
  --bg: #ffffff;
  --bg-alt: #F8FAFC;
  --border: #E2E8F0;
  --container: 1240px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.1);
  --t: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* 🔥 CORREÇÃO: Previne scroll horizontal global */
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* 🔥 CORREÇÃO: Previne scroll horizontal no body */
  width: 100%; /* 🔥 CORREÇÃO: Garante que body não ultrapasse viewport */
  max-width: 100vw; /* 🔥 CORREÇÃO: Limita largura máxima */
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--t);
}

button,
input,
textarea {
  font: inherit;
  outline: none;
}

.container {
  width: min(var(--container), 90%);
  margin: 0 auto;
  max-width: 100%; /* 🔥 CORREÇÃO: Garante que container não ultrapasse viewport */
}

.section {
  padding: 100px 0;
  overflow-x: hidden; /* 🔥 CORREÇÃO: Previne overflow horizontal em seções */
}

.section--alt {
  background: var(--bg-alt);
}

/* --------------------------- UI ELEMENTS ---------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.sectionTitle {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 20px;
  font-weight: 800;
}

.sectionDesc {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--r-sm);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--t);
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(26, 72, 93, 0.2);
}

.btn--wa {
  background: var(--wa);
  color: #fff;
}

.btn--wa:hover {
  background: var(--wa-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.2);
}

.btn--outline {
  background: #16a34a;
  color: #ffffff;
}

.btn--small {
  padding: 10px 20px;
  font-size: 14px;
}

.btn--full {
  width: 100%;
}

/* --------------------------- HEADER ---------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--t);
  width: 100%; /* 🔥 CORREÇÃO: Garante que header não ultrapasse viewport */
}

.header.is-scrolled {
  padding: 10px 0;
  box-shadow: var(--shadow);
}

.header__inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand__logo {
  height: 42px;
  width: auto;
}

.nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  margin-right: 32px;
}

.nav__link {
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
}

.nav__link:hover {
  color: var(--primary);
}

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

.navToggle {
  display: none;
  background: none;
  border: none;
  padding: 5px;
}

.navToggle__lines {
  width: 24px;
  height: 2px;
  background: var(--primary);
  position: relative;
  display: block;
}

.navToggle__lines::before,
.navToggle__lines::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--primary);
  left: 0;
}

.navToggle__lines::before {
  top: -8px;
}

.navToggle__lines::after {
  top: 8px;
}

@media (max-width: 960px) {
  .nav {
    display: none;
  }
  .navToggle {
    display: block;
  }
  .header__actions .btn--wa {
    display: none;
  }
}
/* --------------------------- HERO ---------------------------- */
.hero {
  position: relative;
  padding: 120px 0 100px;
  text-align: center;
  overflow: hidden;
  width: 100%; /* 🔥 CORREÇÃO: Garante que hero não ultrapasse viewport */
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
              url("imagens/hero-bg.webp") center/cover no-repeat;
  filter: blur(3px);
  transform: scale(1.05);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px; /* 🔥 CORREÇÃO: Adiciona padding para mobile */
}

.hero__title {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero__subtitle {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 40px;
}

.hero__btns {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: -80px;
  transform: translateX(-50%);
  z-index: 3;
}

.hero__scroll a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #133646;
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 18px;
  animation: bounce 2s infinite;
  transition: all 0.3s ease;
}

.hero__scroll a:hover {
  background: white;
  transform: translateY(4px);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --------------------------- PRODUTOS ---------------------------- */
.sectionHead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
}

.searchContainer {
  position: relative;
  width: min(400px, 100%);
  margin-bottom: 40px;
}

.searchContainer i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.searchContainer input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border: 2px solid var(--border);
  border-radius: 99px;
  transition: var(--t);
}

.searchContainer input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.grid {
  display: grid;
  gap: 30px;
}

.grid--4 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.productCard {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--t);
  display: flex;
  flex-direction: column;
}

.productCard:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
  border-color: var(--primary);
}

.productCard__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f1f5f9;
}

.productCard__body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.productCard__title {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--primary);
  font-weight: 700;
}

.productCard__text {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.productCard__footer {
  display: flex;
  gap: 10px;
}
/* --------------------------- ABOUT ---------------------------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about__img {
  position: relative;
}

.about__img img {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  width: 100%;
}

.about__experience {
  position: absolute;
  top: -30px;
  left: -30px;
  background: var(--primary);
  color: #fff;
  padding: 22px;
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.about__experience strong {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.about__experience span {
  font-size: 14px;
  opacity: 0.8;
}

.about__text p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 450px) {
  .about {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .about__experience {
    position: absolute;
    top: -25px;
    left: 15px;
    padding: 12px 16px;
    max-width: 160px;
    border-radius: 14px;
  }
  .about__experience strong {
    font-size: 18px;
    line-height: 1;
  }
  .about__experience span {
    font-size: 11px;
  }
}

/* --------------------------- CONTACT ---------------------------- */
.contact {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
}

.contactList {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 40px;
}

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

.cItem i {
  width: 50px;
  height: 50px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0; /* 🔥 CORREÇÃO: Previne que ícone encolha */
}

.cItem strong {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

.cItem span {
  font-size: 18px;
  font-weight: 700;
  word-break: break-word; /* 🔥 CORREÇÃO: Quebra textos longos */
}

.form {
  background: #fff;
  padding: 40px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form__group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form input,
.form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: var(--t);
  max-width: 100%; /* 🔥 CORREÇÃO: Garante que inputs não ultrapassem container */
}

.form input:focus,
.form textarea:focus {
  border-color: var(--primary);
  background: var(--bg-alt);
}

textarea {
  margin-bottom: 20px;
  resize: vertical;
}

@media (max-width: 768px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .form__group {
    grid-template-columns: 1fr;
  }
  .form {
    padding: 24px; /* 🔥 CORREÇÃO: Reduz padding no mobile */
  }
}

/* --------------------------- FOOTER ---------------------------- */
.footer {
  background: #1A485D;
  color: #ffffff;
  padding: 80px 0 40px;
  overflow-x: hidden; /* 🔥 CORREÇÃO: Previne overflow horizontal no footer */
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer__logo {
  height: 36px;
  margin-bottom: 24px;
  filter: brightness(0) invert(1);
}

.footer__brand p {
  color: #ffffff;
  max-width: 300px;
}

.footer h4 {
  margin-bottom: 24px;
  font-size: 18px;
}

.footer__nav a {
  display: block;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer__nav a:hover {
  color: #fff;
}

.footer__contact p {
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  word-break: break-word; /* 🔥 CORREÇÃO: Quebra textos longos */
}

.footer__bottom {
  border-top: 1px solid #1e293b;
  padding-top: 40px;
  text-align: center;
  color: #ffffff;
  font-size: 14px;
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
/* --------------------------- COMPONENTS ---------------------------- */
.waFloat {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--wa);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  z-index: 999;
  border: none;
  transition: all var(--t);
}

.waFloat:hover {
  transform: scale(1.1);
  background: var(--wa-dark);
}

/* --------------------------- MODAL (VERSÃO CORRIGIDA) ---------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal.isOpen {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 16, 34, 0.8);
  backdrop-filter: blur(8px);
}

.modal__panel {
  position: relative;
  background: #fff;
  width: 90%; /* 🔥 CORREÇÃO: Reduz largura padrão */
  max-width: 900px;
  margin: 20px;
  max-height: 95vh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--r-lg);
  padding: 40px 20px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
}

/* ---------------------------
TABLE STYLES (MODAL)
---------------------------- */

.modal table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  table-layout: fixed; /* 🔒 evita expandir além do container */
  overflow-x: auto; /* 🔥 CORREÇÃO: Permite scroll horizontal na tabela se necessário */
  display: block; /* 🔥 CORREÇÃO: Necessário para overflow-x funcionar */
}

.modal th,
.modal td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: break-word; /* 🔒 força quebra */
  word-break: break-word;
}

.modal th {
  background: var(--bg-alt);
  color: var(--primary);
  font-weight: 700;
}

/* 🔥 CORREÇÃO: Media query reorganizada e corrigida */
@media (max-width: 750px) {

  .modal {
    align-items: center;
    justify-content: center;
    padding: 12px;
  }

  .modal__panel {
    width: 95%; /* 🔥 CORREÇÃO: Aumenta para aproveitar melhor a tela */
    max-width: 100%; /* 🔥 CORREÇÃO: Remove limitação de largura máxima */
    height: auto;
    max-height: 92vh;
    border-radius: 18px;
    padding: 16px;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden; /* 🔥 CORREÇÃO: Garante que não haja scroll horizontal */
  }

  /* 🔹 título menor */
  .modal__panel h2 {
    font-size: 18px;
  }

  /* 🔹 subtítulo menor */
  .modal__panel p {
    font-size: 13px;
  }

  /* 🔹 imagem menor */
  .modal__panel img {
    width: 70px;
    height: auto;
  }

  /* 🔹 tabela mais compacta */
  .modal table {
    font-size: 12px;
  }

  .modal th,
  .modal td {
    padding: 6px 8px;
  }

  /* 🔹 botão menor */
  .modal .btn--wa {
    font-size: 13px;
    padding: 10px 14px;
  }

  /* 🔥 CORREÇÃO: Remove margens extras internas */
  .modal tr {
    margin-bottom: 0; /* 🔥 CORREÇÃO: Remove margem que estava causando problemas */
  }
}

/* 🔥 CORREÇÃO: Adiciona media query para telas muito pequenas */
@media (max-width: 450px) {
  .section {
    padding: 60px 0; /* 🔥 CORREÇÃO: Reduz padding vertical */
  }
  
  .hero {
    padding: 80px 0 60px; /* 🔥 CORREÇÃO: Reduz padding vertical */
  }
  
  .grid--4 {
    grid-template-columns: 1fr; /* 🔥 CORREÇÃO: Uma coluna em telas muito pequenas */
  }
  
  .sectionTitle {
    font-size: clamp(24px, 6vw, 32px); /* 🔥 CORREÇÃO: Reduz tamanho do título */
  }
  
  .sectionDesc {
    font-size: 16px; /* 🔥 CORREÇÃO: Reduz tamanho da descrição */
  }
}
