/* ===========================================================
   AMG Peças — Importadora e Distribuidora de Autopeças
   Folha de estilo principal — identidade visual oficial
   Cores: laranja #E46A25 / azul #1B2755 (Manual de Identidade AMG)
   =========================================================== */

:root {
  --navy:        #1b2755;
  --navy-dark:   #131c3f;
  --navy-soft:   #25315f;
  --orange:      #e46a25;
  --orange-dark: #c4571a;
  --cream:       #fbf1ea;
  --soft:        #efe7e3;
  --heading:     #1b2755;
  --text:        #3c4150;
  --text-light:  #6b7180;
  --white:       #ffffff;
  --line:        #e3dcd5;
  --radius:      14px;
  --shadow-sm:   0 4px 16px rgba(27, 39, 85, .08);
  --shadow-md:   0 14px 38px rgba(27, 39, 85, .15);
  --maxw:        1180px;
  --font:        "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 116px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--font); color: var(--heading); line-height: 1.18; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }

.kicker {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: .55rem;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .01em;
  padding: .85rem 1.9rem;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(228,106,37,.38); }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--heading); }
.btn-ghost:hover { background: var(--heading); color: var(--white); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #d6dcec; font-size: .82rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 16px; }
.topbar-phone { display: inline-flex; align-items: center; gap: .45rem; color: #fff; font-weight: 600; }
.topbar-phone:hover { color: var(--orange); }

.lang-switch { display: inline-flex; align-items: center; gap: 6px; }
.lang-globe { color: #aab2cc; }
.lang-btn {
  background: none; border: 0; cursor: pointer;
  font-family: var(--font); font-size: .82rem; font-weight: 700;
  color: #aab2cc; padding: 2px 4px; letter-spacing: .04em;
  transition: color .18s ease;
}
.lang-btn:hover { color: #fff; }
.lang-btn.active { color: var(--orange); }
.lang-sep { color: #5a648a; font-size: .8rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,241,234,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 22px rgba(27,39,85,.12); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }

.brand { display: flex; align-items: center; }
.logo-img { height: 46px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 1.55rem; }
.main-nav a {
  font-size: .89rem;
  font-weight: 600;
  color: var(--heading);
  padding: .35rem 0;
  position: relative;
  transition: color .2s ease;
}
.main-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width .25s ease;
}
.main-nav a:not(.nav-cta):hover { color: var(--orange); }
.main-nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--orange);
  color: #fff !important;
  padding: .55rem 1.35rem !important;
  border-radius: 50px;
  transition: background .2s ease;
}
.nav-cta:hover { background: var(--orange-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: var(--navy);
  border-radius: 3px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Navegação flutuante lateral (dot-nav) ---------- */
.dot-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.dot {
  position: relative;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  background: transparent;
  display: block;
  transition: background .2s ease, transform .2s ease;
}
.dot:hover { background: var(--orange); }
.dot.active {
  background: var(--orange);
  transform: scale(1.45);
}
.dot-label {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--navy);
  color: #fff;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 5px 11px;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.dot-label::after {
  content: "";
  position: absolute;
  right: -5px; top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--navy);
}
.dot:hover .dot-label { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 82% 18%, rgba(228,106,37,.10), transparent 55%),
    var(--cream);
  padding: 72px 0 92px;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero-eyebrow {
  font-size: .9rem; font-weight: 700; color: var(--orange);
  letter-spacing: .03em; margin-bottom: .8rem; text-transform: uppercase;
}
.hero-text h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.1rem;
}
.hero-text h1 span { color: var(--orange); }
.hero-lead {
  font-size: 1.06rem;
  color: var(--text);
  max-width: 30rem;
  margin-bottom: 1.8rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Colagem de círculos do hero — largura explícita garante o aspect-ratio */
.hero-collage {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1 / 1;
  margin: 0 0 0 auto;
}
.hero-collage .circle {
  position: absolute;
  border-radius: 50%;
  background-color: #dfe6ef;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  border: 6px solid #fff;
}
.circle.c1 { width: 56%; height: 56%; top: 0; left: 7%;   background-image: url("../img/hero-c1.jpg"); }
.circle.c2 { width: 50%; height: 50%; top: 5%; right: 0;  background-image: url("../img/hero-c2.jpg"); }
.circle.c3 { width: 45%; height: 45%; bottom: 2%; left: 1%; background-image: url("../img/hero-c3.jpg"); }
.circle.c4 { width: 57%; height: 57%; bottom: 0; right: 3%; background-image: url("../img/hero-c4.jpg"); }

/* ---------- Seções genéricas ---------- */
.section { padding: 84px 0; }
.section-light  { background: var(--cream); }
.section-soft   { background: var(--soft); }
.section-blue   { background: var(--navy); }
.section-contact{ background: var(--soft); }

.section-blue h2, .section-blue h3 { color: #fff; }
.section-blue .section-sub-light { color: #c5cee4; }

.section-head { text-align: center; max-width: 660px; margin: 0 auto 56px; }
.section-head h2 { position: relative; padding-bottom: 18px; }
.section-head h2::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 64px; height: 4px;
  background: var(--orange);
  border-radius: 3px;
}
.section-sub { color: var(--text-light); margin-top: 1rem; font-size: 1rem; }

/* ---------- Split (sobre / missão) ---------- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.split-reverse .split-media { order: 2; }
.split-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}
.split-body h2 { margin-bottom: 1rem; }
.split-body p { margin-bottom: 1rem; }
.split-body p:last-child { margin-bottom: 0; }
.section-blue .split-body p { color: #d3dbef; }
.section-blue .split-body strong { color: #fff; }

/* ---------- Objetivos ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.goal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 38px 30px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--orange);
  transition: transform .2s ease, box-shadow .2s ease;
}
.goal-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.goal-icon {
  width: 58px; height: 58px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.goal-icon svg { width: 28px; height: 28px; }
.goal-card h3 { margin-bottom: .6rem; }
.goal-card p { color: var(--text-light); font-size: .95rem; }

/* ---------- Fornecedores ---------- */
.suppliers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.supplier-logo {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  height: 130px;
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.supplier-logo:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.supplier-logo img { max-height: 86px; max-width: 100%; width: auto; object-fit: contain; }

/* ---------- Produtos ---------- */
.cards-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.product-img { aspect-ratio: 4 / 3; overflow: hidden; background: #f0f0f0; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-img img { transform: scale(1.07); }
.product-card h3 { color: var(--orange); font-size: 1.02rem; padding: 16px 18px 0; }
.product-card p { color: var(--text-light); font-size: .86rem; padding: 4px 18px 20px; }

/* ---------- Contato ---------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; }
.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: .84rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: .35rem;
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--text);
  padding: .8rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fbfafa;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(228,106,37,.16);
}
.field textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; font-size: .9rem; font-weight: 600; text-align: center; min-height: 1.2em; }
.form-status.ok  { color: #1c7c3a; }
.form-status.err { color: #c0392b; }

.contact-info { display: flex; flex-direction: column; gap: 22px; }
.branch {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--navy);
  color: #d3dbef;
  border-radius: var(--radius);
  padding: 30px 30px;
}
.branch h3 {
  color: var(--orange);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.branch-name { color: #fff; font-weight: 600; font-size: .96rem; margin-bottom: 1rem; }
.branch ul { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.branch li { display: flex; align-items: flex-start; gap: .65rem; font-size: .9rem; }
.branch li svg { color: var(--orange); flex-shrink: 0; margin-top: 2px; }
.branch li a:hover { color: var(--orange); }

/* ---------- Mapa das unidades ---------- */
.contact-maps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}
.map-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 15px 20px;
  color: var(--heading);
  font-size: .9rem;
}
.map-label svg { color: var(--orange); flex-shrink: 0; }
.map-label strong { font-weight: 700; }
.map-label span { color: var(--text-light); font-size: .82rem; }
.map-embed {
  position: relative;
  height: 290px;
  border-top: 1px solid var(--line);
}
.map-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.map-consent {
  position: absolute;
  inset: 0;
  background: #eef0f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
.map-consent p { font-size: .85rem; color: var(--text-light); max-width: 320px; }
.map-card.maps-on .map-consent { display: none; }
.map-allow { padding: .6rem 1.5rem; font-size: .85rem; }

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 200;
  background: var(--navy);
  color: #d3dbef;
  border-radius: var(--radius);
  box-shadow: 0 14px 44px rgba(0,0,0,.32);
  padding: 20px 26px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.cookie-banner[hidden] { display: none; }
.cookie-text { font-size: .88rem; flex: 1; min-width: 250px; line-height: 1.55; }
.cookie-text a { color: var(--orange); text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-banner .btn { padding: .65rem 1.5rem; font-size: .85rem; }
.cookie-banner .btn-ghost { color: #fff; border-color: #5a648a; }
.cookie-banner .btn-ghost:hover { background: #fff; color: var(--navy); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3c9d8; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; padding: 40px 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 18px; max-width: 470px; }
.footer-logo { height: 40px; width: auto; }
.footer-brand p { font-size: .87rem; }
.footer-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-nav a { font-size: .88rem; font-weight: 600; }
.footer-nav a:hover { color: var(--orange); }
.footer-bottom { background: rgba(0,0,0,.22); padding: 16px 0; }
.footer-bottom p { font-size: .8rem; text-align: center; color: #aab0c2; }

/* ---------- Animação de entrada ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===========================================================
   Responsivo
   =========================================================== */
@media (max-width: 1280px) {
  .dot-nav { right: 14px; }
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-collage { max-width: 380px; margin: 0 auto; }
  .hero-text { text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .split { grid-template-columns: 1fr; gap: 34px; }
  .split-reverse .split-media { order: 0; }
  .cards-5 { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .dot-nav { display: none; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 122px; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 122px; right: 0;
    width: min(78vw, 320px);
    height: calc(100vh - 122px);
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px;
    box-shadow: -10px 0 30px rgba(27,39,85,.16);
    transform: translateX(110%);
    transition: transform .3s ease;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: .9rem .4rem; border-bottom: 1px solid var(--line); }
  .nav-cta { text-align: center; margin-top: 12px; }
  .cards-3, .cards-5 { grid-template-columns: 1fr; }
  .contact-maps { grid-template-columns: 1fr; }
  .suppliers { grid-template-columns: repeat(2, 1fr); }
  .cookie-actions { width: 100%; }
  .cookie-banner .btn { flex: 1; }
  .section { padding: 60px 0; }
  .contact-form { padding: 26px; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-brand { flex-direction: column; gap: 12px; }
}

@media (max-width: 460px) {
  .container { padding: 0 16px; }
  .logo-img { height: 38px; }
  .suppliers { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
