/* =====================================================================
   REPRESENTANTES — mapa do Brasil clicável por estado (desktop) e lista
   suspensa (celular). O estado escolhido "acende"; o painel ao lado
   mostra o representante da região ou os contatos da fábrica.
   Usado só em representantes.html.
   ===================================================================== */
.representantes{
  padding: 0 0 var(--secao);
  background: var(--aluminio);
}

.representantes-head{
  max-width: 680px;
  margin-bottom: var(--s-4);
}
.representantes-head .kicker{ margin-bottom: var(--s-1); }
.representantes-head h1{
  font-size: var(--fs-h2);
  font-weight: 380;
  line-height: 1.02;
  letter-spacing: -.025em;
  margin-bottom: var(--s-2);
}
.representantes-head p{
  font-size: 18px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--tinta);
  max-width: 52ch;
  margin: 0;
}

.representantes-body{
  display: grid;
  gap: var(--s-4);
  align-items: start;
}

/* ---------- mapa (desktop) ---------- */
.map-wrap{ display: none; }
.map-wrap svg{ width: 100%; height: auto; display: block; overflow: visible; }

.map-wrap .estado{ outline: none; }
/* verde sólido (não opacidade): alguns estados do SVG se sobrepõem nas
   bordas e a transparência somada deixava manchas escuras */
.map-wrap .estado path{
  fill: #3A5950;
  stroke: var(--papel);
  stroke-width: 1.2;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill var(--t-rapido) var(--ease), filter var(--t-medio) var(--ease);
}
.map-wrap .estado:hover path,
.map-wrap .estado:focus-visible path{ fill: var(--verde); }
.map-wrap .estado:focus-visible path{ stroke: var(--luz); stroke-width: 2; }
.map-wrap .estado.is-selected path{
  fill: var(--luz);
  filter: drop-shadow(0 0 6px rgba(246,176,79,.9));
}

.map-wrap .estado text{
  fill: var(--papel);
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .02em;
  pointer-events: none;
  transition: fill var(--t-rapido) var(--ease);
}
.map-wrap .estado.is-selected text{ fill: var(--verde); }

/* ---------- lista suspensa (celular) ---------- */
.rep-mobile-select{ margin-bottom: var(--s-3); }
.rep-mobile-select select{
  width: 100%;
  min-height: 52px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--tinta);
  background-color: var(--papel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2358616B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  border: 1px solid var(--linha-forte);
  border-radius: var(--r-sm);
  padding: 14px 44px 14px 16px;
  box-shadow: var(--sombra-1);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.rep-mobile-select select:focus{
  outline: none;
  border-color: var(--verde);
  box-shadow: 0 0 0 4px rgba(24,60,50,.14);
}

/* ---------- painel de contato ---------- */
.rep-panel{
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  min-height: 320px;
  padding: var(--s-4);
  background: var(--papel);
  border-radius: var(--r-lg);
  box-shadow: 0 0 0 1px var(--linha), var(--sombra-3);
}

.rep-panel .rep-empty{
  margin: auto 0;
  max-width: 30ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--tinta-2);
}
.rep-panel .rep-empty::before{
  content: "";
  display: block;
  width: 48px; height: 48px;
  margin-bottom: var(--s-2);
  border-radius: var(--r-sm);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E2328' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.3'/%3E%3C/svg%3E") center / 24px no-repeat,
    linear-gradient(160deg, #F8F9FA 0%, #DCE0E4 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(20,35,32,.08), 0 1px 2px rgba(20,35,32,.10);
}

.rep-panel .rep-eyebrow{
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.3;
  color: var(--ouro);
}
.rep-panel h3{
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.rep-panel .rep-city{
  margin-top: -8px;
  font-size: 15px;
  color: var(--tinta-2);
}
.rep-panel .rep-fallback-note{
  margin: 0;
  padding: 14px var(--s-2);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--tinta);
  background: rgba(246,176,79,.14);
  border-radius: var(--r-sm);
}

.rep-contacts{
  display: grid;
  gap: 4px;
  margin-top: var(--s-1);
  padding-top: var(--s-2);
  border-top: 1px solid var(--linha);
}
.rep-contact-row{
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0 -10px;
  padding: 10px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--tinta);
  text-decoration: none;
  transition: background var(--t-rapido) var(--ease);
}
.rep-contact-row:hover{ background: var(--aluminio); }
.rep-contact-row svg{
  box-sizing: content-box;
  width: 18px; height: 18px;
  padding: 10px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--aluminio);
  stroke: var(--verde);
  color: var(--verde);
  transition: background var(--t-rapido) var(--ease), stroke var(--t-rapido) var(--ease), color var(--t-rapido) var(--ease);
}
.rep-contact-row:hover svg{ background: var(--verde); stroke: var(--luz); color: var(--luz); }

@media (min-width: 861px){
  .representantes-body{
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: var(--s-5);
  }
  .map-wrap{
    display: block;
    padding: var(--s-5);
    background: var(--papel);
    border-radius: var(--r-lg);
    box-shadow: 0 0 0 1px var(--linha), var(--sombra-2);
  }
  .rep-mobile-select{ display: none; }
  .rep-panel{
    position: sticky;
    top: calc(var(--nav-h) + var(--s-3));
    padding: var(--s-5);
  }
}
