@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Paleta Estrita Oficial: Vermelho, Preto e Branco */
  --bg-white: #FFFFFF;
  --bg-soft: #F8FAFC;
  --bg-card: #FFFFFF;
  
  --color-red: #DC2626;
  --color-red-hover: #B91C1C;
  --color-red-soft: #FEF2F2;
  --color-red-border: #FCA5A5;
  
  --color-black: #000000;
  --color-dark: #0F172A;
  --color-charcoal: #1E293B;
  
  --text-primary: #000000;
  --text-secondary: #1E293B;
  --text-muted: #475569;
  --border-light: #E2E8F0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: #FFFFFF;
  color: #000000;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  color: #000000;
}

/* MANDATORY BLINDAGE: Zero invisible blocking backdrops */
.hidden {
  display: none !important;
  pointer-events: none !important;
  z-index: -9999 !important;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
  color: #000000;
}

/* Custom Scrollbar Vermelha & Branca */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #F8FAFC;
}
::-webkit-scrollbar-thumb {
  background: #DC2626;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #B91C1C;
}

/* Sub-nav horizontal scrollbar hidden on mobile */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Cards em Fundo Branco com Detalhes Vermelhos */
.quality-car-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.quality-car-card:hover {
  border-color: #DC2626;
  box-shadow: 0 16px 32px -8px rgba(220, 38, 38, 0.15);
  transform: translateY(-4px);
}

/* Efeito Ken Burns Suave no Hero */
@keyframes heroKenBurns {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.hero-image-zoom {
  animation: heroKenBurns 20s infinite ease-in-out alternate;
}

/* Hover Zoom nas fotos dos carros */
.car-image-container {
  overflow: hidden;
  position: relative;
}
.car-image-container img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.car-card-item:hover .car-image-container img {
  transform: scale(1.06);
}

/* Botões Vermelhos, Pretos e Brancos */
.btn-red {
  background: #DC2626;
  color: #FFFFFF;
  font-weight: 800;
  transition: all 0.2s ease;
}
.btn-red:hover {
  background: #B91C1C;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
}

.btn-black {
  background: #000000;
  color: #FFFFFF;
  font-weight: 800;
  transition: all 0.2s ease;
}
.btn-black:hover {
  background: #1E293B;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.btn-white-red {
  background: #FFFFFF;
  color: #DC2626;
  border: 2px solid #DC2626;
  font-weight: 800;
  transition: all 0.2s ease;
}
.btn-white-red:hover {
  background: #FEF2F2;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
  transform: translateY(-1px);
}

/* Range Slider Vermelho */
input[type=range] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
  margin: 10px 0;
  padding: 0;
  display: block;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #E2E8F0;
  border-radius: 9999px;
  border: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #DC2626;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
  cursor: grab;
  margin-top: -8px;
  transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.2);
}

input[type=range]::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #E2E8F0;
  border-radius: 9999px;
  border: none;
}

input[type=range]::-moz-range-thumb {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #DC2626;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
  cursor: grab;
}

/* Layout Shield */
.inventory-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.inventory-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.grid-shield {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

@media (min-width: 640px) {
  .grid-shield {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-shield {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .grid-shield {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Accordion FAQ */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.faq-content.open {
  max-height: 500px;
  opacity: 1;
}

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-chevron.rotate {
  transform: rotate(180deg);
}

/* Modal Backdrop */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ========================================================
   CINEMATIC SCROLL & LENIS ENGINE (Sweet Tape / ScrollCraft)
   ======================================================== */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Micro-elevação dos cards com efeito cinematográfico */
.kavak-card {
  will-change: transform, opacity;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.kavak-card:hover {
  transform: translateY(-6px);
  border-color: #DC2626 !important;
  box-shadow: 0 20px 35px -10px rgba(220, 38, 38, 0.18) !important;
}

/* Canvas 3D de fundo */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}
