/* =========================================================
   MANTO ALPHA — Brand CSS
   Vista sua paixão.
   Tokens + base + componentes. Prefixo: --ma- / .ma-
   ========================================================= */

/* Montserrat entra por <link> com preconnect em cada HTML (evita carregar duas vezes). */

/* ---------- 1. Tokens (tema claro = padrão) ---------- */
:root,
[data-theme="light"] {
  /* Cores da marca (fixas) */
  --ma-amarelo-alpha: #FEC102;
  --ma-amarelo-profundo: #E0A800;
  --ma-preto-manto: #0D0D0D;
  --ma-off-white: #F7F4EF;
  --ma-branco: #FFFFFF;

  /* Papéis semânticos */
  --ma-surface: #F7F4EF;          /* fundo da página */
  --ma-surface-raised: #FFFFFF;   /* cards, modais, painéis */
  --ma-surface-sunken: #EFEBE4;   /* áreas recuadas, skeleton */
  --ma-surface-inverse: #0D0D0D;  /* faixas de contraste, header, rodapé */
  --ma-ink: #0D0D0D;              /* texto principal (17,7:1) */
  --ma-ink-muted: #5C5A57;        /* texto secundário (6,3:1) */
  --ma-ink-inverse: #F7F4EF;      /* texto sobre surface-inverse */
  --ma-accent: #FEC102;           /* ação principal, destaques */
  --ma-accent-hover: #E0A800;
  --ma-on-accent: #0D0D0D;        /* texto sobre accent: sempre preto */
  --ma-accent-text: #7A5A00;      /* "amarelo" como texto no tema claro (5,8:1) */
  --ma-line: #D9D5CF;             /* divisórias decorativas */
  --ma-line-strong: #8C8A86;      /* borda de campos/controles (≥3:1) */
  --ma-focus-ring: #0D0D0D;
  --ma-success: #1B7F46;
  --ma-success-bg: #E3F2E9;
  --ma-danger: #B3261E;
  --ma-danger-bg: #FBE7E5;
  --ma-warning-bg: #FFF4CC;
  --ma-overlay: rgba(13, 13, 13, 0.6);

  /* Tipografia */
  --ma-font-display: 'Montserrat', 'Arial Black', system-ui, sans-serif;
  --ma-font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ma-text-display-xl: 900 clamp(40px, 7vw, 72px)/1 var(--ma-font-display);
  --ma-text-display: 800 clamp(32px, 5vw, 48px)/1.08 var(--ma-font-display);
  --ma-text-h1: 800 clamp(26px, 3.5vw, 32px)/1.2 var(--ma-font-sans);
  --ma-text-h2: 700 24px/1.25 var(--ma-font-sans);
  --ma-text-h3: 700 18px/1.33 var(--ma-font-sans);
  --ma-text-body-lg: 400 18px/1.55 var(--ma-font-sans);
  --ma-text-body: 400 16px/1.5 var(--ma-font-sans);
  --ma-text-small: 500 13px/1.4 var(--ma-font-sans);
  --ma-text-price: 800 28px/1.15 var(--ma-font-display);
  --ma-tracking-tagline: 0.27em;
  --ma-tracking-button: 0.04em;

  /* Espaçamento (múltiplos de 4) */
  --ma-space-1: 4px;
  --ma-space-2: 8px;
  --ma-space-3: 12px;
  --ma-space-4: 16px;
  --ma-space-5: 20px;
  --ma-space-6: 24px;
  --ma-space-8: 32px;
  --ma-space-12: 48px;
  --ma-space-16: 64px;

  /* Raios */
  --ma-radius-sm: 4px;    /* selos, etiquetas */
  --ma-radius-md: 8px;    /* botões, campos, cards */
  --ma-radius-lg: 16px;   /* modais, banners */
  --ma-radius-pill: 999px;/* traços da assinatura, chips */

  /* Sombras (só hover e sobreposições) */
  --ma-shadow-card: 0 1px 2px rgba(13,13,13,.08), 0 8px 24px rgba(13,13,13,.08);
  --ma-shadow-overlay: 0 12px 40px rgba(13,13,13,.18);

  /* Layout e movimento */
  --ma-container: 1200px;
  --ma-header-h: 64px;
  --ma-ease: cubic-bezier(.2, .7, .2, 1);
  --ma-dur: 180ms;

  color-scheme: light;
}

/* ---------- Tema escuro ---------- */
[data-theme="dark"] {
  --ma-surface: #0D0D0D;
  --ma-surface-raised: #1A1A1A;
  --ma-surface-sunken: #141414;
  --ma-surface-inverse: #F7F4EF;
  --ma-ink: #F7F4EF;
  --ma-ink-muted: #A9A59F;
  --ma-ink-inverse: #0D0D0D;
  --ma-accent: #FEC102;
  --ma-accent-hover: #FFD34D;
  --ma-on-accent: #0D0D0D;
  --ma-accent-text: #FEC102;
  --ma-line: #2E2E2E;
  --ma-line-strong: #6E6A65;
  --ma-focus-ring: #FEC102;
  --ma-success: #4CC47F;
  --ma-success-bg: #12301F;
  --ma-danger: #FF7A6E;
  --ma-danger-bg: #3A1512;
  --ma-warning-bg: #332700;
  --ma-overlay: rgba(0, 0, 0, 0.7);
  --ma-shadow-card: 0 8px 24px rgba(0,0,0,.5);
  --ma-shadow-overlay: 0 16px 48px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* Tema claro fixo por decisão do dono: sem troca automática pelo modo escuro
   do aparelho. O bloco [data-theme="dark"] acima fica inerte (ninguém o aplica). */

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font: var(--ma-text-body);
  color: var(--ma-ink);
  background: var(--ma-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 { margin: 0 0 var(--ma-space-3); color: var(--ma-ink); }
h1 { font: var(--ma-text-h1); }
h2 { font: var(--ma-text-h2); }
h3 { font: var(--ma-text-h3); }
p  { margin: 0 0 var(--ma-space-4); }
small { font: var(--ma-text-small); color: var(--ma-ink-muted); }

a { color: var(--ma-ink); text-decoration: underline; text-decoration-color: var(--ma-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color var(--ma-dur) var(--ma-ease); }
a:hover { color: var(--ma-accent-text); }

hr { border: 0; border-top: 1px solid var(--ma-line); margin: var(--ma-space-8) 0; }

::selection { background: var(--ma-accent); color: var(--ma-on-accent); }

:focus-visible { outline: 2px solid var(--ma-focus-ring); outline-offset: 2px; border-radius: var(--ma-radius-sm); }

.ma-container { width: 100%; max-width: var(--ma-container); margin-inline: auto; padding-inline: var(--ma-space-4); }
@media (min-width: 768px) { .ma-container { padding-inline: var(--ma-space-8); } }

.ma-section { padding-block: var(--ma-space-12); }
@media (min-width: 768px) { .ma-section { padding-block: var(--ma-space-16); } }

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

/* ---------- 3. Tipografia utilitária ---------- */
.ma-display-xl { font: var(--ma-text-display-xl); text-transform: uppercase; letter-spacing: -0.01em; }
.ma-display    { font: var(--ma-text-display); text-transform: uppercase; letter-spacing: -0.01em; }
.ma-body-lg    { font: var(--ma-text-body-lg); }
.ma-muted      { color: var(--ma-ink-muted); }
.ma-price      { font: var(--ma-text-price); color: var(--ma-ink); }
.ma-highlight  { color: var(--ma-accent-text); } /* palavra em destaque dentro de manchete */
.ma-on-dark .ma-highlight, .ma-inverse .ma-highlight { color: var(--ma-amarelo-alpha); }

/* Sobretítulo no estilo da assinatura: texto entre traços amarelos */
.ma-faixa { display: flex; align-items: center; justify-content: center; gap: var(--ma-space-4); }
.ma-faixa::before, .ma-faixa::after { content: ""; flex: 0 1 64px; min-width: 24px; height: 5px; border-radius: var(--ma-radius-pill); background: var(--ma-accent); }
.ma-faixa--left { justify-content: flex-start; }
.ma-faixa--left::before { display: none; }
.ma-faixa__text, .ma-faixa > span { font: 600 14px/20px var(--ma-font-sans); letter-spacing: var(--ma-tracking-tagline); text-transform: uppercase; color: var(--ma-ink); white-space: nowrap; margin-right: calc(var(--ma-tracking-tagline) * -1); }

/* ---------- 4. Botões ---------- */
.ma-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ma-space-2);
  min-height: 48px; padding: var(--ma-space-3) var(--ma-space-6);
  font: 700 15px/20px var(--ma-font-sans); letter-spacing: var(--ma-tracking-button); text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--ma-radius-md);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--ma-dur) var(--ma-ease), color var(--ma-dur) var(--ma-ease), border-color var(--ma-dur) var(--ma-ease), transform var(--ma-dur) var(--ma-ease);
}
.ma-btn:active:not(:disabled) { transform: translateY(1px); }
.ma-btn svg { width: 20px; height: 20px; flex: none; }

.ma-btn--primary { background: var(--ma-accent); color: var(--ma-on-accent); }
.ma-btn--primary:hover { background: var(--ma-accent-hover); color: var(--ma-on-accent); }

.ma-btn--dark { background: var(--ma-surface-inverse); color: var(--ma-ink-inverse); }
.ma-btn--dark:hover { opacity: .88; }

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

.ma-btn--ghost { background: transparent; color: var(--ma-ink); padding-inline: var(--ma-space-2); min-height: 40px; text-decoration: underline; text-decoration-color: var(--ma-accent); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.ma-btn--ghost:hover { color: var(--ma-accent-text); }

.ma-btn--lg { min-height: 56px; padding: var(--ma-space-4) var(--ma-space-8); font-size: 16px; }
.ma-btn--sm { min-height: 40px; padding: var(--ma-space-2) var(--ma-space-4); font-size: 13px; }
.ma-btn--block { display: flex; width: 100%; }
.ma-btn--icon { min-width: 48px; padding: 0; }

.ma-btn:disabled, .ma-btn[aria-disabled="true"] { background: var(--ma-line); color: var(--ma-ink-muted); border-color: transparent; cursor: not-allowed; transform: none; }

.ma-btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.ma-btn[aria-busy="true"]::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-color: var(--ma-on-accent) transparent var(--ma-on-accent) transparent; border-radius: 50%; animation: ma-spin .8s linear infinite; }
@keyframes ma-spin { to { transform: rotate(360deg); } }

/* ---------- 5. Selos (badges) e chips ---------- */
.ma-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px var(--ma-space-2); font: 700 12px/16px var(--ma-font-sans); letter-spacing: .06em; text-transform: uppercase; border-radius: var(--ma-radius-sm); white-space: nowrap; }
.ma-badge--neutral { background: var(--ma-surface-inverse); color: var(--ma-ink-inverse); }
.ma-badge--alpha   { background: var(--ma-accent); color: var(--ma-on-accent); }
.ma-badge--outline { background: transparent; color: var(--ma-ink); box-shadow: inset 0 0 0 1.5px var(--ma-line-strong); }
.ma-badge--success { background: var(--ma-success); color: var(--ma-surface); }
.ma-badge--danger  { background: var(--ma-danger); color: var(--ma-surface); }
/* mini coroa para selos "Edição Alpha" / premium */
.ma-badge--alpha::before { content: ""; width: 12px; height: 9px; background: currentColor; clip-path: polygon(0 10%, 30% 55%, 50% 0, 70% 55%, 100% 10%, 88% 100%, 12% 100%); }

.ma-chip { display: inline-flex; align-items: center; gap: var(--ma-space-2); min-height: 36px; padding: 0 var(--ma-space-4); font: 600 13px/1 var(--ma-font-sans); color: var(--ma-ink); background: var(--ma-surface-raised); border: 1.5px solid var(--ma-line-strong); border-radius: var(--ma-radius-pill); cursor: pointer; transition: all var(--ma-dur) var(--ma-ease); }
.ma-chip:hover { border-color: var(--ma-ink); }
.ma-chip[aria-pressed="true"], .ma-chip.is-active { background: var(--ma-surface-inverse); color: var(--ma-ink-inverse); border-color: var(--ma-surface-inverse); }

/* Seletor de tamanho (P, M, G, GG) */
.ma-size { display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 var(--ma-space-3); font: 700 15px/1 var(--ma-font-sans); color: var(--ma-ink); background: var(--ma-surface-raised); border: 1.5px solid var(--ma-line-strong); border-radius: var(--ma-radius-md); cursor: pointer; }
.ma-size:hover { border-color: var(--ma-ink); }
.ma-size[aria-checked="true"], .ma-size.is-selected { background: var(--ma-ink); color: var(--ma-surface); border-color: var(--ma-ink); }
.ma-size:disabled { color: var(--ma-ink-muted); background: var(--ma-surface-sunken); text-decoration: line-through; cursor: not-allowed; }

/* ---------- 6. Card de produto ---------- */
.ma-grid-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ma-space-4); }
@media (min-width: 768px)  { .ma-grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ma-space-6); } }
@media (min-width: 1100px) { .ma-grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ma-card { display: flex; flex-direction: column; background: var(--ma-surface-raised); border: 1px solid var(--ma-line); border-radius: var(--ma-radius-md); overflow: hidden; transition: box-shadow var(--ma-dur) var(--ma-ease), transform var(--ma-dur) var(--ma-ease); }
.ma-card:hover { box-shadow: var(--ma-shadow-card); transform: translateY(-2px); }
.ma-card__media { position: relative; aspect-ratio: 1 / 1; background: var(--ma-preto-manto); overflow: hidden; }
.ma-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ma-ease); }
.ma-card:hover .ma-card__media img { transform: scale(1.04); }
.ma-card__badge { position: absolute; top: var(--ma-space-3); left: var(--ma-space-3); }
.ma-card__fav { position: absolute; top: var(--ma-space-2); right: var(--ma-space-2); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(13,13,13,.55); color: #fff; cursor: pointer; }
.ma-card__body { display: flex; flex-direction: column; gap: var(--ma-space-1); padding: var(--ma-space-4); flex: 1; }
.ma-card__team { font: 600 12px/16px var(--ma-font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ma-ink-muted); }
.ma-card__name { margin: 0; font: var(--ma-text-h3); color: var(--ma-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ma-card__prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--ma-space-2); margin-top: var(--ma-space-2); }
.ma-card__old { font: var(--ma-text-small); color: var(--ma-ink-muted); text-decoration: line-through; }
.ma-card__price { font: var(--ma-text-price); color: var(--ma-ink); }
.ma-card__inst { font: var(--ma-text-small); color: var(--ma-ink-muted); margin-bottom: var(--ma-space-3); }
.ma-card__body .ma-btn { margin-top: auto; }
@media (max-width: 480px) { .ma-card__price { font-size: 22px; } .ma-card__name { font-size: 15px; } }

/* ---------- 7. Formulários ---------- */
.ma-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--ma-space-4); }
.ma-label { font: 600 13px/18px var(--ma-font-sans); color: var(--ma-ink); }
.ma-hint { font: var(--ma-text-small); color: var(--ma-ink-muted); }

.ma-input, .ma-select, .ma-textarea {
  width: 100%; min-height: 48px; padding: var(--ma-space-3) var(--ma-space-4);
  font: 400 16px/1.4 var(--ma-font-sans); /* 16px evita zoom no iOS */
  color: var(--ma-ink); background: var(--ma-surface-raised);
  border: 1.5px solid var(--ma-line-strong); border-radius: var(--ma-radius-md);
  transition: border-color var(--ma-dur) var(--ma-ease), box-shadow var(--ma-dur) var(--ma-ease);
  appearance: none;
}
.ma-textarea { min-height: 120px; resize: vertical; }
.ma-input::placeholder, .ma-textarea::placeholder { color: var(--ma-ink-muted); opacity: .8; }
.ma-input:hover, .ma-select:hover, .ma-textarea:hover { border-color: var(--ma-ink); }
.ma-input:focus, .ma-select:focus, .ma-textarea:focus { outline: none; border-color: var(--ma-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ma-amarelo-alpha) 55%, transparent); }
.ma-select { padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235C5A57' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.ma-input:disabled, .ma-select:disabled, .ma-textarea:disabled { background: var(--ma-surface-sunken); color: var(--ma-ink-muted); cursor: not-allowed; }

.ma-field.is-invalid .ma-input, .ma-input[aria-invalid="true"], .ma-select[aria-invalid="true"], .ma-textarea[aria-invalid="true"] { border-color: var(--ma-danger); }
.ma-error { display: flex; gap: 6px; align-items: center; font: 500 13px/18px var(--ma-font-sans); color: var(--ma-danger); }
.ma-error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--ma-danger); color: var(--ma-surface); font-size: 11px; font-weight: 800; }

.ma-check { display: flex; align-items: center; gap: var(--ma-space-3); font: var(--ma-text-body); cursor: pointer; min-height: 44px; }
.ma-check input { appearance: none; width: 22px; height: 22px; margin: 0; flex: none; border: 1.5px solid var(--ma-line-strong); border-radius: var(--ma-radius-sm); background: var(--ma-surface-raised); display: grid; place-items: center; cursor: pointer; }
.ma-check input[type="radio"] { border-radius: 50%; }
.ma-check input:checked { background: var(--ma-accent); border-color: var(--ma-ink); }
.ma-check input[type="checkbox"]:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--ma-on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.ma-check input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ma-on-accent); }

.ma-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ma-line-strong); border-radius: var(--ma-radius-md); overflow: hidden; }
.ma-qty button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ma-ink); font: 700 18px/1 var(--ma-font-sans); cursor: pointer; }
.ma-qty button:hover { background: var(--ma-surface-sunken); }
.ma-qty input { width: 44px; height: 44px; border: 0; text-align: center; font: 700 16px/1 var(--ma-font-sans); background: transparent; color: var(--ma-ink); }

/* ---------- 8. Cabeçalho, navegação e barra de anúncio ---------- */
.ma-announce { background: var(--ma-accent); color: var(--ma-on-accent); text-align: center; padding: 8px var(--ma-space-4); font: 700 12px/16px var(--ma-font-sans); letter-spacing: .1em; text-transform: uppercase; }

.ma-header { position: sticky; top: 0; z-index: 50; height: var(--ma-header-h); background: var(--ma-preto-manto); color: var(--ma-off-white); border-bottom: 3px solid var(--ma-amarelo-alpha); }
.ma-header__inner { height: 100%; display: flex; align-items: center; gap: var(--ma-space-4); }
.ma-header__logo img { height: 36px; width: auto; }
@media (max-width: 480px) { .ma-header__logo img { height: 30px; } }
.ma-header__nav { display: none; gap: var(--ma-space-6); margin-left: var(--ma-space-8); }
@media (min-width: 900px) { .ma-header__nav { display: flex; } }
.ma-header__nav a { color: var(--ma-off-white); text-decoration: none; font: 700 13px/1 var(--ma-font-sans); letter-spacing: .08em; text-transform: uppercase; padding-block: var(--ma-space-2); border-bottom: 3px solid transparent; }
.ma-header__nav a:hover, .ma-header__nav a[aria-current="page"] { color: var(--ma-amarelo-alpha); border-bottom-color: var(--ma-amarelo-alpha); }
.ma-header__actions { margin-left: auto; display: flex; align-items: center; gap: var(--ma-space-2); }
.ma-header__icon { position: relative; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ma-off-white); background: transparent; border: 0; border-radius: var(--ma-radius-md); cursor: pointer; }
.ma-header__icon:hover { background: rgba(247,244,239,.08); }
.ma-header :focus-visible { outline-color: var(--ma-amarelo-alpha); }
.ma-cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--ma-radius-pill); background: var(--ma-amarelo-alpha); color: var(--ma-preto-manto); font: 800 11px/18px var(--ma-font-sans); text-align: center; }

/* Barra de navegação inferior (mobile / PWA) */
.ma-tabbar { position: fixed; inset: auto 0 0 0; z-index: 50; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--ma-preto-manto); border-top: 1px solid #2E2E2E; padding-bottom: env(safe-area-inset-bottom); }
.ma-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; color: #A9A59F; text-decoration: none; font: 600 11px/1.2 var(--ma-font-sans); }
.ma-tabbar a[aria-current="page"] { color: var(--ma-amarelo-alpha); }
@media (min-width: 900px) { .ma-tabbar { display: none; } }

/* ---------- 9. Hero / banner ---------- */
.ma-hero { position: relative; overflow: hidden; background: var(--ma-preto-manto); color: var(--ma-off-white); padding: var(--ma-space-16) 0; }
.ma-hero::before { content: ""; position: absolute; inset: 0; background: url('../assets/brand/manto-alpha-padrao-coroas.svg') center / 480px auto repeat; opacity: .12; pointer-events: none; }
.ma-hero > * { position: relative; }
.ma-hero h1, .ma-hero .ma-display, .ma-hero .ma-display-xl { color: var(--ma-off-white); }
.ma-hero .ma-highlight { color: var(--ma-amarelo-alpha); }
.ma-hero .ma-faixa__text, .ma-hero .ma-faixa > span { color: var(--ma-off-white); }
.ma-hero p { color: #A9A59F; max-width: 52ch; }

/* Diagonal da marca (45°, como no M). Máximo 1 por tela. */
.ma-diagonal { clip-path: polygon(0 0, 100% 0, 100% 100%, 12% 100%); }

/* ---------- 10. Superfície invertida / rodapé ---------- */
.ma-inverse { background: var(--ma-surface-inverse); color: var(--ma-ink-inverse); }
.ma-footer { background: var(--ma-preto-manto); color: #A9A59F; padding: var(--ma-space-12) 0 calc(var(--ma-space-8) + env(safe-area-inset-bottom)); border-top: 4px solid var(--ma-amarelo-alpha); font: var(--ma-text-small); }
.ma-footer h4 { color: var(--ma-off-white); font: 700 13px/1 var(--ma-font-sans); letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--ma-space-4); }
.ma-footer a { color: #A9A59F; text-decoration: none; }
.ma-footer a:hover { color: var(--ma-amarelo-alpha); }
.ma-footer__logo img { height: 56px; width: auto; }

/* ---------- 11. Alertas, toasts e estados ---------- */
.ma-alert { display: flex; gap: var(--ma-space-3); padding: var(--ma-space-4); border-radius: var(--ma-radius-md); font: var(--ma-text-body); border-left: 0; }
.ma-alert--success { background: var(--ma-success-bg); color: var(--ma-ink); box-shadow: inset 0 0 0 1.5px var(--ma-success); }
.ma-alert--danger  { background: var(--ma-danger-bg); color: var(--ma-ink); box-shadow: inset 0 0 0 1.5px var(--ma-danger); }
.ma-alert--info    { background: var(--ma-warning-bg); color: var(--ma-ink); box-shadow: inset 0 0 0 1.5px var(--ma-amarelo-profundo); }
.ma-alert strong { font-weight: 700; }

.ma-toast { position: fixed; left: 50%; bottom: calc(var(--ma-space-6) + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: var(--ma-space-3); max-width: calc(100vw - 32px); padding: var(--ma-space-3) var(--ma-space-4); background: var(--ma-preto-manto); color: var(--ma-off-white); border-radius: var(--ma-radius-md); box-shadow: var(--ma-shadow-overlay); font: 600 14px/1.4 var(--ma-font-sans); }
.ma-toast::before { content: ""; width: 6px; align-self: stretch; border-radius: var(--ma-radius-pill); background: var(--ma-amarelo-alpha); }
.ma-toast--danger::before { background: #FF7A6E; }

.ma-empty { text-align: center; padding: var(--ma-space-16) var(--ma-space-4); color: var(--ma-ink-muted); }
.ma-empty img { width: 72px; margin: 0 auto var(--ma-space-4); opacity: .9; } /* use o símbolo do kit */
.ma-empty h3 { color: var(--ma-ink); }

.ma-skeleton { background: linear-gradient(90deg, var(--ma-surface-sunken) 0%, var(--ma-line) 50%, var(--ma-surface-sunken) 100%); background-size: 200% 100%; animation: ma-shimmer 1.2s linear infinite; border-radius: var(--ma-radius-md); }
@keyframes ma-shimmer { to { background-position: -200% 0; } }

/* ---------- 12. Modal / drawer (carrinho) ---------- */
.ma-backdrop { position: fixed; inset: 0; z-index: 90; background: var(--ma-overlay); }
.ma-modal { position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 64px); overflow: auto; background: var(--ma-surface-raised); color: var(--ma-ink); border-radius: var(--ma-radius-lg); box-shadow: var(--ma-shadow-overlay); padding: var(--ma-space-6); }
.ma-drawer { position: fixed; z-index: 91; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); display: flex; flex-direction: column; background: var(--ma-surface-raised); box-shadow: var(--ma-shadow-overlay); }
.ma-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--ma-space-4) var(--ma-space-6); background: var(--ma-preto-manto); color: var(--ma-off-white); border-bottom: 3px solid var(--ma-amarelo-alpha); }
.ma-drawer__body { flex: 1; overflow: auto; padding: var(--ma-space-6); }
.ma-drawer__foot { padding: var(--ma-space-4) var(--ma-space-6) calc(var(--ma-space-4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--ma-line); }

/* ---------- 13. Tabelas (medidas, pedidos) ---------- */
.ma-table { width: 100%; border-collapse: collapse; font: var(--ma-text-body); }
.ma-table th { text-align: left; font: 700 11px/1.4 var(--ma-font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ma-ink-muted); border-bottom: 2px solid var(--ma-ink); padding: var(--ma-space-3); }
.ma-table td { padding: var(--ma-space-3); border-bottom: 1px solid var(--ma-line); }
.ma-table tbody tr:hover { background: var(--ma-surface-sunken); }

/* Status de pedido */
.ma-status { display: inline-flex; align-items: center; gap: 6px; font: 700 12px/1 var(--ma-font-sans); text-transform: uppercase; letter-spacing: .06em; }
.ma-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ma-status--ok { color: var(--ma-success); }
.ma-status--pending { color: var(--ma-accent-text); }
.ma-status--error { color: var(--ma-danger); }

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