/* ==========================================================================
   Exata Atacado — estilos do site
   ========================================================================== */

:root {
  --primary: #c50000;
  --primary-dark: #9e0000;
  --dark: #212121;
  --text: #4a4a4a;
  --muted: #777;
  --light: #f3f3f3;
  --white: #fff;
  --border: #e5e5e5;

  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --header-h: 90px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

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

.section {
  padding: 80px 0;
}

.section--light {
  background: var(--light);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--primary);
  color: var(--white);
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  color: var(--white);
}

/* Títulos de seção (borda vermelha à esquerda, identidade do site)
   -------------------------------------------------------------------------- */
.section-title {
  border-left: 5px solid var(--primary);
  padding-left: 16px;
  margin-bottom: 48px;
  max-width: 640px;
}

.section-title h1,
.section-title h2 {
  color: var(--primary);
  text-transform: uppercase;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0;
}

.section-title p {
  margin-top: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark);
}

/* Botões
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

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

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--outline:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--primary);
}

.btn--whatsapp {
  background: #25d366;
  border-color: #25d366;
}

.btn--whatsapp:hover {
  background: #1da851;
  border-color: #1da851;
}

/* Topbar
   -------------------------------------------------------------------------- */
.topbar {
  display: none;
  border-bottom: 1px solid var(--border);
}

.topbar__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 8px;
  border-left: 1px solid var(--border);
}

.topbar__item:first-child {
  border-left: 0;
}

.topbar__item > i {
  font-size: 1.6rem;
  color: var(--primary);
}

.topbar__label {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--dark);
}

.topbar__item a,
.topbar__item span:not(.topbar__label) {
  color: var(--text);
  font-size: 0.85rem;
  white-space: nowrap;
}

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

@media (min-width: 992px) {
  .topbar {
    display: block;
  }
}

/* Header / navegação
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  max-width: none;
  padding-left: 24px;
  padding-right: 0;
}

.header__logo img {
  height: 60px;
  width: auto;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  margin-right: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--dark);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow);
}

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

.nav__list {
  margin: 0;
  padding: 8px 16px 16px;
  list-style: none;
}

.nav__link {
  position: relative;
  display: block;
  padding: 12px 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  color: var(--dark);
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--primary);
}

.nav__link--shop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
}

.nav__link--shop:hover {
  background: var(--primary-dark);
  color: var(--white);
}

@media (min-width: 992px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    display: block;
    border: 0;
    box-shadow: none;
    align-self: stretch;
  }

  .nav__list {
    display: flex;
    align-items: stretch;
    height: 100%;
    padding: 0;
  }

  .nav__list li {
    display: flex;
  }

  .nav__link {
    display: flex;
    align-items: center;
    margin-left: 32px;
    padding: 0;
  }

  /* Barra vermelha que cresce no hover / página ativa */
  .nav__link:not(.nav__link--shop)::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 0;
    height: 7px;
    background: var(--primary);
    transition: width 0.4s, left 0.4s;
  }

  .nav__link:hover::before,
  .nav__link[aria-current="page"]::before {
    left: 0;
    width: 100%;
  }

  .nav__link--shop {
    margin: 0 0 0 48px;
    padding: 0 40px;
    border-radius: 0;
  }
}

/* Hero (página inicial)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
  padding: 80px 0;
  color: var(--white);
  background: var(--dark) url("../img/exata.jpg") center / cover no-repeat;
  background-image: image-set(url("../img/exata.webp") type("image/webp"), url("../img/exata.jpg") type("image/jpeg"));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.hero .container {
  position: relative;
}

.hero__content {
  max-width: 640px;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-transform: uppercase;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.88);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Sobre (imagem + abas missão/visão)
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  gap: 48px;
}

.about__media {
  min-height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
}

.about__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__intro {
  margin-bottom: 32px;
}

@media (min-width: 992px) {
  .about {
    grid-template-columns: 5fr 7fr;
  }

  .about__media {
    min-height: 500px;
  }
}

/* Painéis empilhados na mesma célula: a caixa fica com a altura do maior
   texto e não "pula" ao trocar de aba */
.tabs {
  display: grid;
  background: var(--light);
  padding: 24px;
  border-radius: var(--radius);
}

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

.tabs__tab {
  padding: 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

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

.tabs__tab[aria-selected="true"] {
  background: var(--primary);
  color: var(--white);
}

.tabs__panel {
  grid-row: 2;
  grid-column: 1;
}

.tabs__panel[hidden] {
  display: block;
  visibility: hidden;
}

/* Cards "Quem somos"
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

.card {
  padding: 32px;
  background: var(--light);
  border-radius: var(--radius);
  transition: transform 0.25s, box-shadow 0.25s;
}

.section--light .card {
  background: var(--white);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 1.5rem;
}

.card h3 {
  border-left: 5px solid var(--dark);
  padding-left: 10px;
  font-size: 1.1rem;
  text-transform: uppercase;
}

/* Marcas — faixa rolando (página inicial)
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  gap: 24px;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: marquee 45s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    transform: translateX(calc(-50% - 12px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
  }

  .marquee__track [aria-hidden="true"] {
    display: none;
  }
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 140px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.75;
  transition: filter 0.3s, opacity 0.3s;
}

.brand:hover img {
  filter: none;
  opacity: 1;
}

.section-cta {
  margin-top: 40px;
  text-align: center;
}

/* Marcas — grade completa
   -------------------------------------------------------------------------- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brand-grid .brand {
  width: auto;
}

@media (min-width: 768px) {
  .brand-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
  }
}

/* Faixa de chamada (CTA)
   -------------------------------------------------------------------------- */
.cta {
  padding: 64px 0;
  background: var(--primary);
  color: var(--white);
}

.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta h2 {
  color: var(--white);
  text-transform: uppercase;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 4px;
}

.cta p {
  color: rgba(255, 255, 255, 0.88);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta .btn:not(.btn--outline):not(.btn--whatsapp) {
  background: var(--white);
  border-color: var(--white);
  color: var(--primary);
}

.cta .btn:not(.btn--outline):not(.btn--whatsapp):hover {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--white);
}

/* Contato
   -------------------------------------------------------------------------- */
.contact {
  display: grid;
  gap: 32px;
}

@media (min-width: 992px) {
  .contact {
    grid-template-columns: 5fr 7fr;
  }
}

.contact__list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--light);
  border-radius: var(--radius);
}

.contact__item > i {
  flex-shrink: 0;
  font-size: 2rem;
  color: var(--primary);
}

.contact__label {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--dark);
}

.contact__item a {
  color: var(--text);
  word-break: break-word;
}

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

.contact__map {
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light);
}

.contact__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

/* Rodapé
   -------------------------------------------------------------------------- */
.footer {
  background: var(--light);
  padding: 72px 0 48px;
}

.footer__grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.footer__logo {
  height: 56px;
  width: auto;
  margin-bottom: 16px;
}

.footer h2 {
  border-left: 5px solid var(--primary);
  padding-left: 14px;
  margin-bottom: 20px;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.footer__list i {
  color: var(--primary);
}

.footer__list a {
  color: var(--text);
}

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

.social {
  display: flex;
  gap: 10px;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s;
}

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

.copyright {
  padding: 20px 0;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.copyright__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-right: 96px; /* espaço para o botão flutuante do WhatsApp */
}

.copyright a {
  color: var(--white);
}

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

/* WhatsApp flutuante e voltar ao topo
   -------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  font-size: 1.8rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.whatsapp-float:hover {
  color: var(--white);
  transform: scale(1.08);
}

.back-to-top {
  position: fixed;
  right: 27px;
  bottom: 92px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
}

/* Página 404
   -------------------------------------------------------------------------- */
.not-found {
  padding: 120px 0;
  text-align: center;
}

.not-found__code {
  font-family: var(--font-head);
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
}
