/* ============================================================
   base.css — Reset, tipografia global, utilitários base
   NÃO EDITAR POR CLIENTE
   ============================================================ */

/* ── RESET ── */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ecom-font-body);
  font-size: var(--ecom-text-base);
  font-weight: var(--ecom-font-regular);
  line-height: var(--ecom-leading-normal);
  color: var(--ecom-text-primary);
  background-color: var(--ecom-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
}

/* ── TIPOGRAFIA ── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ecom-font-heading);
  font-weight: var(--ecom-font-bold);
  line-height: var(--ecom-leading-tight);
  color: var(--ecom-text-primary);
}

h1 {
  font-size: var(--ecom-text-4xl);
  letter-spacing: var(--ecom-tracking-tight);
}

h2 {
  font-size: var(--ecom-text-3xl);
  letter-spacing: var(--ecom-tracking-tight);
}

h3 {
  font-size: var(--ecom-text-xl);
}

h4 {
  font-size: var(--ecom-text-lg);
}

p {
  line-height: var(--ecom-leading-normal);
}

small {
  font-size: var(--ecom-text-sm);
}

strong {
  font-weight: var(--ecom-font-semibold);
}

/* ── FOCO ── */

:focus-visible {
  outline: 2px solid var(--ecom-border-focus);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ── UTILITÁRIOS DE ACESSIBILIDADE ── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ── SKIP LINK ── */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--ecom-space-4);
  padding: var(--ecom-space-2) var(--ecom-space-4);
  background: var(--ecom-action-primary);
  color: var(--ecom-text-on-primary);
  border-radius: var(--ecom-radius-md);
  z-index: var(--ecom-z-toast);
  transition: top var(--ecom-duration-fast) var(--ecom-ease-default);
  font-weight: var(--ecom-font-semibold);
  font-size: var(--ecom-text-sm);
}

.skip-link:focus {
  top: var(--ecom-space-4);
}

/* ── HIDDEN ATTRIBUTE ── */

[hidden] {
  display: none !important;
}

/* ── MOTION ── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
