/* APUC — sistema visual. Mobile-first. Azul, laranja e branco; verde só para venda/comissão. */

@font-face { font-family: "Baloo 2"; src: url("../fonts/baloo2.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --navy: #0b1f4d;
  --navy-2: #12358f;
  --blue: #1b4fd0;
  --blue-500: #2f6bf2;
  --blue-100: #e3edff;
  --blue-50: #f1f6ff;
  --sky: #d9eaff;
  --orange: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --orange-50: #fff3e8;
  --green: #15803d;
  --green-500: #179b45;
  --green-50: #e9f8ee;
  --red: #b42318;
  --red-50: #fdecea;
  --text: #0b1f4d;
  --muted: #5b6b86;
  --line: #dfe7f3;
  --surface: #ffffff;
  --bg: #f6f9fe;

  --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-sm: 0.875rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
  --text-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.6rem);
  --text-hero: clamp(2.1rem, 1.3rem + 3.8vw, 3.9rem);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgb(11 31 77 / 6%), 0 2px 8px rgb(11 31 77 / 5%);
  --shadow: 0 2px 4px rgb(11 31 77 / 5%), 0 12px 28px rgb(11 31 77 / 9%);
  --shadow-lg: 0 24px 60px rgb(18 53 143 / 20%);

  --gutter: 16px;
  --space-section: clamp(3rem, 2rem + 4vw, 6rem);
  --tabbar-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 150ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: var(--text-h2); font-weight: 800; }
h3 { font-size: var(--text-lg); font-weight: 800; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 8px; }
.container { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--space-section); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: var(--text-sm); letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange-700); margin-bottom: 0.75rem; }
.lead { font-size: var(--text-lg); color: var(--muted); max-width: 60ch; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.7em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: 800 1rem/1.1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background-color var(--fast);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-lg { min-height: 56px; font-size: 1.1875rem; padding-inline: 1.6em; }
.btn-orange { background: linear-gradient(180deg, var(--orange) 0%, var(--orange-600) 100%); color: #fff; box-shadow: 0 6px 16px rgb(234 88 12 / 30%); }
.btn-orange:not(.btn-lg) { background: var(--orange-700); }
.btn-green { background: linear-gradient(180deg, var(--green-500) 0%, var(--green) 100%); color: #fff; box-shadow: 0 6px 16px rgb(21 128 61 / 28%); }
.btn-green:not(.btn-lg) { background: var(--green); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgb(27 79 208 / 25%); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-500); color: var(--blue); }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c2bd; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0.5em 1em; font-size: 0.9375rem; }

/* ---------- Cabeçalho ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgb(255 255 255 / 92%); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex: none; }
.brand img { width: 46px; height: 46px; border-radius: 50%; background: var(--sky); box-shadow: inset 0 0 0 2px #fff, 0 2px 8px rgb(18 53 143 / 18%); }
.brand-name { font: 800 1.6rem/1 var(--font-display); color: var(--navy-2); letter-spacing: 0.01em; }
.brand-name span { color: var(--orange-600); }
.main-nav { display: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-search { display: none; }
.account-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--blue-50); color: var(--navy); font-weight: 800; text-decoration: none; }
.account-chip .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 0.875rem; }
.account-chip .label { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.search { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 8px 0 18px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); transition: border-color var(--fast), box-shadow var(--fast); }
.search:focus-within { border-color: var(--blue-500); box-shadow: 0 0 0 4px rgb(47 107 242 / 15%); }
.search .icon { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 1rem var(--font-body); color: var(--text); }
.search button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font: 800 0.9375rem var(--font-body); cursor: pointer; }

/* ---------- Barra inferior (celular) ---------- */
.tabbar { position: fixed; inset: auto 0 0 0; z-index: 50; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 20px rgb(11 31 77 / 6%); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tabbar-h); color: var(--muted); font-size: 0.75rem; font-weight: 700; text-decoration: none; }
.tabbar a .icon { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--orange-700); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 85% 10%, #fff 0%, transparent 55%), linear-gradient(180deg, var(--sky) 0%, var(--blue-50) 70%, var(--bg) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgb(27 79 208 / 9%) 1.2px, transparent 1.2px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 8px; padding-block: 20px 40px; }
.hero-art { position: relative; justify-self: center; width: min(78vw, 360px); }
.hero-art img { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgb(18 53 143 / 22%)); animation: float 6s ease-in-out infinite; }
.hero h1 { font-size: var(--text-hero); font-weight: 800; color: var(--navy); margin-bottom: 0.35em; }
.hero h1 .hl-green { color: var(--green); }
.hero h1 .hl-orange { color: var(--orange-600); }
.hero .lead { color: #33456b; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0 1.25rem; }
.hero-ctas .btn { flex: 1 1 220px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; margin: 0; list-style: none; color: #33456b; font-weight: 700; font-size: var(--text-sm); }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .icon { color: var(--green); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); font-weight: 800; font-size: var(--text-sm); color: var(--navy); margin-bottom: 1rem; }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 4px rgb(23 155 69 / 18%); }
.hero-search { margin-top: 0.5rem; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Categorias ---------- */
.chips { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { scroll-snap-align: start; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px 0 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--navy); font-weight: 700; text-decoration: none; white-space: nowrap; transition: border-color var(--fast), background-color var(--fast); }
.chip:hover { border-color: var(--blue-500); }
.chip[aria-current="true"] { background: linear-gradient(180deg, var(--orange) 0%, var(--orange-600) 100%); border-color: transparent; color: #fff; }
.chip[aria-current="true"] .icon { color: #fff; }
.chip .icon { color: var(--blue); }

/* ---------- Cabeçalho de seção ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ---------- Cartão de produto (referência do app) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); overflow: hidden; transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-media { aspect-ratio: 1 / 1; background: linear-gradient(180deg, #fff, #f3f6fb); display: grid; place-items: center; padding: 10px; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 12px; flex: 1; }
.product-name { font: 800 0.9375rem/1.25 var(--font-body); color: var(--navy); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.product-meta { font-size: 0.75rem; color: var(--muted); font-weight: 700; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.value { border-radius: 12px; padding: 6px 8px; }
.value small { display: flex; align-items: center; gap: 4px; font-size: 0.6875rem; font-weight: 700; color: var(--muted); }
.value strong { display: block; font: 800 clamp(0.9rem, 0.8rem + 0.6vw, 1.15rem)/1.2 var(--font-body); letter-spacing: -0.01em; white-space: nowrap; }
.value-price { background: var(--blue-50); }
.value-price strong, .value-price .icon { color: var(--blue); }
.value-commission { background: var(--green-50); }
.value-commission strong, .value-commission .icon { color: var(--green); }
.product-card .btn { min-height: 46px; font-size: 1rem; border-radius: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; }
.badge-orange { background: var(--orange-50); color: var(--orange-700); }
.badge-blue { background: var(--blue-100); color: var(--blue); }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-red { background: var(--red-50); color: var(--red); }
.badge-gray { background: #eef1f6; color: var(--muted); }

.empty { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 32px 20px; background: #fff; border: 1.5px dashed #c9d6ea; border-radius: var(--radius-lg); }
.empty img { width: 150px; height: auto; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0; }

/* ---------- Como funciona ---------- */
.steps { display: grid; gap: 14px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.step { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.step-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.step-icon .icon { width: 26px; height: 26px; }
.step h3 { margin-bottom: 0.25em; }
.step p { margin: 0; color: var(--muted); }
.step::after { counter-increment: step; content: counter(step); position: absolute; top: 14px; right: 18px; font: 800 2.5rem/1 var(--font-display); color: var(--blue-100); }
.tone-blue { background: var(--blue-100); color: var(--blue); }
.tone-green { background: var(--green-50); color: var(--green); }
.tone-orange { background: var(--orange-50); color: var(--orange-700); }

/* ---------- Revendedor ---------- */
.reseller-band { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.reseller-band::after { content: ""; position: absolute; width: 420px; height: 420px; right: -160px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgb(249 115 22 / 35%), transparent 65%); pointer-events: none; }
.reseller-grid { position: relative; z-index: 1; display: grid; gap: 28px; padding: 32px 20px 0; }
.reseller-band h2 { color: #fff; }
.reseller-band .lead { color: #c9d7f5; }
.reseller-band .eyebrow { color: #ffb37a; }
.feature-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 12px; }
.feature-list li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.feature-list .icon-wrap { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgb(255 255 255 / 10%); color: #ffb37a; }
.feature-list strong { display: block; }
.feature-list span { color: #c9d7f5; font-size: 0.9375rem; }
.phone-stage { position: relative; align-self: end; justify-self: center; width: min(76vw, 330px); }
.phone-stage > img { width: 100%; height: auto; border-radius: 34px 34px 0 0; box-shadow: var(--shadow-lg); }
.split-card { position: absolute; left: -12%; bottom: 18%; width: 230px; padding: 14px; background: #fff; color: var(--navy); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.split-card h3 { font-size: 0.9375rem; margin-bottom: 8px; }
.split-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; margin-bottom: 10px; }
.split-bar .s-store { flex: 240; background: var(--blue); }
.split-bar .s-reseller { flex: 40; background: var(--green-500); }
.split-bar .s-apuc { flex: 20; background: var(--orange); }
.split-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.8125rem; font-weight: 700; }
.split-legend li { display: flex; justify-content: space-between; gap: 8px; }
.split-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.split-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 0.6875rem; line-height: 1.35; }

/* ---------- Compra segura ---------- */
.safety-grid { display: grid; gap: 12px; }
.safety { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.safety p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.safety h3 { font-size: 1.0625rem; margin-bottom: 0.2em; }

/* ---------- Empresas ---------- */
.supplier-cta { display: grid; gap: 16px; align-items: center; padding: 28px 22px; border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--orange-50), #fff 60%); border: 1.5px solid #ffd9bd; }
.supplier-cta h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); margin-bottom: 0.3em; }
.supplier-cta p { margin: 0; color: var(--muted); }

/* ---------- Rodapé ---------- */
.site-footer { margin-top: var(--space-section); background: var(--navy); color: #c9d7f5; padding-block: 40px 28px; }
.footer-grid { display: grid; gap: 24px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font: 800 1.5rem var(--font-display); }
.footer-brand img { width: 48px; height: 47px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
.footer-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 12%); font-size: 0.8125rem; }

/* ---------- Formulários / Auth ---------- */
.auth-wrap { display: grid; gap: 24px; padding-block: 28px 48px; }
.auth-side { display: none; }
.card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 24px 20px; }
.card h1 { font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.2rem); margin-bottom: 0.25em; }
.card .sub { color: var(--muted); margin-bottom: 1.25rem; }
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: 0.9375rem; }
.field .hint { font-size: 0.8125rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid #cfdbec; background: #fff;
  font: 600 1rem var(--font-body); color: var(--text); transition: border-color var(--fast), box-shadow var(--fast);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgb(47 107 242 / 15%); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field .error { color: var(--red); font-size: 0.875rem; font-weight: 700; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.password-toggle[aria-pressed="true"] { color: var(--blue); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 0.9375rem; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--blue); }
.form-foot { text-align: center; color: var(--muted); font-size: 0.9375rem; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-weight: 700; font-size: 0.9375rem; margin-bottom: 16px; }
.alert-error { background: var(--red-50); color: var(--red); }
.alert-success { background: var(--green-50); color: var(--green); }
.alert-info { background: var(--blue-50); color: var(--navy-2); }
.flash-stack { padding-top: 16px; }

/* ---------- Conta ---------- */
.page-head { padding-block: 28px 8px; }
.page-head h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); }
.account-grid { display: grid; gap: 16px; padding-bottom: 32px; }
.kv { display: grid; gap: 10px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-weight: 700; }
.kv dd { margin: 0; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--green-50); color: var(--green); font: 800 1.6rem var(--font-display); letter-spacing: 0.12em; }

/* ---------- Catálogo ---------- */
.catalog-head { display: grid; gap: 14px; padding-block: 24px 8px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }

/* ---------- Painel admin ---------- */
.admin-shell { display: grid; gap: 0; }
.admin-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px var(--gutter); background: var(--navy); }
.admin-nav a { color: #c9d7f5; text-decoration: none; font-weight: 800; padding: 10px 14px; border-radius: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.admin-nav a[aria-current="page"] { background: rgb(255 255 255 / 12%); color: #fff; }
.admin-main { padding: 20px var(--gutter) 40px; display: grid; gap: 18px; max-width: 1200px; width: 100%; margin-inline: auto; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi small { color: var(--muted); font-weight: 800; display: block; }
.kpi strong { font: 800 2rem/1.1 var(--font-display); color: var(--navy); }
.kpi.attention { border-color: #ffd0ad; background: var(--orange-50); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: #f8fafd; }
tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { text-decoration: none; font-weight: 800; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); color: var(--navy); }
.tabs a[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.review-forms { display: grid; gap: 8px; min-width: 220px; }
.review-forms input { width: 100%; min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid #cfdbec; font: 600 0.875rem var(--font-body); }
.review-forms .row { display: flex; gap: 6px; }

/* ---------- Páginas de texto ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose li { margin-bottom: 0.4em; }

/* ---------- Erro ---------- */
.error-page { display: grid; justify-items: center; text-align: center; gap: 12px; padding-block: 56px; }
.error-page img { width: 180px; }
.error-page .code { font: 800 4rem/1 var(--font-display); color: var(--blue-100); }

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .product-grid { gap: 16px; }
  .product-body { padding: 14px 14px 16px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .card { padding: 32px; }
}
@media (min-width: 900px) {
  :root { --tabbar-h: 0px; }
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .header-row { min-height: 76px; gap: 24px; }
  .brand img { width: 52px; height: 52px; }
  .main-nav { display: flex; gap: 4px; }
  .main-nav a { padding: 10px 14px; border-radius: 12px; color: var(--navy); font-weight: 800; text-decoration: none; }
  .main-nav a:hover { background: var(--blue-50); }
  .main-nav a[aria-current="page"] { color: var(--orange-700); background: var(--orange-50); }
  .header-search { display: flex; flex: 1; max-width: 420px; }
  .header-search .search { min-height: 46px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px; padding-block: 48px 72px; }
  .hero-art { order: 2; width: 100%; max-width: 500px; }
  .hero-search { display: none; }
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .reseller-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; padding: 56px 56px 0; gap: 48px; }
  .safety-grid { grid-template-columns: repeat(4, 1fr); }
  .supplier-cta { grid-template-columns: 1fr auto; padding: 36px 40px; }
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
  .auth-wrap { grid-template-columns: 1fr 1fr; align-items: center; padding-block: 48px 72px; gap: 48px; }
  .auth-side { display: grid; gap: 16px; justify-items: start; }
  .auth-side img { width: 340px; }
  .account-grid { grid-template-columns: 1.2fr 1fr; }
  .catalog-head { grid-template-columns: 1fr minmax(280px, 420px); align-items: end; }
}
@media (min-width: 1200px) {
  .split-card { left: -28%; }
}
@media (max-width: 380px) {
  .product-grid { gap: 8px; }
  .product-body { padding: 8px 8px 10px; }
  .value { padding: 5px 6px; }
  .value small { font-size: 0.625rem; }
  .product-card .btn { font-size: 0.9375rem; padding-inline: 0.5em; }
  .split-card { left: -6%; width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.split-legend .sw-store { background: var(--blue); }
.split-legend .sw-reseller { background: var(--green-500); }
.split-legend .sw-apuc { background: var(--orange); }
.values:has(> :only-child) { grid-template-columns: 1fr; }
.card .feature-list span.muted { color: var(--muted); }
.card .feature-list .step-icon { width: 40px; height: 40px; border-radius: 12px; }
.card .feature-list .step-icon .icon { width: 20px; height: 20px; }
.admin-body { padding-bottom: 0; }
a.kpi { text-decoration: none; color: inherit; transition: border-color var(--fast); }
a.kpi:hover { border-color: var(--orange); }
.hint { font-size: 0.875rem; color: var(--muted); }
.page-head + .account-grid, .page-head + .container .card { margin-top: 8px; }
.catalog-head > * { min-width: 0; }
.search button { flex: none; }
.footer-brand img { border-radius: 50%; background: var(--sky); }
.kv dt { white-space: nowrap; }

/* ---------- Fase 2: painéis, produto ---------- */
.product-media { position: relative; }
.media-badge { position: absolute; top: 8px; left: 8px; }
.product-name a { color: inherit; text-decoration: none; }
.product-name a:hover { color: var(--blue); }
.text-blue { color: var(--blue); font-weight: 800; }
.text-green { color: var(--green); font-weight: 800; }
.text-red { color: var(--red); }
.pre-line { white-space: pre-line; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.plain-list.numbered { list-style: decimal; padding-left: 1.2em; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-title h1, .admin-title h2 { margin: 0; }
.back-link { display: inline-block; font-weight: 800; text-decoration: none; margin-bottom: 4px; font-size: 0.9375rem; }
.admin-split { display: grid; gap: 18px; align-items: start; }
.admin-aside { display: grid; gap: 18px; }
.admin-main h2 { font-size: 1.35rem; }
.card h2 { margin-top: 0.4em; }
.user-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.user-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.thumb-cell { width: 72px; }
.thumb { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: #f3f6fb; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.media-item { position: relative; margin: 0; background: #f3f6fb; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; }
.media-item figcaption { display: flex; justify-content: space-between; gap: 4px; padding: 6px 8px; font-size: 0.8125rem; }
.link-btn { background: none; border: 0; padding: 4px 0; font: 800 0.8125rem var(--font-body); color: var(--blue); cursor: pointer; min-height: 32px; }
.link-btn.text-red { color: var(--red); }
.variant-row { display: grid; grid-template-columns: 1fr 96px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.variant-row input:not([type=checkbox]) { min-height: 42px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid #cfdbec; font: 600 0.9375rem var(--font-body); width: 100%; }
.check-inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 0.875rem; }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 16px 20px; }
.status-actions p { margin: 0; flex: 1 1 260px; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form select { min-height: 40px; border-radius: 10px; border: 1.5px solid #cfdbec; padding: 0 10px; font: 700 0.9375rem var(--font-body); }
.gallery-strip { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; }
.gallery-strip img { width: 120px; height: 120px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; flex: none; }
button[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

.crumbs { padding-block: 18px 6px; font-size: 0.9375rem; color: var(--muted); }
.crumbs a { font-weight: 700; text-decoration: none; }
.pdp { display: grid; gap: 22px; padding-bottom: 24px; }
.pdp-gallery { min-width: 0; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; aspect-ratio: 1; display: grid; place-items: center; padding: 16px; }
.gallery-slide img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs a { flex: none; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; }
.gallery-thumbs a:hover, .gallery-thumbs a:focus-visible { border-color: var(--orange); }
.gallery-thumbs img { width: 64px; height: 64px; object-fit: contain; }
.pdp-info h1 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem); margin: 10px 0 6px; }
.pdp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.seller { color: var(--muted); margin-bottom: 16px; }
.pdp-values { margin: 0 0 18px; }
.pdp-values .value { padding: 12px 14px; border-radius: 16px; }
.pdp-values .value strong { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.pdp-values .per { font-size: 0.8125rem; color: var(--muted); font-weight: 700; }
.h-small { font-size: 1rem; margin: 0 0 8px; }
.variant-chips { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.variant-chips li { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; }
.variant-chips li.is-out { color: var(--muted); text-decoration: line-through; }
.pdp-actions { display: grid; gap: 10px; }
.video-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-details { display: grid; gap: 18px; }

@media (min-width: 900px) {
  .admin-split { grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr); }
  .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: start; }
  .pdp-info { position: sticky; top: 96px; }
  .pdp-details { grid-template-columns: 1.3fr 1fr; align-items: start; }
}
@media (min-width: 520px) {
  .variant-row { grid-template-columns: 1fr 96px auto auto; }
}
@media (max-width: 899px) { .hide-sm { display: none; } }
.field { align-content: start; }

/* ---------- Vitrine direta (página inicial = produtos) ---------- */
.header-row { flex-wrap: wrap; }
.header-search { display: flex; order: 3; flex: 1 0 100%; padding-bottom: 10px; }
.header-search .search { min-height: 46px; }
.header-link { font-weight: 800; color: var(--navy); text-decoration: none; padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
.header-link:hover { background: var(--orange-50); color: var(--orange-700); }
.tabbar { grid-template-columns: repeat(3, 1fr); }
.shop { padding-top: 14px; }
.shop .chips { margin-bottom: 6px; }
.company-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; padding: 16px 18px; border-radius: var(--radius); background: #fff; border: 1px dashed #c9d6ea; }
.company-band strong { display: block; color: var(--navy); }
.company-band span { color: var(--muted); font-size: 0.9375rem; }
.value .was { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 700; line-height: 1.2; }
.value .was s { text-decoration-thickness: 1.5px; }
.value .por { font-size: 0.75em; font-weight: 700; color: var(--muted); }
.badge-off { background: var(--green); color: #fff; }
.pdp .per { margin: -10px 0 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site-footer { padding-block: 28px 20px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-legal { margin-top: 18px; padding-top: 14px; }
@media (min-width: 900px) {
  .header-search { order: 0; flex: 1 1 auto; max-width: 560px; padding-bottom: 0; }
  .header-actions { margin-left: auto; }
}
.value .was { white-space: nowrap; }
.product-name { min-height: 0; }
@media (max-width: 639px) {
  .product-card .values { grid-template-columns: 1fr; }
  .product-card .value { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 6px; }
  .product-card .value small { flex: 1 0 100%; }
  .product-card .value-price small { display: none; }
  .product-card .value-price .was { flex: 1 0 100%; }
}

/* ---------- Estrelas, vendidos e ranking ---------- */
.rating-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.stars { display: inline-flex; gap: 1px; }
.stars .icon { width: 14px; height: 14px; }
.icon.star { color: #d6dbe5; }
.icon.star.on { color: #f5a524; }
.rating-num { color: var(--navy); }
.rating-line.is-large { font-size: 0.9375rem; margin: 2px 0 10px; }
.rating-line.is-large .stars .icon { width: 20px; height: 20px; }
.rank-badge { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 0.6875rem; font-weight: 800; color: #fff; background: var(--navy); box-shadow: var(--shadow-sm); }
.rank-badge .icon { width: 13px; height: 13px; }
.rank-badge.rank-1 { background: linear-gradient(180deg, #f6b73c, #d98a06); color: #3b2500; }
.rank-badge.rank-2 { background: linear-gradient(180deg, #d9dee7, #a9b2c1); color: #1f2937; }
.rank-badge.rank-3 { background: linear-gradient(180deg, #e7a26b, #b8692c); color: #2c1406; }
.reviews { margin-bottom: 18px; }
.reviews-summary { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; margin-bottom: 12px; }
.big-score { display: grid; justify-items: start; gap: 2px; }
.big-score strong { font: 800 2.6rem/1 var(--font-display); color: var(--navy); }
.big-score .stars .icon { width: 20px; height: 20px; }
.big-score span { color: var(--muted); font-weight: 700; font-size: 0.875rem; }
.dist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; min-width: 220px; }
.dist li { display: grid; grid-template-columns: 34px 1fr 30px; gap: 8px; align-items: center; font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
.dist meter { width: 100%; height: 8px; }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review p { margin: 6px 0 0; }
@media (max-width: 380px) { .rank-badge { font-size: 0.625rem; padding: 2px 7px; } }
.form.narrow { max-width: 760px; }
.toggle-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.toggle-card strong { display: block; }
.toggle-card span { color: var(--muted); font-size: 0.9375rem; }
.toggle-card.is-on { border-color: #b7e4c7; background: var(--green-50); }
.product-card .rating-line .sep { display: none; } .product-card .rating-line .sold { flex-basis: 100%; }
/* Cartão sem nome: estrelas + vendidos numa linha */
.product-card .rating-line .sold { flex-basis: 100%; }
.product-card .rating-line { gap: 4px 8px; }
.product-card .product-body { padding-top: 10px; }
/* Cidade da vitrine */
.city-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.city-bar label { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.city-bar label .icon { color: var(--orange-600); }
.city-bar select { flex: 1; max-width: 340px; min-height: 42px; padding: 0 36px 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b6b86' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; appearance: none; font: 700 0.9375rem var(--font-body); color: var(--navy); cursor: pointer; }
.city-bar select:focus { outline: 0; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgb(47 107 242 / 15%); }
.search-note { color: var(--muted); font-weight: 700; margin: 0 0 12px; }
/* Área da foto sempre quadrada, foto inteira dentro (fotos reais têm proporções variadas) */
.product-media { position: relative; overflow: hidden; padding: 0; }
.product-media img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; }
.product-media .badge, .product-media .rank-badge { z-index: 1; }
.rank-badge.rank-0 { background: var(--navy); color: #fff; }
.rank-badge { max-width: calc(100% - 64px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Estrelas dentro da foto, embaixo */
.media-rating { position: absolute; z-index: 1; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: 999px; background: rgb(255 255 255 / 92%); box-shadow: var(--shadow-sm); font-size: 0.75rem; font-weight: 800; color: var(--navy); backdrop-filter: blur(4px); }
.media-rating .stars .icon { width: 13px; height: 13px; }
.media-rating span:last-child { color: var(--muted); font-weight: 700; }
@media (max-width: 380px) { .media-rating .stars .icon { width: 11px; height: 11px; } .media-rating { font-size: 0.6875rem; padding: 2px 7px 2px 5px; } }
/* Selos no topo da foto: ranking à esquerda, desconto/esgotado à direita */
.product-media .rank-badge { left: 8px; right: auto; max-width: calc(100% - 66px); }
.product-media .media-badge { left: auto; right: 8px; }
@media (max-width: 420px) { .product-media .rank-badge .icon { display: none; } .product-media .rank-badge { font-size: 0.625rem; padding: 3px 7px; } }
/* Selo de ranking embaixo, dentro da foto, logo acima das estrelas (igual às estrelas) */
.product-media .rank-badge { top: auto; bottom: 36px; left: 8px; right: auto; }
@media (max-width: 380px) { .product-media .rank-badge { bottom: 30px; } }
.product-media .rank-badge.no-rating { bottom: 8px; }
/* Foto preenche o quadrado: fundo = a própria foto desfocada; produto inteiro na frente. Selos sempre sobre a imagem. */
.product-media { background: #e9eef6; }
.product-media .media-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px) saturate(1.15); transform: scale(1.2); opacity: 0.6; }
.product-media .media-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.product-media .media-badge, .product-media .rank-badge, .product-media .media-rating { z-index: 2; }
.product-media .rank-badge { top: 8px; bottom: auto; left: 8px; right: auto; }
.product-media .rank-badge.no-rating { bottom: auto; }
