/* ==========================================================================
   PORTAL TECHLOGIC - SISTEMA DE DESIGN CLARO COM IDENTIDADE OFICIAL E FOTOS REAIS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Paleta Oficial extraída da Logo Portal TechLogic */
  --navy-blue: #0a194f;        /* Azul Marinho "PORTAL" */
  --tech-orange: #ff5500;      /* Laranja Tech "TECHLOGIC" */
  --tech-orange-hover: #e04800;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  
  --primary: var(--navy-blue);
  --accent: var(--tech-orange);
  --accent-green: #16a34a;
  
  --text-main: #0f172a;        /* Grafite legível */
  --text-muted: #64748b;       /* Texto secundário */
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-soft: 0 4px 20px rgba(10, 25, 79, 0.06);
  --shadow-hover: 0 10px 30px rgba(255, 85, 0, 0.15);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Montserrat', 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--navy-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--tech-orange);
}

/* CONTAINER PRINCIPAL */
.container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER & NAVBAR */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border-color);
  padding: 12px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo-img {
  height: 56px;
  max-height: 56px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  color: var(--navy-blue);
  font-weight: 800;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--tech-orange);
}

.btn-ai-trigger {
  background: transparent;
  color: var(--navy-blue);
  border: none;
  padding: 0;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-ai-trigger:hover {
  color: var(--tech-orange);
}

.hero {
  background-color: #0a194f;
  display: block;
}

.hero .container {
  padding: 0;
  max-width: 100%;
}

.hero-banner-full {
  position: relative;
  width: 100%;
  height: clamp(240px, 22vw, 330px); /* Hero compacto: 240–330px no desktop */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Imagem 1920x600 (3.2:1) - preenche sem cortar o conteúdo */
  object-position: top center; /* Ancora no topo para nunca cortar o nome do portal */
  z-index: 1;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 25, 79, 0.85) 0%,
    rgba(10, 25, 79, 0.6) 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
  z-index: 2;
}

.hero-banner-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  padding: 60px 40px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 85, 0, 0.25);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 800;
  width: fit-content;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #ffffff;
}

.hero-title span {
  color: var(--tech-orange);
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin-bottom: 24px;
  font-weight: 500;
  line-height: 1.6;
}

/* BUSCA & FILTROS */
.search-section {
  margin-top: 40px; /* Descola do banner e empurra para baixo */
  margin-bottom: 20px; /* Dá um respiro antes do próximo conteúdo */
  margin-left: auto;
  margin-right: auto;
  max-width: 900px; /* Limita a largura da barra de busca */
  position: relative;
  z-index: 10;
  padding: 0 20px; /* Adiciona respiro nas laterais em telas menores */
}

.search-box {
  background: var(--bg-card);
  border: 3px solid var(--navy-blue);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 25px rgba(10, 25, 79, 0.15);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--tech-orange);
  box-shadow: 0 8px 30px rgba(255, 85, 0, 0.25);
}

.search-icon {
  font-size: 1.4rem;
  color: var(--tech-orange);
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 1.1rem;
  font-family: inherit;
  font-weight: 600;
}

.search-input::placeholder {
  color: #94a3b8;
}

.filter-pills {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.pill-btn:hover, .pill-btn.active {
  background: var(--navy-blue);
  color: #fff;
  border-color: var(--navy-blue);
}

/* SEÇÃO SOBRE O PORTAL */
.sobre-section {
  padding: 40px 0 10px;
}

.sobre-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  box-shadow: var(--shadow-soft);
}

.sobre-titulo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--navy-blue);
  margin-bottom: 14px;
}

.sobre-card p {
  margin-bottom: 12px;
  color: var(--text-main);
  line-height: 1.6;
}

.sobre-blocos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 26px;
}

.sobre-bloco {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}

.sobre-bloco:hover {
  border-color: var(--tech-orange);
  transform: translateY(-3px);
}

.sobre-bloco-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.sobre-bloco-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-blue), #1a338b);
  font-size: 3rem;
}

.sobre-bloco-texto {
  padding: 20px 22px;
}

.sobre-bloco-texto h3 {
  color: var(--navy-blue);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.sobre-bloco-texto p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.sobre-bloco-link {
  display: inline-block;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--tech-orange);
}

/* MARCAS GRID COM FOTOS REAIS */
.marcas-section {
  padding: 40px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--navy-blue);
}

.marcas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.marca-card {
  display: block;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.marca-card:hover {
  transform: translateY(-4px);
  border-color: var(--tech-orange);
  box-shadow: var(--shadow-hover);
}

.marca-img-real {
  width: 100%;
  aspect-ratio: 2.45 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  background: var(--bg-subtle);
}

.marca-nome {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--navy-blue);
}

.marca-destaque {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.marca-link-completo {
  display: block;
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--navy-blue);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.marca-link-completo .marca-link-seta {
  color: var(--tech-orange);
  font-weight: 900;
  display: inline-block;
  transition: transform 0.25s ease;
}

.marca-card:hover .marca-link-completo {
  color: var(--tech-orange);
  text-decoration-color: var(--tech-orange);
}

.marca-card:hover .marca-link-completo .marca-link-seta {
  transform: translateX(4px);
}

/* CAIXA DE RESULTADOS DA BUSCA RÁPIDA (aparece embaixo do campo, sugere a marca certa) */
.resultados-busca {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.resultados-busca.aberto {
  display: block;
}

.resultado-busca-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.resultado-busca-item:last-child { border-bottom: none; }
.resultado-busca-item:hover { background: var(--bg-subtle); }

.resultado-busca-titulo { font-weight: 700; font-size: 0.9rem; }
.resultado-busca-modelo { font-size: 0.82rem; color: var(--tech-orange); font-weight: 700; white-space: nowrap; }

.resultado-busca-vazio {
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* EQUIPAMENTOS & SANFONAS (ACCORDIONS) */
.equipamentos-section {
  padding-bottom: 60px;
}

.equipamento-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.equipamento-header {
  padding: 20px 30px;
  background: #f8fafc;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.equipamento-img-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.equipamento-info h3 {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--navy-blue);
  margin-bottom: 6px;
}

.equipamento-badges {
  display: flex;
  gap: 8px;
}

.badge {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-jato-tinta { background: #e0f2fe; color: #0284c7; }
.badge-laser { background: #dcfce7; color: #16a34a; }
.badge-matricial { background: #fef3c7; color: #d97706; }

/* FICHA TÉCNICA DO EQUIPAMENTO */
.specs-box {
  padding: 20px 30px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.spec-item {
  font-size: 0.9rem;
}

.spec-label {
  color: var(--tech-orange);
  font-weight: 800;
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  color: var(--text-main);
  font-weight: 600;
}

/* ESTRUTURA DE SANFONAS (ACCORDIONS) */
.defeitos-list {
  padding: 24px 30px;
}

.defeitos-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--navy-blue);
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.accordion-item {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  background: #ffffff;
  overflow: hidden;
  transition: var(--transition);
}

.accordion-header {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy-blue);
  background: #fff;
}

.accordion-header:hover {
  background: #f8fafc;
  color: var(--tech-orange);
}

.accordion-arrow {
  transition: transform 0.3s ease;
  color: var(--tech-orange);
  font-size: 1.2rem;
}

.accordion-item.open {
  border-color: var(--tech-orange);
  box-shadow: 0 4px 15px rgba(255, 85, 0, 0.1);
}

.accordion-item.open .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.3s ease;
  padding: 0 24px;
  background: #fafafa;
}

.accordion-item.open .accordion-content {
  padding: 24px;
  max-height: 2000px;
  border-top: 1px solid var(--border-color);
}

.sintoma-block {
  background: #fff5ed;
  border-left: 4px solid var(--tech-orange);
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #c23b00;
}

.causa-block {
  background: #f0f4ff;
  border-left: 4px solid var(--navy-blue);
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: #0a194f;
}

.solucao-steps {
  margin-bottom: 24px;
}

.solucao-steps h4 {
  margin-bottom: 12px;
  font-size: 1.05rem;
  color: #16a34a;
  font-weight: 800;
}

.steps-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.steps-list li {
  color: var(--text-main);
  font-weight: 600;
}

/* YOUTUBE EMBED WRAPPER */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  background: #000;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* CARD DE PEÇA / AFILIADO MERCADO LIVRE */
.afiliado-card {
  background: #ffffff;
  border: 2px solid #ffe600;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.afiliado-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-color);
}

.afiliado-details {
  flex: 1;
  min-width: 200px;
}

.afiliado-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: #d97706;
  text-transform: uppercase;
}

.afiliado-nome {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-blue);
  margin: 2px 0 4px;
}

.afiliado-preco {
  font-size: 1.25rem;
  font-weight: 900;
  color: #16a34a;
}

.btn-mercado-livre {
  background: #ffe600;
  color: #2d3277;
  font-weight: 900;
  padding: 12px 22px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(255, 230, 0, 0.4);
  transition: var(--transition);
}

.btn-mercado-livre:hover {
  transform: scale(1.04);
  color: #000;
  box-shadow: 0 6px 20px rgba(255, 230, 0, 0.6);
}

/* WIDGET CHAT IA */
.ai-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

.ai-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--tech-orange);
  color: #fff;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 85, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.ai-chat-toggle:hover {
  transform: scale(1.1);
}

.ai-chat-box {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 360px;
  height: 480px;
  background: var(--bg-card);
  border: 2px solid var(--navy-blue);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: var(--transition);
}

.ai-chat-box.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.chat-header {
  padding: 16px;
  background: var(--navy-blue);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.msg.ai {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.msg.user {
  background: var(--tech-orange);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-input-area {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  background: #fff;
}

.chat-input {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 14px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
}

.chat-send {
  background: var(--navy-blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

/* FOOTER */
.footer {
  background: #ffffff;
  border-top: 2px solid var(--border-color);
  padding: 40px 0 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-disclaimer {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #475569;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero-banner-full {
    height: clamp(170px, 30vw, 230px);
  }
  .hero-banner-content {
    padding: 30px 20px;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .nav-menu {
    display: none;
  }
  .ai-chat-box {
    width: calc(100vw - 32px);
    right: -10px;
  }
}

/* Home: composição ampla com os recursos originais do portal. */
.home-page .container { max-width: 1560px; padding-inline: clamp(16px, 3vw, 48px); }
.home-page .header { padding: 8px 0; border-bottom-width: 1px; }
.home-page .logo-img { display: block; height: 48px; width: auto; }
.home-page .nav-wrapper { gap: 20px; }
.home-page .nav-menu { gap: 26px; }
.home-page .nav-link, .home-page .btn-ai-trigger { font-family: inherit; font-size: .85rem; }
.home-page .nav-link.active { padding-bottom: 8px; border-bottom: 2px solid var(--tech-orange); }
.home-page .hero { background: #0a194f; }
.home-page .hero > .container { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 32px; min-height: 230px; padding-block: 22px 46px; }
.home-page .hero-copy { color: white; }
.home-page .hero-copy h1 { font-size: clamp(1.6rem, 2.5vw, 2.6rem); line-height: 1.15; letter-spacing: -.7px; font-weight: 800; }
.home-page .hero-copy h1 span { color: var(--tech-orange); }
.home-page .hero-copy p { max-width: 540px; margin-top: 14px; font-size: .94rem; line-height: 1.6; color: #e2e8f0; }
.home-page .hero-banner-full { height: auto; aspect-ratio: 3.2 / 1; border-radius: 12px; }
.home-page .hero-banner-bg { position: static; display: block; width: 100%; height: 100%; object-fit: contain; }
.home-page .search-section { max-width: 1050px; margin: -30px auto 0; padding-inline: 20px; }
.home-page .search-box { min-height: 60px; padding: 14px 20px; border-width: 2px; border-color: #c9d8e8; border-radius: 12px; }
.home-page .search-input { min-width: 0; font-size: .9rem; }
.home-page .sobre-section { padding: 24px 0 0; }
.home-page .sobre-card { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); column-gap: 32px; padding: 24px 28px; border-width: 1px; border-radius: 16px; }
.home-page .sobre-titulo { grid-column: 1; grid-row: 1; margin: 0 0 10px; font-size: clamp(1.1rem, 1.5vw, 1.4rem); }
.home-page .sobre-card p { font-size: .85rem; line-height: 1.65; color: var(--text-muted); margin: 0; }
.home-page .sobre-card p:first-of-type { grid-column: 1; grid-row: 2 / 4; }
.home-page .sobre-card p:nth-of-type(n+2) { grid-column: 2; border-left: 1px solid var(--border-color); padding-left: 24px; font-size: .78rem; }
.home-page .sobre-card p:nth-of-type(2) { grid-row: 1 / 3; padding-bottom: 12px; }
.home-page .sobre-card p:nth-of-type(3) { grid-row: 3; }
.home-page .sobre-card strong { display: block; color: var(--navy-blue); font-size: .85rem; }
.home-page .sobre-blocos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.home-page .sobre-bloco { display: grid; grid-template-columns: 44% minmax(0, 1fr); border-width: 1px; border-radius: 14px; }
.home-page .sobre-bloco-img { height: 100%; min-height: 220px; object-fit: cover; object-position: center; }
.home-page .sobre-bloco-texto { padding: 22px; display: flex; flex-direction: column; align-items: flex-start; }
.home-page .sobre-bloco-texto h3 { font-size: 1.05rem; line-height: 1.35; }
.home-page .sobre-bloco-texto p { font-size: .82rem; line-height: 1.6; }
.home-page .sobre-bloco-link { margin-top: auto; background: var(--tech-orange); color: #fff; padding: 9px 16px; border-radius: 24px; font-size: .76rem; }
.home-page .sobre-bloco-link:hover { background: var(--tech-orange-hover); }
.home-page .marcas-section { padding: 24px 0 28px; scroll-margin-top: 90px; }
.home-page .section-header { margin-bottom: 14px; }
.home-page .section-title { font-size: 1.3rem; }
.home-page .marcas-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.home-page .marca-card { min-width: 0; padding: 20px 8px 14px; border-width: 1px; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; }
.home-page .marca-img-real, .home-page .marca-destaque { display: none; }
.home-page .marca-logo-area { height: 62px; width: 100%; display: flex; align-items: center; justify-content: center; padding: 10px; margin-bottom: 10px; border-radius: 6px; }
.home-page .marca-logo-escuro { background: #142850; }
.home-page .marca-logo { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-page .marca-logo-categoria { height: 82px; padding: 0; margin-top: -10px; margin-bottom: 0; }
.home-page .marca-categoria-icone { width: 42px; height: 42px; color: var(--navy-blue); }
.home-page .marca-nome { font-size: clamp(.86rem, 1.2vw, 1.2rem); font-weight: 800; }
.home-page .marca-link-completo { font-size: .65rem; margin-top: 6px; font-weight: 500; }
.home-page .footer { padding: 20px 0; border-top-width: 1px; }
.home-page .footer-disclaimer { font-size: .73rem; padding: 14px 18px; margin-bottom: 14px; }
.home-page a:focus-visible, .home-page button:focus-visible { outline: 3px solid var(--tech-orange); outline-offset: 4px; }
@media (max-width: 1100px) {
  .home-page .marcas-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-page .sobre-bloco { grid-template-columns: 1fr; }
  .home-page .sobre-bloco-img { height: 180px; min-height: 0; }
  .home-page .sobre-bloco-texto { padding: 20px; }
}
@media (max-width: 768px) {
  .home-page .nav-wrapper { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .home-page .nav-menu { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
  .home-page .nav-link, .home-page .btn-ai-trigger { font-size: .7rem; }
  .home-page .nav-link.active { padding-bottom: 3px; }
  .home-page .logo-img { height: 40px; }
  .home-page .hero > .container { grid-template-columns: 1fr; gap: 16px; padding-block: 22px 44px; }
  .home-page .hero-copy h1 { font-size: 1.65rem; }
  .home-page .hero-copy p { font-size: .82rem; margin-top: 8px; }
  .home-page .hero-banner-full { max-width: 500px; justify-self: center; }
  .home-page .search-box { min-height: 56px; padding: 12px; gap: 8px; }
  .home-page .search-input { font-size: .8rem; }
  .home-page .sobre-card { grid-template-columns: 1fr; padding: 22px; gap: 12px; }
  .home-page .sobre-card .sobre-titulo, .home-page .sobre-card p { grid-column: auto; grid-row: auto; }
  .home-page .sobre-card p:nth-of-type(n+2) { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border-color); }
  .home-page .sobre-blocos-grid { grid-template-columns: 1fr; }
  .home-page .sobre-bloco { grid-template-columns: 38% minmax(0, 1fr); }
  .home-page .sobre-bloco-img { height: 100%; }
  .home-page .sobre-bloco-texto { padding: 18px; }
  .home-page .marcas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .home-page .sobre-bloco { grid-template-columns: 1fr; }
  .home-page .sobre-bloco-img { height: 170px; }
  .home-page .nav-menu { gap: 10px; }
}
/* Hero de oficina: imagem local, busca integrada e diferenciais. */
.home-page .hero-workshop .hero-scene {
  /* Recorte sem margens brancas; a cena acompanha a propor??o da fotografia. */
  background: linear-gradient(90deg, rgba(4,24,51,.6), rgba(4,24,51,.35) 42%, rgba(4,24,51,.06) 72%, rgba(4,24,51,.25)), url('uploads/hero-oficina-horizontal-v2.png') center / cover no-repeat;
  aspect-ratio: 2148 / 384;
  color: #fff;
}
.home-page .hero-workshop > .hero-tools {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 32px;
  min-height: 0;
  padding-block: 16px;
}
.home-page .hero-workshop .hero-copy { max-width: 560px; }
.home-page .hero-workshop .hero-copy h1 { font-size: clamp(1.7rem, 2.6vw, 2.65rem); }
.home-page .hero-workshop .hero-copy p { max-width: 510px; font-size: .88rem; margin-top: 10px; }
.home-page .hero-workshop .search-section { grid-column: 1 / -1; width: 100%; max-width: 960px; margin: 0 auto; padding: 0; }
.home-page .hero-workshop .search-box { min-height: 54px; padding: 5px 6px 5px 14px; border: 2px solid #c1d7ee; border-radius: 12px; gap: 12px; box-shadow: 0 0 0 3px #102c4e88, 0 5px 18px #071a3355; }
.home-page .hero-workshop .search-icon { display: flex; color: #163b64; flex-shrink: 0; }
.hero-workshop .search-icon svg { width: 24px; height: 24px; }
.home-page .hero-workshop .search-input { font-size: .8rem; flex: 1; }
.hero-search-button { align-self: stretch; min-width: 118px; padding: 10px 22px; border: 0; border-radius: 8px; background: #ff5500; color: #fff; font-size: .85rem; font-weight: 700; font-family: inherit; cursor: pointer; }
.hero-search-button:hover { background: #df4900; }
.hero-workshop .resultados-busca { position: absolute; top: 100%; left: 0; right: 0; max-height: 320px; overflow-y: auto; color: var(--text-main); z-index: 20; }
.hero-benefits { grid-column: 1 / -1; display: flex; justify-content: center; gap: 32px; list-style: none; font-size: .76rem; font-weight: 600; }
.hero-benefits li { display: flex; align-items: center; gap: 12px; }
.hero-benefits li + li { padding-left: 32px; border-left: 1px solid #ffffff26; }
.hero-benefits svg { width: 23px; height: 23px; flex-shrink: 0; }
@media (max-width: 900px) {
  .home-page .hero-workshop > .hero-tools { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .hero-benefits { gap: 18px; font-size: .66rem; }
  .hero-benefits li + li { padding-left: 18px; }
}
@media (max-width: 600px) {
  .home-page .hero-workshop .hero-scene { background-position: center, 65% 49%; }
  .home-page .hero-workshop > .hero-tools { grid-template-columns: 1fr; padding-block: 24px 20px; gap: 20px; }
  .home-page .hero-workshop .search-box { gap: 8px; padding-left: 10px; }
  .hero-search-button { min-width: 72px; padding: 10px; font-size: .75rem; }
  .hero-benefits { flex-direction: column; gap: 12px; font-size: .72rem; }
  .hero-benefits li + li { border-left: 0; padding-left: 0; }
  .hero-benefits svg { width: 20px; height: 20px; }
}

/* ==========================================================================
   HOME MOBILE (AJUSTE FINAL — somente a home .home-root)
   Regras adicionadas ao final para prevalecer sobre reskins anteriores.
   O desktop (acima de 768px) não é alterado.
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Menu/navegação superior some no celular; fica apenas a barra inferior. */
  .home-root .header {
    display: none !important;
  }


  /* 2. Hero e busca com largura adequada, sem sobreposição. */
  .home-root .hero-workshop > .hero-tools {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-block: 20px 16px;
    min-height: 0;
  }
  .home-root .hero-workshop .hero-copy {
    max-width: 100%;
  }
  .home-root .hero-workshop .hero-copy h1 {
    font-size: clamp(1.45rem, 6vw, 1.9rem);
    line-height: 1.2;
  }
  .home-root .hero-workshop .hero-copy p {
    max-width: 100%;
    font-size: 0.86rem;
    line-height: 1.55;
    margin-top: 8px;
  }
  .home-root .hero-workshop .search-section {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .home-root .hero-workshop .search-box {
    min-height: 52px;
    padding: 6px 8px 6px 12px;
    gap: 8px;
  }
  .hero-workshop .search-icon svg {
    width: 20px;
    height: 20px;
  }
  .home-root .hero-workshop .search-input {
    font-size: 0.82rem;
    min-width: 0;
  }
  .hero-search-button {
    min-width: 96px;
    padding: 8px 14px;
    font-size: 0.78rem;
  }
  .home-root .hero-workshop .resultados-busca {
    max-height: 240px;
  }

  /* 3. Institucional em 1 coluna, empilhado e sem divisão lateral estreita. */
  .home-root .sobre-section {
    padding: 16px 0 4px;
  }
  .home-root .sobre-card {
    display: block;
    padding: 22px 20px;
  }
  .home-root .sobre-titulo {
    font-size: 1.28rem;
    line-height: 1.32;
    margin: 0 0 12px;
  }
  .home-root .sobre-card p {
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
  }
  .home-root .sobre-card p:nth-of-type(n+2) {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
  }

  /* 4. Blocos/cards com imagem: empilhados em largura total. */
  .home-root .sobre-blocos-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
  }
  .home-root .sobre-bloco {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-root .sobre-bloco-img {
    width: 100%;
    height: 190px;
    min-height: 0;
    object-fit: cover;
    object-position: center;
  }
  .home-root .sobre-bloco-texto {
    padding: 18px 18px 20px;
  }
  .home-root .sobre-bloco-texto h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
  }
  .home-root .sobre-bloco-texto p {
    margin-bottom: 12px;
    line-height: 1.6;
  }
  .home-root .sobre-bloco-link {
    margin-top: 2px;
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  /* 5. Marcas: grade de 2 colunas equilibrada; imagens sem deformar. */
  .home-root .marcas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .home-root .marca-card {
    padding: 12px 10px;
  }
  .home-root .marca-img-real {
    aspect-ratio: 2.45 / 1;
    object-fit: cover;
    margin-bottom: 8px;
  }
  .home-root .section-title {
    font-size: 1.35rem;
  }
  .home-root .section-header p {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  /* Busca: botão ganha a própria linha para toque confortável e input amplo. */
  .home-root .hero-workshop .search-box {
    flex-wrap: wrap;
    padding: 10px;
    gap: 8px;
  }
  .home-root .hero-workshop .search-input {
    flex: 1 1 150px;
    min-width: 0;
  }
  .hero-search-button {
    flex: 1 1 100%;
    min-width: 0;
    padding: 11px 14px;
    font-size: 0.82rem;
  }
  .home-root .hero-workshop .hero-copy h1 {
    font-size: clamp(1.3rem, 7vw, 1.55rem);
  }
  .home-root .hero-workshop .hero-copy p {
    font-size: 0.82rem;
  }
  .home-root .sobre-bloco-img {
    height: 170px;
  }
}

/* Busca abaixo da cena: mantém a impressora livre em todas as larguras. */
.home-page .hero-workshop { background: #0b2445; color: #fff; }
.hero-scene > .container { min-height: 230px; padding-block: 30px; display: flex; align-items: center; }
@media (max-width: 768px) {
  .hero-scene > .container { min-height: 280px; padding-block: 20px; align-items: flex-start; }
  .ai-chat-toggle { display: none; }
  .ai-chat-widget { right: 16px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); z-index: 1100; }
  .ai-chat-box { right: 0; bottom: 0; width: calc(100vw - 32px); max-width: 360px; height: min(480px, calc(100dvh - 96px - env(safe-area-inset-bottom, 0px))); }
}

/* Homepage: sete marcas equilibradas em desktop amplo, sem ampliar outras seções. */
@media (min-width: 1440px) {
  .home-root .marcas-section > .container { max-width: 1800px; }
  .home-root .marcas-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
/* Categorias de impressoras usam a mesma área de imagem das marcas. */
.home-root .marca-logo-area.marca-logo-categoria {
  height: 62px;
  padding: 10px;
  margin-top: 0;
  margin-bottom: 10px;
}
.home-root .marca-logo {
  object-fit: contain;
  object-position: center;
}

/* Logos da homepage: fontes existentes, nomes e grade preservados. */
.home-root .marca-logo-area:not(.marca-logo-categoria) .marca-logo {
  max-width: 130px;
}
.home-root .marca-logo-area.marca-logo-termica {
  padding: 0 10px;
}
.home-root .marca-logo-termica .marca-logo {
  width: auto;
  max-width: 100%;
  height: 62px;
}

/* Somente Matriciais: aproveita a área existente sem mudar tamanho do card. */
.home-root .marca-logo-area.marca-logo-matricial {
  padding: 0;
}
.home-root .marca-logo-matricial .marca-logo {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
}
