/* FAVA Industrial — cores da marca */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@500;600;700;800&display=swap');

:root {
  --color-primary: #FBAD18;
  --color-primary-hover: #e09a10;
  --color-header: #303030;
  --color-dark: #303030;
  --color-text: #333333;
  --color-muted: #666666;
  --color-light: #f5f6f8;
  --color-white: #ffffff;
  --color-border: #e5e7eb;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Montserrat', 'Inter', sans-serif;
  --max-width: 1200px;
  --radius: 5px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
}

h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin: 2rem 0 1rem; color: var(--color-dark); }
h3 { font-size: 1.125rem; margin: 0 0 0.5rem; }

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* ===== HEADER (idêntico ao site original) ===== */
.site-header-wrap {
  background: var(--color-header);
  position: sticky;
  top: 0;
  z-index: 200;
}

.top-bar {
  background: var(--color-header);
  color: var(--color-white);
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.top-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

.top-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-white);
  font-weight: 500;
}

.top-contacts a:hover { color: var(--color-primary); }

.top-contacts svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

.social-icons {
  display: flex;
  gap: 1.125rem;
  align-items: center;
}

.social-icons a {
  color: var(--color-white);
  display: flex;
  align-items: center;
}

.social-icons a:hover { color: var(--color-primary); }

.social-icons svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.site-header {
  background: var(--color-header);
  padding: 0 0 0.75rem;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  background: var(--color-header);
  border-radius: 15px;
  padding: 1rem 1.25rem;
}

.logo img { width: 200px; max-width: 100%; height: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.mobile-nav-cta { display: none; }

.main-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

.main-nav > ul > li { position: relative; }

.main-nav > ul > li > a {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
  color: var(--color-primary);
}

.has-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.has-dropdown:hover .submenu,
.has-dropdown.open .submenu,
.has-dropdown:focus-within .submenu { display: block; }

/* Ponte invisível entre o menu e o dropdown — evita sumir ao mover o mouse */
.has-dropdown .submenu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--color-header);
  border-radius: var(--radius);
  padding: 0.5rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 300;
  list-style: none;
  margin: 0;
}

.submenu li { border-bottom: 1px solid rgba(135,135,135,0.15); }
.submenu li:last-child { border-bottom: none; }

.submenu a {
  display: block;
  padding: 0.85rem 1.25rem;
  color: var(--color-white);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.btn-cta {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white) !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background var(--transition);
}

.btn-cta:hover {
  background: var(--color-primary-hover);
  color: var(--color-white) !important;
}

.btn-cta-block {
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

/* ===== HERO + CARROSSEL (home) ===== */
.hero-banner {
  background: var(--color-primary);
  padding: 2rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-text h1 {
  color: var(--color-dark);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-bottom: 1rem;
}

.hero-text p {
  color: var(--color-dark);
  font-size: 1rem;
  margin: 0 0 1.5rem;
  opacity: 0.9;
}

.btn-hero {
  display: inline-block;
  background: var(--color-header);
  color: var(--color-white) !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-transform: uppercase;
}

.btn-hero:hover {
  background: #1a1a1a;
  color: var(--color-white) !important;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.15);
  min-height: 320px;
}

.carousel-track {
  display: flex;
  transition: transform 1s ease;
}

.carousel-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.carousel-slide img {
  max-height: 400px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* ===== Botões gerais ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary {
  background: #25d366;
  color: var(--color-white) !important;
}

.btn-primary:hover {
  background: #1da851;
  color: var(--color-white) !important;
}

.btn-secondary {
  background: var(--color-primary);
  color: var(--color-dark) !important;
}

.btn-secondary:hover {
  background: var(--color-primary-hover);
}

/* Page hero interno */
.page-hero {
  background: var(--color-light);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 { margin: 0; color: var(--color-dark); }

/* Sections */
.section { padding: 3rem 0; }
.section-alt { background: var(--color-light); }

.intro-text {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.product-card > a:first-child {
  display: block;
}

.product-card-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-light);
  padding: 0.75rem;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.product-card-body { padding: 1.25rem; }
.product-card h3 a { color: var(--color-dark); }
.product-card h3 a:hover { color: var(--color-primary-hover); }

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow);
}

.feature-card h3 { color: var(--color-primary-hover); margin-top: 0; }

/* Product page */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Product page — carrossel de imagens */
.product-carousel {
  position: relative;
  background: var(--color-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product-carousel-viewport {
  overflow: hidden;
}

.product-carousel .carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.product-carousel .carousel-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 1rem;
}

.product-carousel .carousel-slide img {
  max-height: 340px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
  box-shadow: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(48, 48, 48, 0.75);
  color: var(--color-white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.carousel-btn:hover {
  background: var(--color-primary);
  color: var(--color-dark);
}

.carousel-btn.prev { left: 0.75rem; }
.carousel-btn.next { right: 0.75rem; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--color-light);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
  padding: 0;
}

.carousel-dot.active { background: var(--color-primary); }

.product-technical {
  margin-top: 1rem;
}

.product-technical img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-gallery img {
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.product-content ul { padding-left: 1.25rem; }
.product-content li { margin-bottom: 0.5rem; }

.related-products {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.related-products a {
  padding: 0.4rem 0.9rem;
  background: var(--color-light);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-dark);
}

.related-products a:hover { background: var(--color-primary); }

.cta-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--color-header);
  color: var(--color-white);
  border-radius: var(--radius);
  text-align: center;
}

.cta-box a { color: var(--color-primary); font-weight: 600; }
.cta-box a:hover { color: var(--color-white); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
}

.contact-info ul { list-style: none; padding: 0; margin: 0; }

.contact-info li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-error {
  background: #fef2f2;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

/* About */
.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

/* Footer */
.site-footer {
  background: var(--color-header);
  color: rgba(255,255,255,0.85);
  padding: 2.5rem 0 1rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h4 { color: var(--color-primary); margin-top: 0; }
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--color-primary); }

.social-links { display: flex; gap: 1rem; margin-top: 0.75rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  font-size: 0.875rem;
  text-align: center;
  color: rgba(255,255,255,0.6);
}

/* WhatsApp float */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  transition: transform var(--transition);
}

.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 28px; height: 28px; fill: white; }

/* 404 */
.error-page { text-align: center; padding: 5rem 1rem; }
.error-page h1 { font-size: 4rem; color: var(--color-primary); }

/* Responsive — mobile e tablet */
body.nav-open { overflow: hidden; }

@media (max-width: 1024px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    position: relative;
    align-items: center;
  }

  .header-cta { display: none; }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 400;
    background: var(--color-header);
    padding: 0.75rem 0 1rem;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    max-height: calc(100dvh - 7rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.open { display: block; }

  .mobile-nav-cta {
    display: block;
    margin: 0.75rem 0 0;
    padding: 1rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .main-nav > ul > li { width: 100%; }

  .main-nav > ul > li > a {
    display: block;
    padding: 0.9rem 0;
    min-height: 44px;
    white-space: normal;
  }

  .submenu {
    position: static;
    box-shadow: none;
    padding: 0 0 0.5rem 1rem;
    background: transparent;
    min-width: 0;
  }

  .has-dropdown .submenu::before { display: none; }

  .has-dropdown:not(.open) .submenu,
  .has-dropdown:hover .submenu,
  .has-dropdown:focus-within .submenu { display: none; }

  .has-dropdown.open .submenu { display: block; }

  .has-dropdown > a::after { float: right; margin-top: 10px; }

  .submenu a {
    padding: 0.65rem 0;
    min-height: 44px;
    font-size: 0.875rem;
  }

  .site-header { position: relative; }

  .hero-grid,
  .product-layout,
  .contact-grid,
  .mission-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid { gap: 1.5rem; }

  .hero-carousel { min-height: 260px; }

  .product-carousel .carousel-slide { min-height: 280px; }

  .top-bar .container {
    justify-content: center;
    text-align: center;
  }

  .top-contacts {
    justify-content: center;
    gap: 0.75rem 1.25rem;
  }

  .section { padding: 2.5rem 0; }

  .footer-grid { gap: 1.5rem; }
}

@media (max-width: 768px) {
  .logo img { width: 160px; }

  .hero-banner { padding: 1.5rem 0; }

  .hero-text { text-align: center; }

  .hero-text .btn-hero { width: 100%; text-align: center; box-sizing: border-box; }

  .intro-text {
    font-size: 1rem;
    text-align: left;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .product-card-body { padding: 1rem; }

  .product-card h3 { font-size: 1rem; }

  .product-card .btn { width: 100%; justify-content: center; box-sizing: border-box; }

  .features-grid { grid-template-columns: 1fr; }

  .page-hero { padding: 2rem 0; }

  .carousel-btn {
    width: 44px;
    height: 44px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
  }

  .social-icons { gap: 0.875rem; }

  .top-bar { font-size: 0.8125rem; }

  .footer-bottom { font-size: 0.8125rem; padding-inline: 0.5rem; }
}

@media (max-width: 480px) {
  .container { width: min(100% - 1.25rem, var(--max-width)); }

  .top-bar .container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .top-contacts {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }

  .social-icons { justify-content: center; }

  .header-inner { padding: 0.75rem 1rem; }

  .hero-text h1 { font-size: 1.35rem; }

  .hero-carousel { min-height: 220px; }

  .carousel-slide img { max-height: 280px; }

  .product-grid { grid-template-columns: 1fr; }

  .product-card-image { height: 180px; }

  .related-products a {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .cta-box { padding: 1.25rem 1rem; }

  .whatsapp-float {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
    width: 52px;
    height: 52px;
  }

  .site-footer { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
}
