/* ============================================================
   Ramaja Auto Peças — static site
   ============================================================ */

/* ---------- Self-hosted fonts (no CDN) ---------- */
@font-face {
  font-family: 'Titillium Web';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/TitilliumWeb-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Titillium Web';
  font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/TitilliumWeb-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Titillium Web';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/TitilliumWeb-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/Roboto-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/Roboto-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/Roboto-700.woff2') format('woff2');
}

:root {
  --red: #d81f26;
  --red-dark: #b0141a;
  --dark: #1a1a1a;
  --dark-2: #262626;
  --gray: #6b7280;
  --light: #f5f6f8;
  --white: #ffffff;
  --wa: #25d366;
  --wa-dark: #1da851;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0,0,0,.08);
  --max: 1160px;
  --font: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-head: 'Titillium Web', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

/* Titillium Web on headings, nav, numbers & titles */
h1, h2, h3, h4,
.section-title,
.main-nav ul a,
.header-cta,
.hero-text h1, .hero-sub, .hero-phone,
.diff-num, .diff-half h3,
.product-card span,
.counter-num, .counter-label,
.location-card h3,
.contact-block h4,
.btn,
.footer-tag {
  font-family: var(--font-head);
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-2px); }

.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: var(--wa-dark); }

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}
.btn-outline:hover { background: var(--red); color: #fff; }

/* ---------- Section titles ---------- */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  position: relative;
  padding-bottom: 16px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: var(--red);
}
.section-title.light { color: #fff; }

section { padding: 70px 0; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 16px;
}
.logo img { height: 46px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 26px;
}
.main-nav ul a {
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  padding: 6px 0;
  position: relative;
}
.main-nav ul a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width .2s ease;
}
.main-nav ul a:hover::after { width: 100%; }

.header-social { display: flex; gap: 10px; }
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  transition: background .2s ease, color .2s ease;
}
.social-icon:hover { background: var(--red); color: #fff; }

.header-cta { padding: 10px 18px; font-size: .88rem; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  color: #fff;
  padding: 60px 0;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(15,15,18,.62), rgba(15,15,18,.62)),
    url('images/Engine-Background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 40px;
}
.hero-text { flex: 1 1 50%; }
.hero-text h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 10px;
}
.hero-sub {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 700;
  color: var(--red);
  margin-bottom: 20px;
}
.hero-region {
  font-size: 1rem;
  color: #d5d5d5;
  max-width: 520px;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.hero-phone {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}
.hero-image { flex: 1 1 45%; text-align: center; }
.hero-image img {
  max-height: 360px;
  width: auto;
  margin: 0 auto;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.4));
}

/* ============================================================
   DIFFERENTIALS — DIAGONAL SPLIT
   ============================================================ */
.differentials { background: var(--dark); padding: 0; }
.diff-split {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  background: var(--dark);
}
.diff-half {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 56%;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.diff-half::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15,15,18,.68), rgba(15,15,18,.68));
}
.diff-half--left {
  left: 0;
  background-image: url('images/atendimento-personalizado.jpg');
  clip-path: polygon(0 0, 100% 0, 79% 100%, 0 100%);
  z-index: 2;
  justify-content: flex-start;
}
.diff-half--right {
  right: 0;
  background-image: url('images/pecas-com-garantia.jpg');
  clip-path: polygon(21% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
  justify-content: flex-end;
}
.diff-content {
  position: relative;
  z-index: 2;
  max-width: 420px;
  padding: 0 10%;
}
.diff-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  margin-bottom: 6px;
}
.diff-half h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #fff;
}
.diff-half p { color: #e6e6e6; }

/* ============================================================
   PRODUCTS
   ============================================================ */
.products { background: #fff; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 44px;
}
.product-card {
  background: var(--light);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease;
  border: 1px solid #eceef1;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  background: #fff;
}
.product-card img {
  width: 80px; height: 80px;
  object-fit: contain;
  margin: 0 auto 14px;
}
.product-card span {
  display: block;
  font-weight: 700;
  font-size: .95rem;
  color: var(--dark);
}

/* ============================================================
   COUNTERS
   ============================================================ */
.counters {
  color: #fff;
  background-image:
    linear-gradient(135deg, rgba(216,31,38,.90) 0%, rgba(176,20,26,.92) 100%),
    url('images/car-mechanic-work-small.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 44px;
  text-align: center;
}
.counter-num {
  display: block;
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 8px;
}
.counter-label {
  font-size: 1.05rem;
  font-weight: 600;
  opacity: .95;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--light); }
.about-inner {
  display: flex;
  align-items: center;
  gap: 50px;
}
.about-image { flex: 1 1 45%; }
.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}
.about-text { flex: 1 1 50%; }
.about-text .section-title { text-align: left; }
.about-text .section-title::after { left: 0; transform: none; }
.about-text p {
  font-size: 1.1rem;
  color: var(--gray);
  margin: 18px 0 26px;
}

/* ============================================================
   BRANDS / MONTADORAS
   ============================================================ */
.brands {
  background: var(--dark);
  color: #fff;
}
.brands-sub {
  text-align: center;
  color: #cfcfcf;
  max-width: 640px;
  margin: 0 auto 44px;
  font-size: 1.15rem;
}
.brands-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
}
.brand-logo {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: transform .18s ease, box-shadow .2s ease;
}
.brand-logo:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,.28);
}
.brand-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ============================================================
   LOCATIONS
   ============================================================ */
.locations { background: #fff; }
.location-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 44px;
}
.location-card {
  background: var(--light);
  border-radius: var(--radius);
  border-top: 4px solid var(--red);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* foto e mapa ocupam a mesma caixa: as vistas ficam sobrepostas e so a
   .is-active aparece, entao o card nao cresce por ganhar o mapa */
.loc-media {
  position: relative;
  height: 190px;
  background: #e9ebee;
  overflow: hidden;
}
/* a vista inativa fica so transparente (sem visibility/display), senao o mapa
   descarta o que ja renderizou e redesenha na hora da troca */
.loc-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
.loc-view.is-active { opacity: 1; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .loc-view { transition: none; }
}
.location-card .loc-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.loc-map { width: 100%; height: 100%; border: 0; display: block; }

.loc-tabs {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 50px;
  background: rgba(20,20,20,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.loc-tab {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff;
  background: transparent;
  border: none;
  border-radius: 50px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.loc-tab:hover { background: rgba(255,255,255,.18); }
.loc-tab.is-active { background: var(--red); color: #fff; }
.loc-tab:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.location-card h3 {
  font-size: 1.35rem;
  color: var(--red);
  margin: 22px 26px 14px;
}
.loc-info {
  list-style: none;
  margin: 0 26px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.loc-info li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
}
.loc-info svg { fill: var(--red); margin-top: 3px; flex-shrink: 0; }
.loc-address span { color: var(--dark); font-weight: 600; }
.loc-phone span a { color: var(--red); font-weight: 700; font-size: 1.1rem; }
.loc-hours span { color: var(--gray); font-size: .95rem; }

/* margin-top:auto absorve a folga: os 3 botoes alinham na mesma altura
   mesmo com enderecos de tamanhos diferentes */
.loc-footer { margin-top: auto; padding: 20px 26px 26px; }
.loc-route {
  width: 100%;
  justify-content: center;
  padding: 10px 18px;
  font-size: .88rem;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: linear-gradient(135deg, #1a1a1a 0%, #2b2b2b 100%);
  color: #fff;
}
.contact-inner { text-align: center; }
.contact-lead { color: #cfcfcf; margin: 18px auto 36px; font-size: 1.1rem; max-width: 620px; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 720px;
  margin: 0 auto 34px;
}
.contact-block {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.contact-note { color: #a9a9a9; font-size: .88rem; margin-top: 8px; }
.contact-cta { padding: 14px 34px; }
.contact-block h4 {
  font-size: 1.05rem;
  color: var(--red);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.contact-block p { color: #e5e5e5; }
.contact-block a:hover { color: var(--red); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0f0f0f;
  color: #cfcfcf;
  padding: 54px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 42px;
}
.site-footer h4 {
  color: #fff;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 18px;
}
.site-footer p { font-size: .88rem; line-height: 1.7; }
/* o rodape ja e escuro: o logo (fundo transparente) vai direto, sem caixa */
.footer-logo { height: 48px; width: auto; margin-bottom: 16px; }
.footer-values { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-values li { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.footer-values svg { color: var(--red); flex: none; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social .social-icon {
  width: 42px; height: 42px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.footer-social .social-icon:hover { transform: translateY(-3px); }
.footer-bar {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 20px 0;
}
.footer-bar p { font-size: .8rem; color: #8a8a8a; text-align: center; }

/* ============================================================
   FLOATING WHATSAPP
   ============================================================ */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 60px; height: 60px;
  background: var(--wa);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  z-index: 200;
  animation: waPulse 2.4s infinite;
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }
@keyframes waPulse {
  0%   { box-shadow: 0 6px 20px rgba(0,0,0,.3), 0 0 0 0 rgba(37,211,102,.5); }
  70%  { box-shadow: 0 6px 20px rgba(0,0,0,.3), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 6px 20px rgba(0,0,0,.3), 0 0 0 0 rgba(37,211,102,0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .brands-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,.3);
  }
  .main-nav.open { max-height: 480px; padding: 12px 0 20px; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .main-nav ul li { border-bottom: 1px solid rgba(255,255,255,.08); }
  .main-nav ul a { display: block; padding: 14px 24px; }
  .header-social { padding: 14px 24px 4px; }
  .header-cta { margin: 8px 24px 0; justify-content: center; }

  .hero-inner { flex-direction: column-reverse; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-region { margin-left: auto; margin-right: auto; }
  .hero-image img { max-height: 260px; }

  .about-inner { flex-direction: column; }
  .about-text .section-title { text-align: center; }
  .about-text .section-title::after { left: 50%; transform: translateX(-50%); }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .footer-values li { justify-content: center; }
  .footer-social { justify-content: center; }
}

@media (max-width: 680px) {
  section { padding: 50px 0; }
  .diff-split { min-height: 0; }
  .diff-half {
    position: relative;
    top: auto; bottom: auto;
    width: 100%;
    min-height: 300px;
    clip-path: none;
  }
  .diff-content { padding: 32px 24px; max-width: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .counter-grid { grid-template-columns: 1fr; gap: 26px; }
  .location-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .brands-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .brand-logo { height: 90px; padding: 14px; }
  .section-title { font-size: 1.6rem; }
}

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
}
