/* ==========================================================================
   IZZAT CAR IMPORTS — base de estilo do site inteiro.

   Antes, cada uma das ~3.985 paginas carregava sua propria copia do visual
   colada dentro dela. Mudar uma cor era editar 3.985 arquivos. Agora e aqui.
   O navegador baixa este arquivo UMA vez e reaproveita em todas as paginas.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */
:root {
  /* Marca */
  --primary:        #FF6B00;
  --primary-light:  #FF8A33;
  --primary-dark:   #CC5500;
  --primary-soft:   rgba(255, 107, 0, .12);
  --accent:         #00D4FF;
  --green:          #25D366;
  --green-dark:     #1DA851;

  /* Superficies (do mais escuro pro mais claro) */
  --bg:             #06060D;
  --surface:        #0C0C17;
  --surface-2:      #12121F;
  --surface-3:      #1A1A2C;

  /* Texto — o cinza foi clareado de #9090B0 pra passar em contraste */
  --text:           #FFFFFF;
  --text-muted:     #ABABC7;
  --text-dim:       #7C7C99;

  --line:           rgba(255, 255, 255, .09);
  --line-strong:    rgba(255, 255, 255, .18);

  /* Espacamento — escala de 4px, sem numero solto no meio do CSS */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  --shadow:    0 4px 16px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);

  --font:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-h:  'Space Grotesk', var(--font);

  --nav-h: 64px;
  --wrap: 1240px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* --- 2. Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-h); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(28px, 4.5vw, 48px); letter-spacing: -.02em; }
h2 { font-size: clamp(24px, 3.2vw, 36px); letter-spacing: -.02em; }
h3 { font-size: clamp(18px, 2vw, 22px); }

/* Acessibilidade: o site nao tinha NENHUM estado de foco — quem navega por
   teclado ficava perdido. */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}

/* --- 3. Layout ---------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }
.section { padding-block: var(--s8); }
.stack   { display: flex; flex-direction: column; gap: var(--s4); }
.row     { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }

.section-head { margin-bottom: var(--s6); }
.section-head p { color: var(--text-muted); margin-top: var(--s2); max-width: 62ch; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); margin-bottom: var(--s2);
}

/* --- 4. Cabecalho ------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(6, 6, 13, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav > .wrap { display: flex; align-items: center; gap: var(--s5); height: 100%; }

.logo {
  font-family: var(--font-h); font-weight: 700; font-size: 20px;
  letter-spacing: -.02em; white-space: nowrap;
}
.logo span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.nav-links a {
  display: flex; align-items: center; min-height: 44px;
  padding: 0 var(--s3);
  border-radius: var(--r-sm);
  color: var(--text-muted); font-size: 15px; font-weight: 500;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--primary); }

.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--r-sm); color: var(--text);
}

/* --- 5. Botoes ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px;                    /* alvo de toque decente no celular */
  padding: 0 var(--s5);
  border-radius: var(--r-md);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .16s var(--ease), background .16s var(--ease),
              border-color .16s var(--ease);
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }

.btn-whats     { background: var(--green); color: #06170D; }
.btn-whats:hover { background: #2EE477; }

.btn-ghost     { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--primary); }

.btn-block { width: 100%; }
.btn-lg    { min-height: 52px; font-size: 16px; padding-inline: var(--s6); }
.btn-sm    { min-height: 38px; font-size: 13px; padding-inline: var(--s3); }

/* --- 6. Campos ---------------------------------------------------------- */
.field {
  width: 100%; min-height: 48px;
  padding: 0 var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text); font-size: 15px;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.field::placeholder { color: var(--text-dim); }
.field:hover { border-color: rgba(255,255,255,.3); }
.field:focus { outline: none; border-color: var(--primary); background: var(--surface-3); }
select.field {
  appearance: none; cursor: pointer; padding-right: var(--s7);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23ABABC7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--s4) center;
}
select.field:disabled { opacity: .45; cursor: not-allowed; }

/* --- 7. Card de produto ------------------------------------------------- */
.grid-products {
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .18s var(--ease), transform .18s var(--ease),
              box-shadow .18s var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-media {
  position: relative;
  aspect-ratio: 1;
  background: #fff;              /* peca recortada em fundo branco aparece melhor */
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: contain;           /* 'cover' cortava a peca pela metade */
  padding: var(--s3);
  transition: transform .3s var(--ease);
}
.card:hover .card-media img { transform: scale(1.04); }

.card-body { padding: var(--s3) var(--s4) var(--s4); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.card-cat { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.card-title {
  font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-price { font-family: var(--font-h); font-size: 20px; font-weight: 700; color: var(--text); margin-top: auto; }
.card-fit { font-size: 12px; color: var(--text-dim); }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px var(--s2);
  border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
  background: var(--surface-3); color: var(--text-muted);
  border: 1px solid var(--line);
}
.tag-free  { background: rgba(37, 211, 102, .14); color: #4FE38C; border-color: rgba(37,211,102,.3); }
.tag-oem   { background: var(--primary-soft); color: var(--primary-light); border-color: rgba(255,107,0,.3); }

/* --- 8. Pilulas de filtro ----------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 40px; padding: 0 var(--s4);
  border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  transition: all .16s var(--ease);
}
.pill:hover { border-color: var(--line-strong); color: var(--text); }
.pill[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill .count { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }

/* --- 9. Rodape ---------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: var(--s7) var(--s5);
  margin-top: var(--s8);
  color: var(--text-dim); font-size: 14px;
}
.foot a { color: var(--text-muted); }
.foot a:hover { color: var(--primary); }
.foot-grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: var(--s6); }
.foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--text); margin-bottom: var(--s3); }
.foot li { margin-bottom: var(--s2); }
.foot-bottom { border-top: 1px solid var(--line); padding-top: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; }

/* --- 10. Botao flutuante do WhatsApp ------------------------------------ */
.whats-float {
  position: fixed; right: var(--s4); bottom: var(--s4); z-index: 90;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green); color: #06170D;
  border-radius: 50%; box-shadow: var(--shadow-lg);
  transition: transform .18s var(--ease);
}
.whats-float:hover { transform: scale(1.06); }
.whats-float svg { width: 28px; height: 28px; }

/* --- 11. Estados vazios / carregando ------------------------------------ */
.empty { text-align: center; padding: var(--s8) var(--s4); color: var(--text-muted); }
.empty h3 { color: var(--text); margin-bottom: var(--s2); }

.skeleton { background: var(--surface-2); border-radius: var(--r-lg); position: relative; overflow: hidden; }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* --- 12. Celular -------------------------------------------------------- */
@media (max-width: 900px) {
  .wrap { padding-inline: var(--s4); }
  .section { padding-block: var(--s7); }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--s3);
    margin-left: 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { min-height: 50px; font-size: 16px; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  .card-body { padding: var(--s3); }
  .card-title { font-size: 13px; -webkit-line-clamp: 2; }
  .card-price { font-size: 17px; }
}

/* Celular comum tem 355-390px uteis: 2 colunas, igual ao Mercado Livre.
   Uma coluna so no aparelho bem pequeno. */
@media (max-width: 330px) {
  .grid-products { grid-template-columns: 1fr; }
}
