/* Loja Dev — Identidade "painel" (ver docs/guia-de-estilo.md)
   Mobile-first, sem framework, contraste AA, tema único claro.
   Fontes servidas pela própria aplicação (subset latin, OFL). */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('/fonts/tektur-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   01 · Tokens
   ============================================================ */
:root {
  /* cor · base */
  --bg: #e6e6e3; /* alumínio — fundo da página */
  --surface: #f6f6f4; /* módulo — cards e painéis */
  --plate: #ffffff; /* chapa — campos e miniaturas */
  --ink: #121212; /* tinta — texto e fios fortes */
  --ink-2: #33332f; /* texto secundário */
  --muted: #5f5f5b; /* rótulos e ajuda (5.1:1 no alumínio) */
  --line: #cfcfca; /* divisórias */
  --line-strong: #84847e; /* bordas de controle (3:1+) */

  /* cor · ação (só preenchimento; texto sobre ele é sempre tinta) */
  --orange: #ff5a1f;
  --orange-hover: #ec4b12;

  /* cor · status */
  --ok: #1f6b3a;
  --ok-bg: #dcebe0;
  --warn: #8a4b00;
  --warn-bg: #fbe3c8;
  --danger: #b3261e;
  --danger-bg: #f6dcd9;
  --info: #1d4f8a;
  --info-bg: #dbe6f3;
  --neutral-bg: #dcdcd8;

  /* tipo */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  --font-display: 'Tektur', 'Geist', -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-11: 0.6875rem;
  --fs-13: 0.8125rem;
  --fs-15: 0.9375rem;
  --fs-17: 1.0625rem;
  --fs-20: 1.25rem;
  --fs-28: 1.75rem;
  --fs-40: 2.5rem;
  --fs-64: 4rem;

  /* espaço (base 4) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* forma */
  --r-1: 1px;
  --r-2: 2px;
  --r-3: 3px;
  --shadow-hard: 6px 6px 0 rgba(18, 18, 18, 0.1);

  /* movimento */
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 320ms;
  --t-draw: 900ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.5, 0, 0.9, 0.4);

  --container: 1120px;
  color-scheme: light;
}

/* ============================================================
   02 · Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-15);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

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

/* O JS esconde seções com o atributo hidden; nenhum display de componente pode vencer isso */
[hidden] {
  display: none !important;
}

[data-approved-slot]:empty {
  display: none;
}

.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;
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--surface);
  padding: var(--s-2) var(--s-4);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--s-2);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--s-4);
}

.site-main {
  flex: 1;
  padding-block: var(--s-6) var(--s-8);
}

.site-main > .container {
  display: grid;
  gap: var(--s-5);
}

/* ============================================================
   03 · Rótulos técnicos e marcadores
   ============================================================ */
.code {
  font: 500 var(--fs-11) / 1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.code--ink {
  color: var(--ink);
}

.sq2 {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
  margin-right: 6px;
}

.sq2::before,
.sq2::after {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--ink);
}

.xbox {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--ink);
  font: 10px/1 var(--font-mono);
  margin-right: 6px;
  color: var(--ink);
}

.chip {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 18px;
  padding: 0 4px;
  background: var(--ink);
  color: var(--surface);
  font: 600 var(--fs-11) / 1 var(--font-mono);
  border-radius: var(--r-1);
}

.chev {
  display: flex;
  gap: 4px;
}

.chev i {
  width: 26px;
  height: 30px;
  background: var(--ink);
  clip-path: polygon(0 0, 45% 0, 100% 50%, 45% 100%, 0 100%, 55% 50%);
}

.circuit path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.circuit circle {
  fill: var(--ink);
}

/* ============================================================
   04 · Cabeçalho e rodapé
   ============================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line-strong);
  position: relative;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-4);
  flex-wrap: wrap;
  min-height: 60px;
  padding-block: var(--s-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 700 1.125rem/1 var(--font-display);
  letter-spacing: 0;
  text-transform: lowercase;
}

/* Logo "terminal": placa chanfrada com o prompt >_ ; o cursor pisca como num terminal */
.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.brand-mark__cursor {
  animation: blink 1.1s steps(2, jump-none) infinite;
}

.brand:hover .brand-mark__cursor {
  fill: var(--orange);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-2) var(--s-5);
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.nav-link {
  text-decoration: none;
  color: var(--ink-2);
  text-transform: lowercase;
  padding-block: var(--s-1);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link--active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--orange);
}

.nav-user,
.nav-auth {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.user-greeting {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
}

.user-avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--surface);
  font: 600 var(--fs-11) var(--font-mono);
  border-radius: var(--r-1);
  flex: none;
}

.user-name {
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  flex-wrap: wrap;
  padding-block: var(--s-4);
  font-size: var(--fs-13);
  color: var(--muted);
}

.footer-brand strong {
  color: var(--ink);
  font-family: var(--font-display);
  text-transform: lowercase;
}

.footer-note {
  font: 500 var(--fs-11) / 1.6 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================================
   05 · Botões
   ============================================================ */
.btn {
  --h: 42px;
  height: var(--h);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-transform: lowercase;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  cursor: pointer;
  transition:
    background-color var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out);
}

.btn:hover {
  text-decoration: none;
}

.btn-sm {
  --h: 32px;
  padding: 0 12px;
  font-size: var(--fs-13);
  gap: 8px;
}

.btn-lg {
  --h: 52px;
  padding: 0 24px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn__arrow {
  font-family: var(--font-mono);
  font-weight: 500;
}

.btn-primary {
  background: var(--orange);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-primary:hover {
  background: var(--orange-hover);
}

.btn-primary:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--surface);
}

.btn-secondary:active,
.btn-success:active,
.btn-danger:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding-inline: 6px;
}

.btn-ghost:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
}

.btn-success {
  background: var(--surface);
  color: var(--ok);
  border-color: var(--ok);
}

.btn-success:hover {
  background: var(--ok);
  color: var(--plate);
}

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: var(--plate);
}

.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ============================================================
   06 · Avisos
   ============================================================ */
.alert {
  border: 1px solid currentColor;
  border-left-width: 4px;
  border-radius: var(--r-1);
  padding: var(--s-3) var(--s-4);
  font-size: 0.875rem;
  font-weight: 500;
  animation: rise var(--t-slow) var(--ease-out) both;
}

.alert--error {
  background: var(--danger-bg);
  color: var(--danger);
}

.alert--success {
  background: var(--ok-bg);
  color: var(--ok);
}

.alert--info {
  background: var(--info-bg);
  color: var(--info);
}

.alert--warning {
  background: var(--warn-bg);
  color: var(--warn);
}

/* ============================================================
   07 · Status (badges)
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: var(--r-1);
  font: 600 var(--fs-11) / 1 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--neutral-bg);
  color: var(--ink-2);
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: currentColor;
  flex: none;
}

.badge--lg {
  padding: 8px 12px;
  font-size: 0.75rem;
}

.badge--pending {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge--pending::before {
  animation: blink 1.2s steps(2, jump-none) infinite;
}

.badge--approved {
  background: var(--ok-bg);
  color: var(--ok);
  animation: flash var(--t-slow) var(--ease-out);
}

.badge--declined,
.badge--failed {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge--expired,
.badge--refunded,
.badge--neutral {
  background: var(--neutral-bg);
  color: var(--ink-2);
}

.tag {
  display: inline-block;
  font: 500 var(--fs-11) / 1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 6px;
  border: 1px solid var(--ink);
  border-radius: var(--r-1);
}

.tag--solid {
  background: var(--ink);
  color: var(--surface);
}

/* ============================================================
   08 · Módulo (miniatura do produto, CSS puro)
   ============================================================ */
.module {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--plate);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  overflow: hidden;
  transition:
    transform var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
}

.module__screws {
  position: absolute;
  inset: 6px;
  pointer-events: none;
  background:
    radial-gradient(circle, var(--line-strong) 1.5px, transparent 2px) top left /
      10px 10px no-repeat,
    radial-gradient(circle, var(--line-strong) 1.5px, transparent 2px) top
      right / 10px 10px no-repeat,
    radial-gradient(circle, var(--line-strong) 1.5px, transparent 2px) bottom
      left / 10px 10px no-repeat,
    radial-gradient(circle, var(--line-strong) 1.5px, transparent 2px) bottom
      right / 10px 10px no-repeat;
}

.module__glyph {
  position: absolute;
  left: 14%;
  top: 13%;
  font: 800 clamp(1.25rem, 3vw, 2rem) / 1 var(--font-display);
  font-stretch: 85%;
  text-transform: uppercase;
}

.module__pill {
  position: absolute;
  left: 14%;
  top: 36%;
  width: 22%;
  height: 7%;
  border-radius: 999px;
  background: var(--orange);
}

.module__knob {
  position: absolute;
  right: 18%;
  top: 52%;
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
  transition: transform var(--t-slow) var(--ease-out);
}

.module__perf {
  position: absolute;
  left: 14%;
  bottom: 14%;
  width: 22%;
  height: 32%;
  background: radial-gradient(circle, var(--ink) 1.3px, transparent 1.6px) 0 0 /
    8px 8px;
  opacity: 0.8;
}

.module .chip {
  position: absolute;
  right: 18%;
  top: 36%;
}

.module__code {
  position: absolute;
  right: 8%;
  bottom: 8%;
}

/* Ilustração do produto (SVG em public/img/produtos). O arquivo já traz o fundo
   alumínio; aqui só a moldura e o mesmo "levantar" do módulo no hover */
.product-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--bg);
  transition:
    transform var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
}

.product-card:hover .product-image {
  border-color: var(--ink);
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.hero__object .product-image,
.product-detail__media .product-image {
  box-shadow: var(--shadow-hard);
}

.hero__object .product-image {
  max-width: 190px;
}

.product-detail__media .product-image {
  max-width: 360px;
}

/* ============================================================
   09 · Catálogo (vitrine + grade)
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  padding: var(--s-6) var(--s-5) var(--s-5);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
}

.hero__slab {
  position: absolute;
  top: auto;
  bottom: 0;
  right: 0;
  width: 70%;
  height: 46%;
  background: var(--orange);
  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    46% 100%,
    46% 78%,
    18% 78%,
    18% 52%,
    0 52%
  );
  animation: wipe var(--t-slow) var(--ease-out) both;
}

.hero__circuit {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__circuit path {
  stroke-dasharray: 600;
  animation: draw 1.2s var(--ease-out) both 0.2s;
}

.hero__copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: var(--s-4);
}

.hero__title {
  font: 700 clamp(2.25rem, 7vw, 3.75rem) / 0.95 var(--font-display);
  font-stretch: 85%;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  text-wrap: balance;
  max-width: 12ch;
}

.hero__lead {
  max-width: 44ch;
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-4);
}

.hero__object {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: end;
}

.hero__object .module {
  max-width: 190px;
  box-shadow: var(--shadow-hard);
}

.hero__foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.hero__foot .code {
  color: var(--ink);
}

.hero__serial {
  font: 800 clamp(2.5rem, 7vw, 4.5rem) / 0.8 var(--font-display);
  font-stretch: 75%;
  letter-spacing: -0.01em;
}

.catalog-section {
  display: grid;
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  overflow: hidden;
  background: var(--surface);
  scroll-margin-top: 80px;
}

.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line-strong);
}

/* Fios desenhados por sombra (não pelo fundo da grade): com 5 itens em 4 colunas,
   a célula vazia fica da cor do painel em vez de virar um bloco cinza */
.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
}

.product-card {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  background: var(--surface);
  min-width: 0;
  box-shadow:
    1px 0 0 var(--line-strong),
    0 1px 0 var(--line-strong);
}

.product-card__thumb {
  grid-row: 1 / span 2;
  padding: var(--s-3);
  background: var(--bg);
  display: grid;
  align-content: start;
}

/* Miniatura pequena (celular): só sigla e chip, sem peças que se sobrepõem */
.product-card__thumb .module__code,
.product-card__thumb .module__perf,
.product-card__thumb .module__pill,
.product-card__thumb .module__knob {
  display: none;
}

.product-card__thumb .module .chip {
  top: auto;
  right: 10%;
  bottom: 10%;
}

.product-card__thumb .module__glyph {
  font-size: 1rem;
}

.product-card__body {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: var(--s-3) var(--s-4) 0;
}

.product-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-2);
}

.product-card__title {
  font-size: var(--fs-15);
  font-weight: 600;
  line-height: 1.3;
  text-transform: lowercase;
}

.product-card__title a {
  text-decoration: none;
}

/* O card inteiro é clicável sem duplicar links */
.product-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.product-card__title a:focus-visible {
  outline: none;
}

.product-card:has(a:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  z-index: 2;
}

.product-card__desc {
  font-size: var(--fs-13);
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--s-3) var(--s-4) var(--s-4);
}

.price-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.product-card__go {
  font: 500 var(--fs-13) var(--font-mono);
  text-transform: lowercase;
  transition: transform var(--t-base) var(--ease-out);
}

.product-card:hover .module {
  border-color: var(--ink);
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.product-card:hover .module__knob {
  transform: rotate(90deg) scale(1.15);
}

.product-card:hover .product-card__go {
  transform: translateX(4px);
}

/* Slot livre: vaga vazia do "rack" quando a última linha não fecha */
.product-slot {
  display: none;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: var(--s-4);
  background: var(--bg);
  box-shadow:
    1px 0 0 var(--line-strong),
    0 1px 0 var(--line-strong);
}

.product-slot__circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.product-slot__plate {
  position: relative;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--s-3);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-3);
  padding: var(--s-5);
}

.product-slot__title {
  font: 700 var(--fs-20) / 1.2 var(--font-display);
  text-transform: lowercase;
}

.product-slot .chev i {
  width: 14px;
  height: 16px;
}

/* ============================================================
   10 · Estado vazio e páginas de cabeçalho
   ============================================================ */
.empty-state {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--s-3);
  padding: var(--s-7) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
}

.empty-state > *:not(.empty-state__circuit) {
  position: relative;
}

.empty-state__circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.45;
  pointer-events: none;
}

.empty-state h2 {
  font: 700 var(--fs-20) / 1.2 var(--font-display);
  text-transform: lowercase;
}

.empty-state p {
  color: var(--ink-2);
  max-width: 40ch;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s-4);
  flex-wrap: wrap;
  border-bottom: 2px solid var(--ink);
  padding-bottom: var(--s-4);
}

.page-header > div {
  display: grid;
  gap: var(--s-2);
}

.page-title {
  font: 700 clamp(1.75rem, 5vw, 2.5rem) / 1 var(--font-display);
  font-stretch: 85%;
  text-transform: lowercase;
}

.page-subtitle {
  color: var(--ink-2);
  max-width: 60ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  font: 500 var(--fs-11) / 1.4 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
}

.breadcrumb [aria-current] {
  color: var(--ink);
}

/* ============================================================
   11 · Página do produto
   ============================================================ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  overflow: hidden;
}

.product-detail__media {
  background: var(--bg);
  padding: var(--s-5);
  display: grid;
  place-items: center;
}

.product-detail__media .module {
  max-width: 360px;
  box-shadow: var(--shadow-hard);
}

.product-detail__main {
  background: var(--surface);
  padding: var(--s-5);
  display: grid;
  align-content: start;
  gap: var(--s-4);
}

.product-detail__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.product-detail__title {
  font: 700 clamp(1.75rem, 5vw, 2.5rem) / 1 var(--font-display);
  font-stretch: 85%;
  text-transform: lowercase;
  text-wrap: balance;
}

.product-detail__desc {
  color: var(--ink-2);
  max-width: 60ch;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
  font-size: 0.875rem;
}

.feature-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.feature-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--ink);
  flex: none;
  transform: translateY(-2px);
}

.checkout-card {
  display: grid;
  gap: var(--s-3);
  border-top: 1px solid var(--line-strong);
  padding-top: var(--s-4);
}

.checkout-card__label {
  font: 500 var(--fs-11) / 1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.checkout-card__price {
  font: 700 var(--fs-40) / 1 var(--font-display);
  font-stretch: 85%;
  font-variant-numeric: tabular-nums;
}

.checkout-card__note,
.checkout-card__hint {
  font-size: var(--fs-13);
  color: var(--ink-2);
}

/* ============================================================
   12 · Formulários e autenticação
   ============================================================ */
.auth-section {
  display: grid;
  place-items: center;
  padding-block: var(--s-5);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r-2);
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
}

.auth-card__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px var(--s-4);
  background: var(--orange);
  border-bottom: 1px solid var(--ink);
}

.auth-card__body {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
}

.auth-title {
  font: 700 var(--fs-28) / 1.05 var(--font-display);
  font-stretch: 85%;
  text-transform: lowercase;
}

.auth-subtitle {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.auth-footer {
  font-size: 0.875rem;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  padding-top: var(--s-4);
}

.form {
  display: grid;
  gap: var(--s-4);
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-label {
  font-size: var(--fs-13);
  font-weight: 600;
  text-transform: lowercase;
}

.form-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  background: var(--plate);
  font-size: var(--fs-15);
  transition:
    border-color var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out);
}

.form-input::placeholder {
  color: var(--muted);
}

.form-input:hover {
  border-color: var(--ink-2);
}

.form-input:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--orange);
}

.form-input[aria-invalid='true'] {
  border-color: var(--danger);
}

.field-error {
  font-size: 0.75rem;
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

/* ============================================================
   13 · Lista de pedidos
   ============================================================ */
.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  overflow: hidden;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3) var(--s-4);
  flex-wrap: wrap;
  padding: var(--s-4);
  background: var(--surface);
  transition: background-color var(--t-fast) var(--ease-out);
}

.order-item:hover {
  background: var(--plate);
}

.order-item__info {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.order-item__top {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.order-item__date {
  font: 500 var(--fs-11) var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.order-item__title {
  font-size: var(--fs-17);
  font-weight: 600;
  text-transform: lowercase;
}

.order-item__title a {
  text-decoration: none;
}

.order-item__title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--orange);
}

.order-item__meta {
  font-size: var(--fs-13);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   14 · Detalhe do pedido e pagamento Pix
   ============================================================ */
.order-detail {
  display: grid;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  overflow: hidden;
}

.order-detail > * {
  background: var(--surface);
}

.order-detail__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding: var(--s-5);
}

.order-detail__header > div:first-child {
  display: grid;
  gap: var(--s-2);
}

.order-detail__eyebrow {
  font: 500 var(--fs-11) / 1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.order-detail__eyebrow code {
  color: var(--ink);
  font-size: 1em;
}

.order-detail__title {
  font: 700 clamp(1.5rem, 4.5vw, 2.25rem) / 1.05 var(--font-display);
  font-stretch: 85%;
  text-transform: lowercase;
  text-wrap: balance;
}

.order-detail__meta {
  font-size: var(--fs-13);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.order-detail__status-wrap {
  display: grid;
  justify-items: start;
  gap: var(--s-2);
}

.polling-hint {
  font: 500 var(--fs-11) var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Etapas: o estado vem do data-order-status do <article>, que o JS já atualiza */
.steps {
  display: flex;
  flex-wrap: wrap;
  padding: var(--s-3) var(--s-5);
  list-style: none;
  margin: 0;
  font: 500 var(--fs-11) var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.steps li {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  margin-left: -1px;
  transition: background-color var(--t-base) var(--ease-out);
}

.steps li:first-child {
  margin-left: 0;
}

.steps [data-step='pedido'] {
  border-color: var(--ink);
  color: var(--ink);
  position: relative;
}

[data-order-status='pending'] .steps [data-step='pagamento'],
[data-order-status='approved'] .steps [data-step='download'] {
  background: var(--orange);
  border-color: var(--ink);
  color: var(--ink);
  position: relative;
}

[data-order-status='approved'] .steps [data-step='pagamento'] {
  border-color: var(--ink);
  color: var(--ink);
  position: relative;
}

.panel {
  padding: var(--s-5);
  display: grid;
  gap: var(--s-3);
}

.panel__title {
  font: 700 var(--fs-20) / 1.2 var(--font-display);
  text-transform: lowercase;
}

.panel__subtitle {
  color: var(--ink-2);
  font-size: 0.875rem;
  max-width: 62ch;
}

.pix-panel {
  animation: rise var(--t-slow) var(--ease-out) both;
}

.pix-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
}

.pix-code {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font: 0.75rem var(--font-mono);
  color: var(--ink-2);
  background: var(--plate);
  border: 1px solid var(--ink);
  border-radius: var(--r-2);
  text-overflow: ellipsis;
}

.pix-code:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--orange);
}

.simulator-box {
  display: grid;
  gap: var(--s-2);
  border: 1px dashed var(--line-strong);
  padding: var(--s-3);
  margin-top: var(--s-2);
}

.simulator-box__label {
  font: 500 var(--fs-11) / 1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.simulator-actions,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
  align-items: center;
}

.download-panel {
  background: var(--ok-bg);
  animation: flash var(--t-slow) var(--ease-out);
}

.download-panel .panel__title {
  color: var(--ok);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.timeline__item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: var(--s-3);
  position: relative;
  padding-bottom: var(--s-4);
}

.timeline__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--ink);
}

.timeline__dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  background: var(--plate);
  border: 1px solid var(--ink);
}

.timeline__item:last-child .timeline__dot {
  background: var(--orange);
}

.timeline__content {
  display: grid;
  gap: 2px;
  font-size: 0.875rem;
}

.timeline__meta {
  font: 500 var(--fs-11) / 1.5 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ============================================================
   15 · Página de erro
   ============================================================ */
.error-card {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--s-4);
  padding: var(--s-8) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
}

.error-code {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font: 800 clamp(4.5rem, 16vw, 7rem) / 0.8 var(--font-display);
  font-stretch: 75%;
}

.error-code::before {
  content: '';
  width: 0.55em;
  height: 0.55em;
  background: var(--orange);
  clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%);
}

.error-title {
  font: 700 var(--fs-20) / 1.2 var(--font-display);
  text-transform: lowercase;
  text-wrap: balance;
}

.error-message {
  color: var(--ink-2);
  max-width: 48ch;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-3);
}

/* ============================================================
   16 · Movimento
   ============================================================ */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes flash {
  0% {
    box-shadow: 0 0 0 0 var(--ok);
  }
  40% {
    box-shadow: 0 0 0 6px var(--ok-bg);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 600;
  }
}

@keyframes wipe {
  from {
    clip-path: polygon(0 0, 0 0, 0 52%, 0 52%, 0 52%, 0 52%, 0 52%, 0 52%);
  }
}

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

/* ============================================================
   17 · Quebras de layout (420 · 680 · 1000)
   ============================================================ */
@media (min-width: 420px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    display: flex;
    flex-direction: column;
  }

  .product-card__thumb {
    padding: var(--s-4);
  }

  .product-card__thumb .module__code,
  .product-card__thumb .module__perf,
  .product-card__thumb .module__pill,
  .product-card__thumb .module__knob {
    display: block;
  }

  .product-card__thumb .module .chip {
    top: 36%;
    right: 18%;
    bottom: auto;
  }

  .product-card__thumb .module__glyph {
    font-size: clamp(1.25rem, 3vw, 2rem);
  }

  .slot-2-1 {
    display: block;
  }
}

@media (min-width: 680px) {
  .container {
    padding-inline: var(--s-5);
  }

  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    padding: var(--s-7) var(--s-6) var(--s-5);
    min-height: 400px;
  }

  .hero__slab {
    top: 0;
    bottom: auto;
    width: 58%;
    height: 64%;
  }

  .hero__circuit {
    display: block;
  }

  .hero__object {
    justify-items: center;
    align-content: center;
  }

  .hero__object .module,
  .hero__object .product-image {
    max-width: 260px;
  }

  .hero__foot {
    grid-column: 1 / -1;
  }

  .pix-box {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .order-detail__status-wrap {
    justify-items: end;
  }

  .product-detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .product-detail__media,
  .product-detail__main {
    padding: var(--s-6);
  }
}

@media (min-width: 1000px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .slot-2-1 {
    display: none;
  }

  .slot-4-1,
  .slot-4-2,
  .slot-4-3 {
    display: block;
  }

  .slot-4-2 {
    grid-column: span 2;
  }

  .slot-4-3 {
    grid-column: span 3;
  }
}
