/* Rota Motos — componentes: topo, cabeçalho, rodapé, cartões, filtros ativos, paginação. */

/* Barra superior e cabeçalho */
.rm-topbar { background: var(--rm-ink); color: #D9DAD6; font-size: 13px; padding: 10px 0; }
.rm-topbar__in { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

.rm-header { background: #fff; border-bottom: 1px solid var(--rm-line); }
.rm-header__in { min-height: 80px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.rm-header__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.custom-logo-link img { max-height: 56px; width: auto; display: block; }

.rm-logo { display: inline-flex; align-items: baseline; gap: 6px; color: var(--rm-ink); }
.rm-logo__a { font-family: var(--rm-head); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.rm-logo__b { font-family: var(--rm-head); font-weight: 600; font-size: 13px; letter-spacing: 0.24em; color: var(--rm-accent); }
.rm-logo--footer .rm-logo__a { font-size: 24px; }
.rm-logo--footer .rm-logo__b { font-size: 12px; }

.rm-nav__list { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 15px; font-weight: 500; }
.rm-nav__list a { display: inline-block; padding: 12px 0; }
.rm-nav__list .current-menu-item > a,
.rm-nav__list .current_page_item > a,
.rm-nav__list .current-menu-ancestor > a { color: var(--rm-accent); }

/* Rodapé */
.rm-footer { background: #fff; border-top: 1px solid var(--rm-line); padding: 64px 0 32px; }
.rm-footer__in { display: flex; flex-direction: column; gap: 48px; }
.rm-footer__top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.rm-footer__brand { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.rm-footer__brand p { color: var(--rm-muted); line-height: 1.6; font-size: 14px; }
.rm-footer__cols { display: flex; flex-wrap: wrap; gap: 32px 56px; font-size: 14px; }
.rm-footer__col { display: flex; flex-direction: column; gap: 10px; }
.rm-footer__col a, .rm-footer__menu a { color: var(--rm-soft); }
.rm-footer__title { font-weight: 600; }
.rm-footer__menu { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.rm-footer__bottom { padding-top: 24px; border-top: 1px solid #EEEDE8; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--rm-muted); }

/* Seções e cabeçalhos de página */
.rm-section { padding: 96px 0 0; }
.rm-section--tight { padding-top: 48px; }
.rm-section--last { padding-bottom: 96px; }
.rm-section--moto { padding-top: 64px; }
.rm-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.rm-section__head > div { display: flex; flex-direction: column; gap: 8px; }

.rm-page-head { padding: 40px 0 24px; }
.rm-page-head--compact { padding: 32px 0 0; }
.rm-page-head .rm-wrap { display: flex; flex-direction: column; gap: 12px; }
.rm-page-head__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.rm-crumbs { font-size: 13px; color: var(--rm-muted); display: flex; flex-wrap: wrap; gap: 8px; }

/* Cartões de moto */
.rm-grid { display: grid; gap: 20px; }
.rm-grid--lista, .rm-grid--similares { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.rm-grid--destaques { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.rm-grid--estilos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 16px; }
.rm-grid--servicos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.rm-grid--similares { margin-top: 24px; }

.rm-card { background: #fff; border: 1px solid var(--rm-line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.rm-card--destaque { border-radius: 24px; }
.rm-card__media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--rm-media); color: #80858B; overflow: hidden; }
.rm-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rm-badge { position: absolute; top: 14px; left: 14px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fff; color: var(--rm-ink); }
.rm-card--destaque .rm-badge { top: 16px; left: 16px; padding: 6px 12px; }
.rm .rm-badge--accent { background: var(--rm-accent); color: #fff; }
.rm-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.rm-card--destaque .rm-card__body { padding: 22px 24px 24px; gap: 14px; }
.rm-card__title { font-weight: 700; font-size: 19px; line-height: 1.2; }
.rm-card--destaque .rm-card__title { font-size: 22px; letter-spacing: -0.01em; }
.rm-card__meta { font-size: 13px; color: var(--rm-soft); }
.rm-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rm-card--destaque .rm-card__foot { padding-top: 14px; border-top: 1px solid #EEEDE8; gap: 12px; }
.rm-card__price { display: flex; flex-direction: column; }
.rm-card__price-label { font-size: 12px; color: var(--rm-muted); }
.rm-card__price-value { font-family: var(--rm-head); font-weight: 800; font-size: 22px; }
.rm-card--destaque .rm-card__price-value { font-size: 24px; }
.rm-card__price-value--ask { font-size: 18px; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--rm-soft); }
.rm-chip { padding: 5px 10px; background: var(--rm-chip); border-radius: 8px; }

/* Avisos, filtros ativos, estado vazio */
.rm-notice { padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.4; }
.rm-notice--ok { background: #E8F5EA; color: #14532D; border: 1px solid #B7DFBF; }
.rm-notice--erro { background: #FDECEA; color: #7F1D1D; border: 1px solid #F3B8B2; }

.rm-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--rm-line); font-size: 14px; }

.rm-empty { background: #fff; border: 1px dashed var(--rm-line2); border-radius: 20px; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--rm-soft); }
.rm-empty__title { font-family: var(--rm-head); font-weight: 700; font-size: 20px; color: var(--rm-ink); }
.rm-empty__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }

/* Paginação */
.rm .navigation.pagination { display: flex; justify-content: center; padding-top: 32px; }
.rm .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rm .page-numbers { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--rm-line2); background: #fff; font-weight: 600; }
.rm .page-numbers.current { background: var(--rm-ink); border-color: var(--rm-ink); color: #fff; }
.rm .page-numbers.dots { border: 0; background: none; }

.rm-post + .rm-post { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--rm-line); }

/* ------------------------------------------------------------------
 * Botões redondos do cabeçalho (lupa e menu)
 * ------------------------------------------------------------------ */
.rm-icone-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	flex: none; width: 44px; height: 44px; margin: 0; padding: 0;
	background: #fff; color: var(--rm-ink);
	border: 1px solid var(--rm-line3); border-radius: 999px;
	font: 600 14px/1 var(--rm-body); cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	-webkit-tap-highlight-color: transparent;
}
.rm-icone-btn:hover,
.rm-icone-btn[aria-expanded="true"] { border-color: var(--rm-ink); }
.rm-icone-btn svg { display: block; flex: none; }

/* Botão "Menu" (só aparece no celular/tablet) */
.rm-menu-btn { display: none; }
.rm-menu-btn__icone { position: relative; display: block; width: 18px; height: 12px; flex: none; }
.rm-menu-btn__icone i {
	position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
	transition: transform 0.2s, opacity 0.2s, top 0.2s;
}
.rm-menu-btn__icone i:nth-child(1) { top: 0; }
.rm-menu-btn__icone i:nth-child(2) { top: 5px; }
.rm-menu-btn__icone i:nth-child(3) { top: 10px; }
.rm-menu-btn[aria-expanded="true"] .rm-menu-btn__icone i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.rm-menu-btn[aria-expanded="true"] .rm-menu-btn__icone i:nth-child(2) { opacity: 0; }
.rm-menu-btn[aria-expanded="true"] .rm-menu-btn__icone i:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* Itens que só existem dentro do painel do celular */
.rm-nav__extra { display: none; }

/* ------------------------------------------------------------------
 * Busca no topo
 * ------------------------------------------------------------------ */
.rm-busca { position: relative; display: none; }
.rm-js .rm-busca { display: flex; }
.rm-busca__painel {
	position: absolute; top: calc(100% + 12px); right: 0; z-index: 60;
	width: min(400px, calc(100vw - 32px)); padding: 12px;
	background: #fff; border: 1px solid var(--rm-line); border-radius: 16px;
	box-shadow: 0 24px 48px -20px rgba(17, 19, 21, 0.35);
	animation: rm-surgir 0.15s ease-out;
}
.rm-busca__painel[hidden] { display: none; }
.rm-busca__form { display: flex; gap: 8px; margin: 0; }
.rm .rm-busca__campo {
	flex: 1 1 auto; min-width: 0; height: 48px; margin: 0; padding: 0 14px;
	background: var(--rm-field); color: var(--rm-ink);
	border: 1px solid var(--rm-line2); border-radius: 12px;
	font: 400 16px/1.2 var(--rm-body); /* 16px evita o zoom do iPhone */
}
.rm .rm-busca__campo:focus { outline: none; border-color: var(--rm-ink); box-shadow: 0 0 0 3px rgba(17, 19, 21, 0.12); }
.rm-busca__enviar { flex: none; min-height: 48px; border-radius: 12px; padding: 0 18px; }

@keyframes rm-surgir { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
	.rm-busca__painel, .rm-nav { animation: none !important; }
	.rm-menu-btn__icone i { transition: none; }
}

/* ------------------------------------------------------------------
 * Cabeçalho compacto: celular, tablet ou menu que não cabe numa linha.
 * A classe .is-compacto é posta pelo próprio cabeçalho (antes de desenhar)
 * e atualizada pelo theme.js quando a tela muda de tamanho.
 * ------------------------------------------------------------------ */
.rm-header.is-compacto { position: sticky; top: 0; z-index: 50; }
.admin-bar .rm-header.is-compacto { top: 32px; }
@media (max-width: 782px) { .admin-bar .rm-header.is-compacto { top: 46px; } }
@media (max-width: 600px) { .admin-bar .rm-header.is-compacto { top: 0; } }

.is-compacto .rm-header__in { min-height: 68px; flex-wrap: nowrap; gap: 12px; }
.is-compacto .rm-header__in > .rm-logo,
.is-compacto .rm-header__in > .custom-logo-link { flex: 0 1 auto; min-width: 0; }
.is-compacto .rm-logo__a { font-size: 22px; }
.is-compacto .rm-logo__b { font-size: 11px; letter-spacing: 0.2em; }
.is-compacto .custom-logo-link img { max-height: 44px; }

.is-compacto .rm-header__cta { flex-wrap: nowrap; align-items: center; gap: 8px; margin-left: auto; }
.is-compacto .rm-header__vender { display: none; }
.is-compacto .rm-header__whats { min-height: 44px; padding: 0 16px; }
.is-compacto .rm-menu-btn { display: inline-flex; width: auto; padding: 0 16px 0 14px; }

/* Painel do menu: abre logo abaixo do cabeçalho e escurece o resto da página */
.is-compacto .rm-nav {
	display: none;
	position: absolute; top: 100%; left: 0; right: 0; z-index: 55;
	max-height: var(--rm-painel-max, 75vh); overflow-y: auto; overscroll-behavior: contain;
	padding: 4px 24px 28px;
	background: #fff; border-top: 1px solid var(--rm-line);
	box-shadow: 0 0 0 100vmax rgba(17, 19, 21, 0.45);
	clip-path: inset(0 -100vmax -100vmax -100vmax);
	animation: rm-surgir 0.18s ease-out;
}
.is-compacto.is-menu-aberto .rm-nav { display: block; }
.is-compacto .rm-nav__list { flex-direction: column; flex-wrap: nowrap; gap: 0; font-size: 17px; font-weight: 600; }
.is-compacto .rm-nav__list li { border-bottom: 1px solid #EEEDE8; }
.is-compacto .rm-nav__list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 14px 2px; }
.is-compacto .rm-nav__list a::after {
	content: ''; flex: none; width: 8px; height: 8px; margin-right: 4px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(-45deg); opacity: 0.35;
}
.is-compacto .rm-nav__extra { display: grid; gap: 10px; margin-top: 20px; }
.is-compacto .rm-nav__info { display: grid; gap: 12px; margin-top: 10px; padding-top: 16px; border-top: 1px solid #EEEDE8; font-size: 14px; color: var(--rm-soft); }
.is-compacto .rm-nav__info li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.4; }
.is-compacto .rm-nav__info svg { flex: none; margin-top: 1px; color: var(--rm-accent); }
.is-compacto .rm-nav__info a { font-weight: 600; color: var(--rm-ink); }

/* Lupa no celular: o campo abre na largura da tela, logo abaixo do cabeçalho */
.is-compacto .rm-busca { position: static; }
.is-compacto .rm-busca__painel { top: calc(100% + 8px); left: 12px; right: 12px; width: auto; }

/* Página travada enquanto o menu está aberto; âncoras (#contato) não ficam atrás do topo fixo */
html.rm-menu-aberto { overflow: hidden; }
html.rm-topo-compacto { scroll-padding-top: 84px; }
html.rm-topo-compacto .rm-buybox { top: 92px; }

/* Telas estreitas */
@media (max-width: 599px) {
	.is-compacto .rm-header__in { gap: 8px; padding-left: 16px; padding-right: 16px; }
	.is-compacto .rm-nav { padding-left: 16px; padding-right: 16px; }
	.is-compacto .rm-header__whats { width: 44px; padding: 0; }
	.rm-js .rm-topbar__contato { display: none; } /* endereço e telefone ficam dentro do menu */
	.is-compacto .rm-header__whats-txt {
		position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
	}
	.rm-topbar { padding: 8px 0; font-size: 12px; }
}
@media (max-width: 374px) {
	.is-compacto .rm-header__cta { gap: 6px; }
	.is-compacto .rm-menu-btn { width: 44px; padding: 0; }
	.is-compacto .rm-menu-btn__txt {
		position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
	}
	.is-compacto .rm-logo { gap: 4px; }
	.is-compacto .rm-logo__a { font-size: 20px; }
	.is-compacto .rm-logo__b { font-size: 10px; letter-spacing: 0.16em; }
}
