/* =========================================================
   VAI DE PEÇA — BASE CSS v5
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body, 'Barlow', system-ui, sans-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main, #031E36);
  background: var(--bg-page, #d5e3ef);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

/* Reset global de links — navegação e UI não precisam de underline   */
/* Links em contexto de texto (modais, termos, conteúdo) serão        */
/* estilizados por seus componentes com !important quando necessário  */


.container {
  width: min(100% - 32px, var(--container-width, 1440px));
  margin: 0 auto;
}

/* Cart badge */
.header-cart-link { position: relative; }

.header-cart-badge {
  position: absolute;
  top: -6px; right: -10px;
  min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px;
  background: var(--orange, #E8500A);
  color: #fff; font-size: 11px; font-weight: 800;
  line-height: 18px; text-align: center;
  box-shadow: 0 2px 8px rgba(232, 80, 10, 0.4);
}

:focus-visible {
  outline: 2px solid var(--blue-mid, #4474A3);
  outline-offset: 3px; border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-muted); }
::-webkit-scrollbar-thumb { background: var(--blue-sky); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-mid); }

/* =========================================================
   FIX CRÍTICO — links visíveis no header escuro
   O body herda color: #031E36 que é idêntico ao bg do header
   Todos os elementos interativos dentro do header precisam
   de cor explícita para não ficarem invisíveis.
   ========================================================= */
.home-header a,
.home-header button,
.home-header input {
  color: rgba(220, 232, 244, 0.90);
}

/* Carrinho — borda laranja para destaque visual */
.home-header a[href*="carrinho"],
.home-header .header-cart,
.home-header .home-header__action-btn--cart {
  color: #ffffff !important;
  border: 2px solid #E8500A !important;
  border-radius: 4px;
  padding: 0 14px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

/* Input de busca — texto branco no campo escuro */
.home-header input[type="search"],
.home-header input[type="text"] {
  color: #ffffff;
}
