/* Mercado Livre — tema base do funil */
:root {
  --ml-yellow: #FFE600;
  --ml-blue: #3483FA;
  --ml-blue-hover: #2968C8;
  --ml-blue-active: #1D4F91;
  --ml-green: #00A650;
  --ml-green-hover: #008F47;
  --ml-red: #F23D4F;
  --ml-orange: #FF7733;
  --ml-text: rgba(0, 0, 0, 0.9);
  --ml-text-secondary: rgba(0, 0, 0, 0.55);
  --ml-text-muted: rgba(0, 0, 0, 0.45);
  --ml-bg: #EDEDED;
  --ml-white: #FFFFFF;
  --ml-border: rgba(0, 0, 0, 0.1);
  --ml-border-input: rgba(0, 0, 0, 0.25);
  --ml-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.12);
  --ml-shadow-card: 0 8px 24px rgba(0, 0, 0, 0.08);
  --ml-radius: 6px;
  --ml-font: "Proxima Nova", -apple-system, "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  --cor-primaria: var(--ml-text);
  --cor-destaque: var(--ml-blue);
  --cor-destaque-hover: var(--ml-blue-hover);
  --cor-sucesso: var(--ml-green);
  --cor-erro: var(--ml-red);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ml-font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ml-text);
  background: var(--ml-bg);
}

a {
  color: var(--ml-blue);
  text-decoration: none;
}

a:hover {
  color: var(--ml-blue-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* Acessibilidade */
#acessibilidade {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#acess-drop-down {
  display: none;
}

/* Header ML */
#menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 55px;
  padding: 0 1rem;
  background: var(--ml-yellow);
  box-shadow: var(--ml-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

#menu > a.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 134px;
  height: 34px;
  background: url("https://http2.mlstatic.com/frontend-assets/ml-web-navigation/ui-navigation/6.6.157/mercadolibre/logo__small@2x.png") no-repeat left center / contain;
  text-indent: -9999px;
  overflow: hidden;
}

#menu > a.hamburger,
#menu > a.pesquisar {
  display: none;
}

#menu > a.entrar:not(.usuario-nome) {
  display: none;
}

#menu > .menu {
  display: none;
}

body.menu-aberto #menu > .menu {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--ml-white);
  border-top: 1px solid var(--ml-border);
  box-shadow: var(--ml-shadow-card);
  padding: 0.75rem 1rem;
  z-index: 999;
}

#menu > .menu section h1 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--ml-text);
}

#menu > .menu a {
  display: block;
  padding: 0.5rem 0;
  color: var(--ml-text);
  font-size: 0.875rem;
}

/* Main */
main {
  padding: 1.5rem 0 2.5rem;
}

main .container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
}

main h3 {
  margin: 0 0 0.75rem;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ml-text);
  letter-spacing: -0.01em;
}

/* Breadcrumb */
#trilha {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  color: var(--ml-text-muted);
}

#trilha a {
  color: var(--ml-text-muted);
  pointer-events: none;
}

#trilha a:not(:last-child)::after {
  content: "›";
  margin-left: 0.35rem;
  color: var(--ml-text-muted);
}

#trilha a:last-child {
  color: var(--ml-text-secondary);
  font-weight: 500;
}

/* Cards */
.jumbotron {
  background: var(--ml-white);
  border: 1px solid var(--ml-border);
  border-radius: var(--ml-radius);
  box-shadow: var(--ml-shadow);
  padding: 2rem 1.75rem;
  margin-bottom: 1.5rem;
}

/* Formulários */
.form-control {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ml-text);
  background: var(--ml-white);
  border: 1px solid var(--ml-border-input);
  border-radius: var(--ml-radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--ml-blue);
  box-shadow: 0 0 0 2px rgba(52, 131, 250, 0.25);
}

.form-control::placeholder {
  color: var(--ml-text-muted);
}

.campos .rotulo label {
  font-size: 0.875rem;
  color: var(--ml-text);
  line-height: 1.5;
}

.campos .rotulo strong {
  font-weight: 600;
}

.campos > div[style] {
  font-size: 0.8125rem;
  color: var(--ml-text-secondary);
}

.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: var(--ml-radius);
  transition: background 0.15s, transform 0.1s;
}

.btn-primary,
.botao-principal {
  background: var(--ml-blue);
  color: var(--ml-white);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  min-height: 48px;
}

.btn-primary:hover,
.botao-principal:hover {
  background: var(--ml-blue-hover);
}

.btn-primary:active,
.botao-principal:active {
  background: var(--ml-blue-active);
}

/* Loader ML — "Preparando tudo para sua compra" */
#loading,
#loadingPage {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--ml-white);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

#loading.show,
#loading.visivel,
#loadingPage.show,
#loadingPage.visivel {
  display: flex !important;
}

.ml-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
}

.ml-loader-text {
  margin: 0;
  font-family: var(--ml-font);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--ml-text);
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 16rem;
}

.ml-loader-spinner {
  width: 48px;
  height: 48px;
  animation: ml-loader-spin 0.9s linear infinite;
}

.ml-loader-spinner circle {
  transform-origin: center;
}

.ml-loader-hint {
  display: none;
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ml-text-muted);
  max-width: 18rem;
  line-height: 1.4;
}

#loadingPage.show-hint .ml-loader-hint,
#loadingPage.visivel .ml-loader-hint {
  display: block;
}

@keyframes ml-loader-spin {
  to { transform: rotate(360deg); }
}

/* Footer ML */
#rodape {
  background: var(--ml-white);
  border-top: 1px solid var(--ml-border);
  padding: 2rem 1rem 1.5rem;
  margin-top: auto;
}

#rodape .recipiente {
  max-width: 680px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  #rodape .recipiente.largura-maxima {
    grid-template-columns: 1fr 1fr;
  }
}

#rodape h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ml-text);
  margin: 0 0 0.75rem;
}

#rodape .lista-icone {
  list-style: none;
  margin: 0;
  padding: 0;
}

#rodape .lista-icone li {
  margin-bottom: 0.5rem;
}

#rodape .lista-icone a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ml-text-secondary);
  font-size: 0.8125rem;
}

#rodape .lista-icone a:hover {
  color: var(--ml-blue);
}

#rodape .icones-link {
  width: 18px;
  height: 18px;
  opacity: 0.55;
}

#rodape .marca-gov {
  display: none;
}

#rodape .copyright {
  text-align: center;
  font-size: 0.75rem;
  color: var(--ml-text-muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ml-border);
}

/* Carousel (banners) — oculto no tema ML */
.bannersro {
  display: none;
}

/* Utilitários */
.hidden { display: none !important; }
.oculto { display: none !important; }

.d-flex { display: flex; }
.flex-row { flex-direction: row; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

@media (max-width: 767px) {
  .jumbotron {
    padding: 1.5rem 1.25rem;
  }

  main h3 {
    font-size: 1.2rem;
  }
}
