/* AUTOMOTIVE — Painel de pesquisa premium (celular).
   Escopo: tudo sob .sp-* — não altera estilos globais nem outras seções. */
.sp-backdrop, .sp-panel { display: none; }

@media screen {
  .sp-backdrop {
    display: block; position: fixed; inset: 0; z-index: 44;
    background: rgba(5,5,5,.5); opacity: 0; visibility: hidden;
    transition: opacity 320ms ease, visibility 0s linear 320ms;
  }
  .sp-open .sp-backdrop { opacity: 1; visibility: visible; transition-delay: 0s; }

  .sp-panel {
    --sp-bg: #050505; --sp-card: #101010; --sp-line: #292929; --sp-line2: #252525;
    --sp-gold: #D9A441; --sp-gold-hi: #F2C477; --sp-gold-lo: #A97935;
    --sp-text: #fff; --sp-text2: #B8B8B8; --sp-mute: #929292;
    --sp-font: Manrope, Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --sp-ease: cubic-bezier(.22,.7,.2,1);
    display: flex; flex-direction: column;
    position: fixed; z-index: 46; left: max(15px, 4%); right: max(15px, 4%);
    top: 120px; max-height: calc(100svh - 140px);
    padding: 16px 16px 14px; box-sizing: border-box;
    font-family: var(--sp-font); color: var(--sp-text);
    background: linear-gradient(180deg, rgba(10,10,10,.93), rgba(5,5,5,.96));
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-radius: 26px;
    box-shadow: 0 0 18px rgba(217,164,65,.12), 0 0 35px rgba(217,164,65,.06), 0 24px 48px -18px rgba(0,0,0,.8);
    opacity: 0; visibility: hidden; transform: translateY(10px) scale(.985);
    transition: opacity 300ms ease, transform 340ms var(--sp-ease), visibility 0s linear 340ms,
                top 360ms var(--sp-ease), max-height 360ms var(--sp-ease);
    overflow: hidden;
  }
  .sp-panel.sp-notrans { transition: none !important; }
  .sp-open .sp-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .sp-panel *, .sp-panel *::before, .sp-panel *::after { box-sizing: border-box; }

  /* borda dourada fina, mais intensa nas laterais */
  .sp-panel::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
    background: linear-gradient(90deg, rgba(242,196,119,.8), rgba(217,164,65,.14) 22%, rgba(217,164,65,.1) 78%, rgba(242,196,119,.8));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
  }
  .sp-panel::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
    background: radial-gradient(60% 18% at 0% 8%, rgba(217,164,65,.14), transparent 70%),
                radial-gradient(60% 18% at 100% 92%, rgba(217,164,65,.12), transparent 70%);
  }
  .sp-panel > * { position: relative; z-index: 1; }

  /* ---------- barra principal ---------- */
  .sp-bar {
    flex: none; display: flex; align-items: center; gap: 10px;
    height: 78px; padding: 0 10px 0 18px; margin: 0;
    background: rgba(8,8,8,.7); border: 1px solid rgba(217,164,65,.45); border-radius: 999px;
    box-shadow: 0 0 12px rgba(217,164,65,.35), inset 0 0 0 1px rgba(242,196,119,.06);
    transition: box-shadow 250ms ease, border-color 250ms ease;
  }
  .sp-bar:focus-within { border-color: var(--sp-gold-hi); box-shadow: 0 0 16px rgba(217,164,65,.5), inset 0 0 0 1px rgba(242,196,119,.1); }
  .sp-bar > svg { flex: none; width: 27px; height: 27px; color: #fff; }
  .sp-input {
    flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none;
    -webkit-appearance: none; appearance: none; color: #fff;
    font: 500 16px/1 var(--sp-font); letter-spacing: -.005em;
  }
  .sp-input::placeholder { color: var(--sp-mute); opacity: 1; }
  .sp-input::-webkit-search-cancel-button, .sp-input::-webkit-search-decoration { display: none; }
  .sp-close {
    flex: none; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
    color: #fff; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background-color 200ms ease, transform 160ms ease;
  }
  .sp-close:active { transform: scale(.92); background: rgba(255,255,255,.08); }
  .sp-close svg { width: 26px; height: 26px; }
  .sp-go {
    flex: none; display: none; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
    color: #17120B; background: var(--sp-gold); cursor: pointer; -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 14px -4px rgba(217,164,65,.7);
  }
  .sp-go svg { width: 24px; height: 24px; }
  .sp-has-text .sp-go { display: grid; }
  .sp-has-text .sp-close { display: none; }
  .sp-go:focus-visible, .sp-close:focus-visible, .sp-card:focus-visible, .sp-row:focus-visible, .sp-more:focus-visible,
  .sp-all-link:focus-visible, .sp-back:focus-visible, .sp-brand-row:focus-visible, .sp-less:focus-visible { outline: 2px solid var(--sp-gold-hi); outline-offset: 2px; }

  /* ---------- corpo rolável ---------- */
  .sp-body {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 18px -16px 0; padding: 0 16px 4px;
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .sp-body::-webkit-scrollbar { display: none; }
  .sp-view[hidden] { display: none; }

  .sp-sechead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
  .sp-title { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 17px/1.2 var(--sp-font); color: #fff; }
  .sp-title::before { content: ""; width: 3px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, var(--sp-gold-hi), var(--sp-gold-lo)); flex: none; }
  .sp-all-link {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 0 8px 8px; border: 0; background: none; cursor: pointer;
    font: 500 14px/1 var(--sp-font); color: var(--sp-text2); -webkit-tap-highlight-color: transparent;
  }
  .sp-all-link svg { width: 18px; height: 18px; color: #fff; }

  /* ---------- grade 4 × 2 ---------- */
  .sp-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .sp-card {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 9px;
    min-height: 98px; padding: 14px 4px 8px; margin: 0;
    background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: 13px; color: #fff; cursor: pointer;
    font: 500 clamp(11px, 2.9vw, 14px)/1.12 var(--sp-font); text-align: center; -webkit-tap-highlight-color: transparent;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
    transition: transform 160ms ease, border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
  }
  .sp-card:active { transform: scale(.96); border-color: rgba(217,164,65,.7); background: #151311; box-shadow: 0 0 12px rgba(217,164,65,.18); }
  .sp-card__name { display: block; max-width: 100%; hyphens: manual; overflow-wrap: normal; }
  .sp-logo { display: grid; place-items: center; flex: none; width: 42px; height: 42px; }
  .sp-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
  .sp-mono {
    display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
    color: var(--sp-gold-hi); background: radial-gradient(circle at 30% 25%, #1c1812, #0b0b0b 70%);
    border: 1px solid rgba(217,164,65,.55); font: 700 15px/1 var(--sp-font); letter-spacing: .02em;
    box-shadow: 0 0 10px rgba(217,164,65,.12);
  }
  .sp-mono--s { font-size: 12px; } .sp-mono--xs { font-size: 10px; letter-spacing: 0; }

  /* ---------- sugestões ---------- */
  .sp-sugg { margin-top: 24px; }
  .sp-sugg__title { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font: 600 16px/1.2 var(--sp-font); color: #fff; }
  .sp-sugg__title svg { width: 22px; height: 22px; color: var(--sp-gold); flex: none; }
  .sp-list { list-style: none; margin: 0; padding: 0; }
  .sp-row {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 49px; padding: 0 6px; margin: 0;
    border: 0; border-bottom: 1px solid rgba(255,255,255,.07); background: none; color: #fff; cursor: pointer; text-align: left;
    font: 500 16px/1.2 var(--sp-font); -webkit-tap-highlight-color: transparent; transition: background-color 160ms ease;
  }
  .sp-list li:last-child .sp-row { border-bottom: 0; }
  .sp-row:active { background: rgba(217,164,65,.08); }
  .sp-row > svg:first-child { width: 20px; height: 20px; flex: none; color: #fff; }
  .sp-row__txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sp-row__txt b { font-weight: 700; color: var(--sp-gold-hi); }
  .sp-row .sp-chev { width: 18px; height: 18px; flex: none; color: #fff; }
  .sp-empty { margin: 14px 4px 6px; font: 400 14px/1.45 var(--sp-font); color: var(--sp-text2); }

  /* modo digitação: só as sugestões */
  .sp-typing .sp-top-wrap, .sp-typing .sp-allwrap { display: none; }
  .sp-typing .sp-sugg { margin-top: 0; }

  /* ---------- todas as marcas (expansão no mesmo painel) ---------- */
  .sp-allwrap { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 360ms var(--sp-ease), opacity 300ms ease; }
  .sp-expanded .sp-allwrap { grid-template-rows: 1fr; opacity: 1; }
  .sp-allwrap__in { min-height: 0; overflow: hidden; }
  .sp-all { padding-top: 28px; }
  .sp-all__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
  .sp-diamond {
    flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px;
    background: #0d0d0d; border: 1px solid rgba(217,164,65,.4); box-shadow: 0 0 14px rgba(217,164,65,.15); color: var(--sp-gold);
  }
  .sp-diamond svg { width: 28px; height: 28px; }
  .sp-all__title { margin: 0 0 3px; font: 600 18px/1.2 var(--sp-font); color: #fff; }
  .sp-all__desc { margin: 0; font: 400 13.5px/1.35 var(--sp-font); color: var(--sp-text2); }
  .sp-bsearch {
    display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 20px; margin: 0 0 22px;
    background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: 20px; transition: border-color 200ms ease, box-shadow 200ms ease;
  }
  .sp-bsearch:focus-within { border-color: rgba(217,164,65,.7); box-shadow: 0 0 12px rgba(217,164,65,.2); }
  .sp-bsearch svg { flex: none; width: 26px; height: 26px; color: #fff; }
  .sp-bsearch input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: #fff; -webkit-appearance: none; appearance: none; font: 500 16px/1 var(--sp-font); }
  .sp-bsearch input::placeholder { color: #777; opacity: 1; }
  .sp-bsearch input::-webkit-search-cancel-button { display: none; }

  .sp-brands {
    display: grid; grid-auto-flow: column; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px;
    max-height: 520px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 1px 0;
  }
  .sp-brands::-webkit-scrollbar { display: none; }
  .sp-brand-row {
    display: flex; align-items: center; gap: 12px; height: 47px; padding: 0 12px 0 10px; margin: 0; min-width: 0;
    background: var(--sp-card); border: 1px solid var(--sp-line2); border-radius: 14px; color: #fff; cursor: pointer; text-align: left;
    font: 500 14.5px/1.1 var(--sp-font); -webkit-tap-highlight-color: transparent;
    transition: transform 160ms ease, border-color 200ms ease, background-color 200ms ease;
  }
  .sp-brand-row:active { transform: scale(.97); border-color: rgba(217,164,65,.6); background: #151311; }
  .sp-brand-row .sp-logo { width: 32px; height: 32px; }
  .sp-brand-row .sp-mono { font-size: 11px; } .sp-brand-row .sp-mono--s { font-size: 10px; } .sp-brand-row .sp-mono--xs { font-size: 8.5px; }
  .sp-brand-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sp-brand-row .sp-chev { width: 18px; height: 18px; flex: none; color: var(--sp-gold-hi); opacity: .85; }
  .sp-less {
    display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 60px; margin: 18px 0 2px; padding: 0;
    background: #050505; border: 1px solid var(--sp-gold); border-radius: 16px; color: #fff; cursor: pointer;
    box-shadow: 0 0 14px rgba(217,164,65,.3), inset 0 0 12px rgba(217,164,65,.08);
    font: 500 15px/1 var(--sp-font); -webkit-tap-highlight-color: transparent; transition: transform 160ms ease;
  }
  .sp-less:active { transform: scale(.98); }
  .sp-less svg { width: 22px; height: 22px; color: var(--sp-gold-hi); flex: none; }

  /* ---------- modelos de uma marca ---------- */
  .sp-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 0; margin: 0 0 12px; border: 0; background: none; color: var(--sp-text2); cursor: pointer; font: 500 14px/1 var(--sp-font); }
  .sp-back svg { width: 18px; height: 18px; }
  .sp-mhead { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
  .sp-mhead .sp-logo { width: 48px; height: 48px; }
  .sp-mhead h3 { margin: 0 0 3px; font: 600 19px/1.2 var(--sp-font); color: #fff; }
  .sp-mhead p { margin: 0; font: 400 13px/1.35 var(--sp-font); color: var(--sp-text2); }
  .sp-more {
    display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; margin: 16px 0 2px; padding: 0 16px;
    background: linear-gradient(180deg, var(--sp-gold-hi), var(--sp-gold)); border: 0; border-radius: 16px; color: #17120B; cursor: pointer;
    font: 700 15px/1 var(--sp-font); -webkit-tap-highlight-color: transparent;
  }

  /* telas estreitas */
  @media (max-width: 400px) {
    .sp-panel { padding: 14px 12px 12px; }
    .sp-body { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
    .sp-bar { height: 72px; padding-left: 14px; }
    .sp-top { gap: 8px; }
    .sp-card { padding-left: 2px; padding-right: 2px; }
    .sp-input { font-size: 15px; }
    .sp-bar { gap: 8px; }
    .sp-bar > svg { width: 24px; height: 24px; }
    .sp-logo { width: 38px; height: 38px; }
    .sp-brands { gap: 4px 10px; }
    .sp-brand-row { padding-left: 8px; padding-right: 8px; gap: 8px; font-size: 13.5px; }
    .sp-brand-row .sp-logo { width: 28px; height: 28px; }
  }
  @media (max-width: 339px) {
    .sp-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sp-card { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 64px; padding: 8px 10px; text-align: left; font-size: 13px; }
    .sp-card .sp-logo { width: 34px; height: 34px; }
    .sp-brands { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none !important; }
    .sp-input { font-size: 14.5px; }
    .sp-row { font-size: 15px; }
    .sp-card { font-size: 12px; gap: 8px; padding: 8px; }
    .sp-card .sp-logo { width: 30px; height: 30px; }
    .sp-title { font-size: 15px; }
    .sp-all-link { white-space: nowrap; font-size: 13px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .sp-panel, .sp-backdrop, .sp-allwrap, .sp-card, .sp-brand-row { transition-duration: 1ms !important; }
  }
}

@media screen {
  .sp-suggwrap { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows 360ms var(--sp-ease), opacity 260ms ease; }
  .sp-suggwrap__in { min-height: 0; overflow: hidden; }
  .sp-expanded .sp-suggwrap { grid-template-rows: 0fr; opacity: 0; }
  .sp-typing .sp-suggwrap { grid-template-rows: 1fr; opacity: 1; }
}

/* ---------- Computador e tablet: painel centralizado ---------- */
@media screen and (min-width: 761px) {
  .sp-panel { left: calc(50% - min(310px, (100vw - 48px) / 2)); right: auto; width: min(620px, calc(100vw - 48px)); padding: 18px 20px 16px; }
  .sp-body { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .sp-card { font-size: 14px; }
}

/* ---------- Lupa do cabeçalho + barra de pesquisa também no computador e no tablet ---------- */
/* A lupa só aparece quando o carro para (hero.is-final), em todas as telas. */
.search-btn { display: grid; place-items: center; width: 48px; height: 48px; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 700ms var(--ease) 500ms, visibility 0s linear 1200ms; }
.hero.is-final .search-btn { opacity: .95; visibility: visible; pointer-events: auto; transition-delay: 500ms, 0s; }
@media (min-width: 761px) {
  .search { display: block; width: clamp(370px, 34vw, 520px); margin-top: clamp(18px, 2.6vh, 28px); font-family: "Plus Jakarta Sans", Manrope, Outfit, system-ui, sans-serif; }
  .search__field {
    display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 6px 0 18px; color: var(--texto-suave);
    background: rgba(20,22,27,.88); border: 1.5px solid rgba(255,255,255,.2); border-radius: 999px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer; transition: border-color 250ms var(--ease);
  }
  .search__field:hover, .search__field:focus-within { border-color: var(--champagne); }
  .search__field svg { flex: none; color: #fff; }
  .search input { flex: 1; min-width: 0; height: 100%; font: 400 15px/1 "Plus Jakarta Sans", Manrope, Outfit, sans-serif; color: #fff; background: none; border: 0; outline: 0; -webkit-appearance: none; appearance: none; cursor: pointer; }
  .search input::placeholder { color: #9B9A98; opacity: 1; }
  .search input::-webkit-search-cancel-button { display: none; }
  .search__go { display: grid; place-items: center; flex: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: #17120B; background: linear-gradient(180deg, #E4C592, #CFA76E); }
  .search__go svg { color: #17120B; }
  .filters { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-top: 12px; }
  .filter { position: relative; display: flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 12px; min-width: 0; color: #fff; background: rgba(20,22,27,.8); border: 1.5px solid rgba(255,255,255,.2); border-radius: 999px; }
  .filter:focus-within { border-color: var(--champagne); }
  .filter svg { flex: none; width: 18px; height: 18px; }
  .filter select {
    flex: 1; min-width: 0; height: 44px; padding: 0 16px 0 0; font: 500 13px/1 "Plus Jakarta Sans", Manrope, Outfit, sans-serif; color: #fff;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right center / 14px;
    border: 0; outline: 0; -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis;
  }
  .filter select option { color: #111; }
}
@media (min-width: 761px) and (max-height: 720px) { .filters { display: none; } }

/* ---------- Cabeçalho do tablet: nada imprensado ---------- */
@media (min-width: 761px) and (max-width: 1180px) {
  .header { grid-template-columns: auto 1fr auto; column-gap: 16px; }
  .nav { justify-self: center; gap: 14px; }
  .nav__link { font-size: 14px; white-space: nowrap; }
  .pill-btn { white-space: nowrap; height: 44px; padding: 0 16px; gap: 8px; font-size: 14px; }
  .header__actions { gap: 6px; }
}
@media (min-width: 761px) and (max-width: 940px) {
  .nav { gap: 11px; }
  .nav__link { font-size: 13px; }
  .pill-btn { width: 46px; padding: 0; justify-content: center; }
  .pill-btn span, .pill-btn svg:last-child { display: none; }
}

/* Computador/tablet: a pesquisa fica abaixo de "Explorar Estoque" e "Assistir Vídeo" */
@media (min-width: 761px) {
  .content { display: flex; flex-direction: column; align-items: flex-start; }
  .content .cta { order: 1; }
  .content .search { order: 2; margin-top: clamp(22px, 3.4vh, 36px); }
}
