/* Seção "A frota" (#frota): carrossel contínuo de carros.
   Medidas e cores tiradas do export do Framer (v17). Tudo prefixado com .gx-frota. */

.gx-frota {
  --gxf-ink: rgb(24, 24, 24);
  --gxf-black: rgb(0, 0, 0);
  --gxf-muted: rgb(70, 72, 77);
  --gxf-line: rgba(108, 111, 118, 0.12);
  --gxf-card: rgb(250, 250, 250);
  --gxf-badge: rgb(239, 240, 241);
  --gxf-card-w: 400px;
  --gxf-card-h: 483px;
  --gxf-card-h-open: 520px;
  --gxf-gap: 16px;
  --gxf-ease: cubic-bezier(0.22, 1, 0.36, 1);

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  padding: 80px 0 30px;
  background: #fff;
  overflow: hidden;
  overflow: clip;
  box-sizing: border-box;
}
.gx-frota *,
.gx-frota *::before,
.gx-frota *::after { box-sizing: border-box; }

/* Cabeçalho */
.gx-frota__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 1120px;
  padding: 5px 30px 16px;
  text-align: center;
}
.gx-frota__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--gxf-line);
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--gxf-ink);
  white-space: nowrap;
}
.gx-frota__pill svg { width: 18px; height: 18px; flex: none; color: var(--gxf-muted); }
.gx-frota__title {
  margin: 0;
  font-family: "Geist", sans-serif;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -2.5px;
  color: var(--gxf-ink);
}
.gx-frota__sub {
  margin: 0;
  max-width: 688px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--gxf-muted);
  opacity: 0.8;
}

/* Carrossel */
.gx-frota__viewport {
  position: relative;
  width: 100%;
  min-height: var(--gxf-card-h-open);
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: 40px;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.gx-frota__viewport.is-dragging,
.gx-frota__viewport.is-dragging * { cursor: grabbing; }
.gx-frota__track {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--gxf-gap);
  width: max-content;
  margin: 0;
  padding: 0 0 32px;
  list-style: none;
  will-change: transform;
}
.gx-frota__item {
  flex: none;
  position: relative;
  width: var(--gxf-card-w);
  height: var(--gxf-card-h);
}

/* Card */
.gx-frota__card {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: var(--gxf-card-h);
  border-radius: 20px;
  background: var(--gxf-card);
  box-shadow: inset -1.5px 0 0 rgba(70, 72, 77, 0.06);
  overflow: hidden;
  overflow: clip;
  cursor: pointer;
  transition: height 0.38s var(--gxf-ease), box-shadow 0.38s ease;
}
.gx-frota__media {
  display: flex;
  flex: 1 0 0;
  min-height: 0;
  padding: 8px 8px 0;
  overflow: hidden;
}
.gx-frota__photo {
  position: relative;
  flex: 1;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}
.gx-frota__img {
  position: absolute;
  top: calc(50.13% - 113.5px);
  left: calc(50% - 168px);
  width: 336px;
  max-width: none;
  height: 227px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gx-frota__img.is-on { opacity: 1; }

.gx-frota__info {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  height: 104px;
  padding: 24px 28px;
  overflow: hidden;
  transition: height 0.38s var(--gxf-ease), padding 0.38s var(--gxf-ease), gap 0.38s ease;
}
.gx-frota__meta { display: flex; flex-direction: column; gap: 2px; }
.gx-frota__cat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--gxf-muted);
  white-space: nowrap;
}
.gx-frota__sep { opacity: 0.3; }
.gx-frota__name {
  margin: 0;
  font-family: "Geist", sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -1px;
  color: var(--gxf-black);
  white-space: nowrap;
}

/* Detalhes: escondidos no card recolhido, aparecem no hover (PC) ou no card central (celular) */
.gx-frota__details,
.gx-frota__bottom {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.gx-frota__details { display: flex; flex-direction: column; gap: 8px; }
.gx-frota__incl {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 18px;
  color: var(--gxf-muted);
}
.gx-frota__incl strong { font-weight: 700; margin-right: 6px; }
.gx-frota__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-frota__tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gxf-badge);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 18px;
  color: rgba(70, 72, 77, 0.8);
  white-space: nowrap;
}
.gx-frota__bottom { display: flex; flex-direction: column; gap: 2px; }
.gx-frota__signed {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--gxf-muted);
}
.gx-frota__price {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  font-family: "Geist", sans-serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -1.5px;
  color: var(--gxf-muted);
  white-space: nowrap;
}
.gx-frota__yield {
  margin: 4px 0 0;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: var(--gxf-muted);
  opacity: 0.85;
  white-space: nowrap;
}
.gx-frota__yield strong { font-weight: 600; color: var(--gxf-ink); }

/* Estado aberto */
.gx-frota__card.is-active {
  height: var(--gxf-card-h-open);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
}
.gx-frota__card.is-active .gx-frota__info { height: 320px; padding: 16px 28px 22px; gap: 12px; }
.gx-frota__card.is-active .gx-frota__details,
.gx-frota__card.is-active .gx-frota__bottom { opacity: 1; transform: none; pointer-events: auto; }
.gx-frota__item:has(.is-active) { z-index: 2; }

@media (hover: hover) and (pointer: fine) and (min-width: 992px) {
  .gx-frota__item:hover { z-index: 2; }
  .gx-frota__card:hover { height: var(--gxf-card-h-open); }
  .gx-frota__card:hover .gx-frota__info { height: 320px; padding: 16px 28px 22px; gap: 12px; }
  .gx-frota__card:hover .gx-frota__details,
  .gx-frota__card:hover .gx-frota__bottom { opacity: 1; transform: none; pointer-events: auto; }
}

/* Seletor de cor */
.gx-frota__swatches {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
}
.gx-frota__swatch {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: var(--sw);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.gx-frota__swatch::before,
.gx-frota__swatch::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.gx-frota__swatch::before {
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}
.gx-frota__swatch::after {
  inset: 2px;
  border: 1px solid #fff;
  transition: border-width 0.2s ease, box-shadow 0.2s ease;
}
.gx-frota__swatch[aria-pressed="true"]::after {
  border: 8px solid rgb(245, 245, 245);
  box-shadow: 2px 2px 2px 0 rgb(0, 0, 0);
}
.gx-frota__swatch:focus-visible { outline: 2px solid var(--gxf-ink); outline-offset: 2px; }

/* Tablet */
@media (max-width: 1199px) {
  .gx-frota { padding: 80px 0; }
  .gx-frota__head { padding-bottom: 10px; }
  .gx-frota__title { font-size: 34px; letter-spacing: -2px; }
  .gx-frota__price { letter-spacing: -1px; }
}

/* Celular */
@media (max-width: 767px) {
  .gx-frota { --gxf-card-w: 321px; padding: 60px 0; gap: 40px; }
  .gx-frota__head { padding: 5px 20px 0; }
  .gx-frota__title { font-size: 28px; letter-spacing: -1px; }
  .gx-frota__sub { font-size: 15px; }
  .gx-frota__img { left: 50%; width: min(336px, 100%); height: auto; aspect-ratio: 336 / 227; top: 50%; transform: translate(-50%, -50%); }
  .gx-frota__info { padding: 24px 22px; }
  .gx-frota__card.is-active .gx-frota__info { padding: 16px 22px 22px; }
  .gx-frota__price { font-size: 24px; letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .gx-frota__card,
  .gx-frota__info,
  .gx-frota__details,
  .gx-frota__bottom,
  .gx-frota__img,
  .gx-frota__swatch::after { transition: none; }
}
