/* ==========================================================================
   Motor Center — efeitos e componentes que o Tailwind não cobre.
   Cor da marca em --primary (trio RGB), equivalente ao _BrandStyles do projeto.
   ========================================================================== */

:root {
    --primary: 224 132 38;      /* âmbar/cobre */
    --ink-950: #08080a;
    --ink-900: #0e0e11;
    --ink-800: #16161a;
    --ink-700: #1f1f25;
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { background: var(--ink-950); }
::selection { background: rgb(var(--primary) / .9); color: #08080a; }

:focus-visible { outline: 2px solid rgb(var(--primary)); outline-offset: 3px; border-radius: 2px; }

[x-cloak] { display: none !important; }

/* ── Logo: arquivo preto sobre branco → invertido para o tema escuro ─────── */
.logo-dark { filter: invert(1); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header { transition: background-color .35s ease, border-color .35s ease, backdrop-filter .35s ease; border-bottom: 1px solid transparent; }
.site-header.is-scrolled {
    background: rgb(8 8 10 / .82);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom-color: rgb(255 255 255 / .08);
}
.nav-link { position: relative; }
.nav-link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
    background: rgb(var(--primary)); transform: scaleX(0); transform-origin: left;
    transition: transform .3s ease;
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* ── Botões ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    font-family: "Barlow Condensed", sans-serif; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; line-height: 1; padding: 1rem 1.75rem;
    transition: transform .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: rgb(var(--primary)); color: #08080a; position: relative; overflow: hidden; }
.btn-primary::before {
    content: ""; position: absolute; inset: 0; width: 40%;
    background: linear-gradient(100deg, transparent, rgb(255 255 255 / .45), transparent);
    transform: translateX(-150%) skewX(-20deg);
}
.btn-primary:hover::before { transform: translateX(350%) skewX(-20deg); transition: transform .7s ease; }
.btn-ghost { background: rgb(255 255 255 / .06); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); }
.btn-ghost:hover { background: rgb(255 255 255 / .12); }
.btn-whatsapp { background: #1faa59; color: #fff; }
.btn-whatsapp:hover { background: #25c366; }
.btn-telefone { background: rgb(255 255 255 / .07); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); }
.btn-telefone:hover { background: rgb(255 255 255 / .14); }
.btn-sm { padding: .7rem 1rem; font-size: .9rem; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }

/* ── Títulos de seção ────────────────────────────────────────────────────── */
.eyebrow {
    display: inline-flex; align-items: center; gap: .75rem;
    font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: .95rem;
    letter-spacing: .28em; text-transform: uppercase; color: rgb(var(--primary));
}
.eyebrow::before { content: ""; width: 2.5rem; height: 2px; background: rgb(var(--primary)); }
.eyebrow-center::after { content: ""; width: 2.5rem; height: 2px; background: rgb(var(--primary)); }

.text-outline { color: transparent; -webkit-text-stroke: 1.5px rgb(255 255 255 / .5); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero-media img { animation: kenburns 22s ease-in-out infinite alternate; transform-origin: 65% 55%; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.16); } }

.hero-overlay {
    background:
        linear-gradient(90deg, rgb(8 8 10 / .94) 0%, rgb(8 8 10 / .72) 42%, rgb(8 8 10 / .15) 100%),
        linear-gradient(0deg, rgb(8 8 10) 0%, rgb(8 8 10 / 0) 38%);
}
.hero-glow {
    background: radial-gradient(60% 60% at 75% 60%, rgb(var(--primary) / .22), transparent 70%);
    animation: pulse-glow 7s ease-in-out infinite alternate;
}
@keyframes pulse-glow { from { opacity: .55; } to { opacity: 1; } }

.hero-line { display: block; overflow: hidden; }
.hero-line > span { display: block; }
.js .hero-line > span { transform: translateY(110%); animation: line-up .9s cubic-bezier(.2,.8,.2,1) forwards; }
.js .hero-line:nth-child(2) > span { animation-delay: .12s; }
.js .hero-line:nth-child(3) > span { animation-delay: .24s; }
@keyframes line-up { to { transform: translateY(0); } }

.scroll-hint span { animation: scroll-hint 1.8s ease-in-out infinite; }
@keyframes scroll-hint { 0% { transform: translateY(-100%); } 100% { transform: translateY(250%); } }

/* ── Faixa de marcas (marquee) ───────────────────────────────────────────── */
.marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; flex-shrink: 0; align-items: center; min-width: 100%; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-reverse .marquee-track { animation-direction: reverse; animation-duration: 50s; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ── Cards com brilho que segue o cursor ─────────────────────────────────── */
.glow-card { position: relative; background: var(--ink-800); border: 1px solid rgb(255 255 255 / .07); transition: transform .35s ease, border-color .35s ease; }
.glow-card::before {
    content: ""; position: absolute; inset: -1px; pointer-events: none; opacity: 0; transition: opacity .35s ease;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--primary) / .55), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.glow-card::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--primary) / .08), transparent 60%);
}
.glow-card:hover::before, .glow-card:hover::after { opacity: 1; }
.glow-card:hover { transform: translateY(-4px); }
.glow-card > * { position: relative; z-index: 1; }
.glow-card > .tag { position: absolute; z-index: 2; }

/* ── Card de moto ────────────────────────────────────────────────────────── */
.card-moto-media { overflow: hidden; position: relative; }
.card-moto-media img { transition: transform .8s cubic-bezier(.2,.8,.2,1), filter .5s ease; filter: saturate(.85) brightness(.92); }
.card-moto:hover .card-moto-media img { transform: scale(1.07); filter: saturate(1.05) brightness(1); }
.card-moto-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--ink-800) 0%, transparent 45%); pointer-events: none; }
.tag { font-family: "Barlow Condensed", sans-serif; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; padding: .3rem .7rem; background: rgb(var(--primary)); color: #08080a; }

/* ── Categorias (estilos de moto) ────────────────────────────────────────── */
.cat-tile { position: relative; overflow: hidden; display: block; isolation: isolate; }
.cat-tile img { transition: transform 1s cubic-bezier(.2,.8,.2,1), filter .6s ease; filter: grayscale(.7) brightness(.8); }
.cat-tile:hover img, .cat-tile:focus-visible img { transform: scale(1.08); filter: grayscale(0) brightness(1); }
.cat-tile::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgb(8 8 10 / .95) 0%, rgb(8 8 10 / .1) 60%); }
.cat-tile .cat-body { position: absolute; inset: auto 0 0 0; z-index: 2; }
.cat-tile .cat-bar { height: 3px; width: 2.5rem; background: rgb(var(--primary)); transition: width .5s ease; }
.cat-tile:hover .cat-bar { width: 100%; }

/* ── CTA com parallax e brilho em movimento ──────────────────────────────── */
.cta-bg { background-size: cover; background-position: center; }
@media (min-width: 1024px) and (hover: hover) { .cta-bg { background-attachment: fixed; } }
.cta-sheen { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cta-sheen::before {
    content: ""; position: absolute; top: -50%; bottom: -50%; width: 35%;
    background: linear-gradient(100deg, transparent, rgb(var(--primary) / .28), transparent);
    transform: translateX(-150%) rotate(12deg); animation: sheen 6.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 20% { transform: translateX(-150%) rotate(12deg); } 80%, 100% { transform: translateX(450%) rotate(12deg); } }
.stripes { background: repeating-linear-gradient(-45deg, rgb(var(--primary)) 0 14px, transparent 14px 28px); }

/* ── Formulário ──────────────────────────────────────────────────────────── */
.field { width: 100%; background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .12); color: #fff; padding: .9rem 1rem; transition: border-color .25s ease, background-color .25s ease; }
.field::placeholder { color: rgb(255 255 255 / .35); }
.field:focus { outline: none; border-color: rgb(var(--primary)); background: rgb(255 255 255 / .07); }
.field-label { display: block; font-family: "Barlow Condensed", sans-serif; letter-spacing: .14em; text-transform: uppercase; font-size: .85rem; color: rgb(255 255 255 / .6); margin-bottom: .4rem; }

.map-dark { filter: grayscale(1) invert(.92) contrast(.9) brightness(.9); }

/* ── Swiper ──────────────────────────────────────────────────────────────── */
.swiper-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem;
    border: 1px solid rgb(255 255 255 / .18); color: #fff; transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.swiper-btn:hover { background: rgb(var(--primary)); border-color: rgb(var(--primary)); color: #08080a; }
.swiper-btn.swiper-button-disabled { opacity: .35; pointer-events: none; }
.swiper-pagination-bullet { background: #fff; opacity: .3; width: 22px; height: 3px; border-radius: 0; transition: all .3s ease; }
.swiper-pagination-bullet-active { background: rgb(var(--primary)); opacity: 1; width: 44px; }

/* ── WhatsApp flutuante ──────────────────────────────────────────────────── */
.whats-float::before { content: ""; position: absolute; inset: 0; border-radius: 9999px; background: #25c366; animation: ping 2.4s cubic-bezier(0,0,.2,1) infinite; z-index: -1; }
@keyframes ping { 70%, 100% { transform: scale(1.7); opacity: 0; } }

/* ── Entrada ao rolar (só com JS ativo: sem JS o conteúdo fica visível) ──── */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ── Respeita quem desativa animações no sistema ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
    .js .hero-line > span { transform: none; animation: none; }
    .marquee-track { animation: none; }
    .cta-bg { background-attachment: scroll; }
}

/* ==========================================================================
   Páginas internas
   ========================================================================== */

/* ── Estoque: painel de filtros (lateral no desktop, deslizante no mobile) ── */
@media (max-width: 1023.98px) {
    .filtros {
        position: fixed; inset: 0; z-index: 60; background: var(--ink-950); overflow-y: auto;
        transform: translateX(-100%); visibility: hidden;
        transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility 0s linear .35s;
    }
    .filtros.is-open { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility 0s; }
}
@media (min-width: 1024px) { .filtros { position: sticky; top: 7rem; } }

.filtro-grupo { border-top: 1px solid rgb(255 255 255 / .1); padding: 1.1rem 0; }
.filtro-grupo > summary {
    display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none;
    font-family: "Barlow Condensed", sans-serif; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #fff;
}
.filtro-grupo > summary::-webkit-details-marker { display: none; }
.filtro-grupo > summary svg { transition: transform .25s ease; color: rgb(var(--primary)); }
.filtro-grupo[open] > summary svg { transform: rotate(180deg); }
.filtro-grupo[open] > summary { margin-bottom: .9rem; }
.filtro-lista { display: grid; gap: .15rem; }
.filtro-link { display: flex; align-items: center; justify-content: space-between; padding: .45rem .75rem; color: rgb(255 255 255 / .7); border-left: 2px solid transparent; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
.filtro-link:hover { color: #fff; background: rgb(255 255 255 / .05); }
.filtro-link.is-active { color: #fff; border-left-color: rgb(var(--primary)); background: rgb(var(--primary) / .1); }
.filtro-qtd { font-size: .8rem; color: rgb(255 255 255 / .4); }

.field-select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, rgb(var(--primary)) 50%), linear-gradient(135deg, rgb(var(--primary)) 50%, transparent 50%);
    background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.field-select option { background: var(--ink-800); color: #fff; }

/* ── Paginação ───────────────────────────────────────────────────────────── */
.pag-link {
    display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem;
    font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1.15rem; color: #fff;
    border: 1px solid rgb(255 255 255 / .18); transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.pag-link:hover { border-color: rgb(var(--primary)); color: rgb(var(--primary)); }
.pag-link.is-active { background: rgb(var(--primary)); border-color: rgb(var(--primary)); color: #08080a; }

/* ── Veículo: miniaturas da galeria e abas ───────────────────────────────── */
.swiper-galeria-thumbs .swiper-slide { cursor: pointer; opacity: .45; border: 2px solid transparent; transition: opacity .25s ease, border-color .25s ease; }
.swiper-galeria-thumbs .swiper-slide:hover { opacity: .8; }
.swiper-galeria-thumbs .swiper-slide-thumb-active { opacity: 1; border-color: rgb(var(--primary)); }

.aba {
    padding: 1.1rem .5rem; font-family: "Barlow Condensed", sans-serif; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: rgb(255 255 255 / .55); border-bottom: 2px solid rgb(255 255 255 / .1); transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}
.aba:hover { color: #fff; }
.aba.is-active { color: #fff; border-bottom-color: rgb(var(--primary)); background: rgb(var(--primary) / .08); }

/* Coluna de preço/contato fixa ao rolar — só quando cabe inteira na altura da tela */
@media (min-width: 1024px) and (min-height: 1000px) { .coluna-sticky { position: sticky; top: 7rem; } }
