/* ==========================================================
   Componentes — Peçaê
   ========================================================== */

/* ---------- Logo ---------- */
.logo { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; user-select: none; }
.logo-word { font-weight: 700; font-size: 26px; letter-spacing: -.035em; color: var(--ink); }
.logo-word .e { color: var(--red); }
.logo-sub { margin-top: 5px; font-size: 9px; font-weight: 600; letter-spacing: .32em; color: var(--red); padding-left: .32em; }
.logo.on-dark .logo-word { color: #fff; }
.logo.on-dark .logo-sub { color: #fff; opacity: .9; }
.logo.lg .logo-word { font-size: 38px; } .logo.lg .logo-sub { font-size: 12px; margin-top: 8px; }
.logo.xl .logo-word { font-size: 52px; } .logo.xl .logo-sub { font-size: 14px; margin-top: 10px; }

/* ---------- Ícones ---------- */
.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.ic.sm { width: 16px; height: 16px; } .ic.xs { width: 14px; height: 14px; } .ic.lg { width: 24px; height: 24px; } .ic.xl { width: 32px; height: 32px; }
.ic-fill { fill: currentColor; stroke: none; }

/* ---------- Botões ---------- */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: var(--r-md);
  font-size: var(--fs-base); font-weight: 500; white-space: nowrap;
  border: 1px solid transparent; transition: background .15s var(--ease), border-color .15s, color .15s, box-shadow .15s, transform .05s;
  cursor: pointer; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-600); }
.btn-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: var(--red-50); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: #cfcfd6; background: #fcfcfd; }
.btn-soft { background: var(--surface-3); color: var(--ink); }
.btn-soft:hover { background: #e9eaee; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #24232a; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-link { height: auto; padding: 0; color: var(--red); font-weight: 500; border: 0; background: none; gap: 4px; }
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn-danger-soft { background: var(--danger-bg); color: var(--danger); }
.btn-sm { --h: 34px; padding: 0 12px; font-size: var(--fs-md); border-radius: var(--r-sm); }
.btn-lg { --h: 48px; padding: 0 24px; font-size: var(--fs-lg); }
.btn-xl { --h: 56px; padding: 0 28px; font-size: 17px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-pill { border-radius: var(--r-full); }
.btn-icon { width: var(--h); padding: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-md); display: inline-grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: var(--ink); position: relative; transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: var(--r-sm); }
.icon-btn.round { border-radius: 50%; }
.icon-btn.plain { border-color: transparent; background: transparent; }
.icon-btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.icon-btn.red:hover { background: var(--red-600); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; }
.card.flat { border-color: transparent; }
.card.pad-sm { padding: 16px; }
.card.pad-lg { padding: 28px; }
.card.no-pad { padding: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card-title { font-size: var(--fs-xl); font-weight: 500; color: var(--ink); }
.card-sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.card-link { color: var(--red); font-size: var(--fs-md); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.tile { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; background: #fff; }
.tile.soft { background: var(--surface-2); border-color: transparent; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.divider.dashed { background: none; border-top: 1px dashed var(--line-2); }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: var(--fs-3xl); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.page-sub { color: var(--muted); font-size: var(--fs-lg); margin-top: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-md); margin-bottom: 8px; }
.back-link:hover { color: var(--ink); }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-md); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .current { color: var(--ink); }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.label { font-size: var(--fs-md); font-weight: 500; color: var(--ink); }
.label .opt { color: var(--muted); font-weight: 400; }
.hint { font-size: var(--fs-sm); color: var(--muted); }
.error-text { font-size: var(--fs-sm); color: var(--danger); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input, .select, .textarea {
  width: 100%; height: 46px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff;
  padding: 0 14px; font-size: var(--fs-base); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14,13,18,.06); }
.input.invalid { border-color: var(--danger); }
.input-wrap > .ic:first-child { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.input-wrap > .ic:first-child + .input { padding-left: 42px; }
.input-wrap .trail { position: absolute; right: 8px; display: flex; align-items: center; gap: 4px; }
.input-wrap .trail .icon-btn { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); }
.input-wrap.has-trail .input { padding-right: 44px; }
.input.sm, .select.sm { height: 38px; font-size: var(--fs-md); }
.input.lg { height: 52px; }
.input.pill { border-radius: var(--r-full); height: 56px; padding: 0 22px; }
.input-wrap > .ic:first-child + .input.pill { padding-left: 52px; }
.input-wrap.pill > .ic:first-child { left: 22px; }
.input.soft { background: var(--surface-2); border-color: transparent; }
.select { appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E0D12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input-prefix { position: absolute; left: 14px; color: var(--muted); font-size: var(--fs-base); }
.input-prefix + .input { padding-left: 40px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }

/* checkbox / radio / switch */
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs-md); color: var(--ink); user-select: none; }
.check input { appearance: none; width: 18px; height: 18px; border: 1.5px solid #C9C9D0; border-radius: 5px; margin: 0; display: grid; place-items: center; background: #fff; cursor: pointer; transition: all .15s; flex-shrink: 0; }
.check input:checked { background: var(--red); border-color: var(--red); }
.check input:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check.lg input { width: 24px; height: 24px; border-radius: 7px; }
.radio { appearance: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #C9C9D0; margin: 0; flex-shrink: 0; display: grid; place-items: center; background: #fff; cursor: pointer; }
.radio:checked { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 4px #fff; }
.radio-ui { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #C9C9D0; background: #fff; flex-shrink: 0; display: inline-block; }
.radio-ui.on { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 4px #fff; }
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { appearance: none; position: absolute; inset: 0; margin: 0; border-radius: 999px; background: #D7D7DD; cursor: pointer; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--red); }
.switch input:checked::after { transform: translateX(18px); }

/* card de opção selecionável (endereço, frete, pagamento) */
.option-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.option-card:hover { border-color: #cfcfd6; }
.option-card.selected, .option-card:has(input:checked) { border-color: var(--red); background: var(--red-50); }
.option-card .opt-icon { width: 40px; height: 40px; border-radius: var(--r-md); background: #fff; display: grid; place-items: center; color: var(--ink); box-shadow: 0 0 0 1px var(--line); flex-shrink: 0; }
.option-card.selected .opt-icon, .option-card:has(input:checked) .opt-icon { color: var(--red); }
.option-card .opt-title { font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.option-card .opt-desc { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.add-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); color: var(--ink); font-weight: 500; width: 100%; text-align: left; }
.add-card:hover { border-color: var(--red); }
.add-card .plus { width: 32px; height: 32px; border-radius: 50%; background: var(--red-100); color: var(--red); display: grid; place-items: center; }

/* ---------- Badges / status ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; line-height: 1; }
.badge.sq { border-radius: 6px; height: 22px; padding: 0 8px; }
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-green { background: var(--green-bg); color: var(--green); }
.b-red { background: var(--danger-bg); color: var(--danger); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-blue { background: var(--blue-bg); color: var(--blue); }
.b-gray { background: var(--gray-bg); color: var(--gray); }
.b-dark { background: var(--ink); color: #fff; }
.b-solid-red { background: var(--red); color: #fff; }
.b-outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; line-height: 1; }
.count.gray { background: var(--surface-3); color: var(--ink); }
.count.white { background: #fff; color: var(--red); }

/* ---------- Chips / filtros ---------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: #fff; font-size: var(--fs-md); font-weight: 500; color: var(--ink); white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: #cfcfd6; }
.chip.active { border-color: var(--red); background: var(--red-50); color: var(--red); }
.chip.active .count.gray { background: var(--red); color: #fff; }
.chip.solid.active { background: var(--red); color: #fff; }
.chip.solid.active .count { background: #fff; color: var(--red); }
.chip.pill { border-radius: var(--r-full); }
.chip.sm { height: 32px; padding: 0 12px; font-size: var(--fs-sm); }
.choice { height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: #fff; font-size: var(--fs-md); font-weight: 500; }
.choice.active { border-color: var(--red); color: var(--red); background: var(--red-50); }

/* tabs sublinhadas */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 12px 0; font-size: var(--fs-base); color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--red); border-color: var(--red); }
/* segmented */
.segmented { display: inline-flex; background: var(--surface-3); border-radius: var(--r-md); padding: 4px; gap: 2px; }
.segmented button { height: 34px; padding: 0 14px; border-radius: 8px; font-size: var(--fs-md); font-weight: 500; color: var(--muted); }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--sh-xs); }

/* ---------- Avatar ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--red-100); color: var(--red); display: inline-grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; overflow: hidden; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sq { border-radius: var(--r-md); }
.avatar.sm { width: 32px; height: 32px; font-size: 11px; }
.avatar.xs { width: 26px; height: 26px; font-size: 10px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.xl { width: 80px; height: 80px; font-size: 24px; }
.avatar.gray { background: var(--surface-3); color: var(--muted); }
.avatar.dark { background: var(--ink); color: #fff; }
.avatar .online { position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 2px solid #fff; }
.icon-circle { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--red-100); color: var(--red); }
.icon-circle.solid { background: var(--red); color: #fff; }
.icon-circle.sq { border-radius: var(--r-md); }
.icon-circle.gray { background: var(--surface-3); color: var(--ink); }
.icon-circle.green { background: var(--green-bg); color: var(--green); }
.icon-circle.blue { background: var(--blue-bg); color: var(--blue); }
.icon-circle.amber { background: var(--amber-bg); color: var(--amber); }
.icon-circle.sm { width: 32px; height: 32px; }
.icon-circle.lg { width: 52px; height: 52px; }
.icon-circle.xl { width: 72px; height: 72px; }

/* ---------- KPI ---------- */
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kpi-head { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-md); }
.kpi-icon { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--red-100); color: var(--red); flex-shrink: 0; }
.kpi-icon.green { background: var(--green-bg); color: var(--green); }
.kpi-icon.blue { background: var(--blue-bg); color: var(--blue); }
.kpi-icon.amber { background: var(--amber-bg); color: var(--amber); }
.kpi-icon.gray { background: var(--surface-3); color: var(--ink); }
.kpi-value { font-size: 24px; font-weight: 500; letter-spacing: -.02em; color: var(--ink); line-height: 1.1; }
.kpi-foot { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: var(--fs-sm); border-radius: 6px; padding: 2px 6px; }
.delta.up { color: var(--green); background: var(--green-bg); }
.delta.down { color: var(--danger); background: var(--danger-bg); }
.delta.plain { background: none; padding: 0; }
/* KPI estilo loja (círculo vermelho grande) */
.kpi-store { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px 20px; }
.kpi-store .icon-circle { width: 52px; height: 52px; }

/* ---------- Tabela ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { font-size: var(--fs-md); }
.table thead th { text-align: left; font-weight: 400; color: var(--muted); background: var(--surface-2); padding: 12px 14px; white-space: nowrap; font-size: var(--fs-md); }
.table thead th:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.table thead th:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.table tbody td { padding: 14px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FCFCFD; }
.table tbody tr.clickable { cursor: pointer; }
.table .cell-main { font-weight: 500; color: var(--ink); }
.table .cell-sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; color: var(--muted); font-size: var(--fs-md); flex-wrap: wrap; }
.pagination { display: flex; align-items: center; gap: 6px; }
.pagination button { min-width: 34px; height: 34px; border-radius: var(--r-sm); font-size: var(--fs-md); color: var(--ink); display: grid; place-items: center; padding: 0 8px; }
.pagination button:hover { background: var(--surface-3); }
.pagination button.active { background: var(--red-100); color: var(--red); font-weight: 600; }
.pagination button.nav { border: 1px solid var(--line-2); background: #fff; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filters .field { gap: 6px; }
.filters .label { font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Product card ---------- */
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; min-width: 0; transition: box-shadow .2s var(--ease), border-color .2s; cursor: pointer; }
.product-card:hover { box-shadow: var(--sh-md); border-color: transparent; }
.pc-media { position: relative; aspect-ratio: 155 / 128; border-radius: var(--r-md); background: var(--surface-3); display: grid; place-items: center; overflow: hidden; }
.pc-media img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; mix-blend-mode: multiply; }
.pc-media .ph { color: #C4C4CC; }
.pc-rating { position: absolute; top: 8px; left: 8px; height: 24px; padding: 0 8px; border-radius: 7px; background: #fff; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 500; }
.pc-rating .ic { color: var(--red); }
.pc-fav { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--ink); transition: color .15s, transform .15s; }
.pc-fav:hover { transform: scale(1.06); }
.pc-fav.on { color: var(--red); }
.pc-fav.on .ic { fill: var(--red); }
.pc-tag { position: absolute; left: 8px; bottom: 8px; }
.pc-body { padding: 14px 4px 4px; display: flex; flex-direction: column; flex: 1; }
.pc-name { font-size: var(--fs-md); font-weight: 500; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { font-size: var(--fs-sm); color: var(--muted); margin-top: 3px; }
.pc-compat { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--green); margin-top: 10px; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 18px; }
.pc-price { font-size: var(--fs-xl); font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.pc-price-old { font-size: var(--fs-sm); color: var(--muted); text-decoration: line-through; }
.pc-cart { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--red); color: #fff; display: grid; place-items: center; flex-shrink: 0; transition: background .15s; }
.pc-cart:hover { background: var(--red-600); }
.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1280px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .product-grid.rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; } .product-grid.rail > * { flex: 0 0 72%; scroll-snap-align: start; } }

/* ---------- Thumb ---------- */
.thumb { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--surface-3); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; color: #C4C4CC; }
.thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.thumb.sm { width: 40px; height: 40px; } .thumb.lg { width: 72px; height: 72px; } .thumb.xl { width: 96px; height: 96px; }

/* ---------- Stepper (checkout) ---------- */
.stepper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-md); color: var(--muted); }
.step .n { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #CFCFD6; display: grid; place-items: center; font-size: 12px; color: var(--muted); background: #fff; }
.step.done .n, .step.current .n { background: var(--red); border-color: var(--red); color: #fff; }
.step.current, .step.done { color: var(--ink); }
.step-line { width: 48px; height: 2px; background: var(--line-2); border-radius: 2px; }
.step-line.done { background: var(--red); }

/* qty */
.qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 4px; height: 42px; background: #fff; }
.qty button { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #6B6B73; }
.qty button.plus { background: var(--red); }
.qty button[disabled] { opacity: .35; }
.qty span { min-width: 34px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.qty.sm { height: 34px; } .qty.sm button { width: 22px; height: 22px; }

/* ---------- Timeline / tracking ---------- */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 28px 1fr; gap: 14px; position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line-2); }
.tl-item:last-child::before { display: none; }
.tl-item.done::before { background: var(--red); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); color: var(--muted); z-index: 1; }
.tl-item.done .tl-dot { background: var(--red); border-color: var(--red); color: #fff; }
.tl-item.current .tl-dot { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 5px var(--red-100); }
.tl-title { font-weight: 500; color: var(--ink); }
.tl-desc { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.tl-item.pending .tl-title { color: var(--muted); }

/* progress */
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--red); border-radius: inherit; }
.progress.green > span { background: var(--green); }

/* ---------- Mapa ilustrado ---------- */
.map { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #EEF0F2; min-height: 200px; }
.map svg.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 3px #fff, var(--sh-sm); }
.map-pin.red { background: var(--red); } .map-pin.green { background: var(--green); } .map-pin.blue { background: var(--blue); } .map-pin.amber { background: var(--amber-solid); } .map-pin.dark { background: var(--ink); }
.map-label { position: absolute; transform: translate(8px, -50%); background: #fff; border-radius: 8px; padding: 4px 8px; font-size: 11px; line-height: 1.25; box-shadow: var(--sh-sm); white-space: nowrap; }
.map-label b { font-weight: 500; display: block; font-size: 12px; }

/* ---------- Chat ---------- */
.chat-list-item { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); cursor: pointer; align-items: center; }
.chat-list-item:hover { background: var(--surface-2); }
.chat-list-item.active { background: var(--nav-active); }
.bubble { max-width: 70%; padding: 10px 14px; border-radius: 16px; font-size: var(--fs-base); line-height: 1.45; }
.bubble.in { background: var(--surface-3); color: var(--ink); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.out { background: var(--red); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble-time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.bubble-time.out { align-self: flex-end; }

/* ---------- Modal / drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(14,13,18,.45); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fade .18s var(--ease); backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: var(--r-2xl); width: min(520px, 100%); max-height: calc(100vh - 48px); overflow: auto; box-shadow: var(--sh-lg); animation: pop .22s var(--ease); }
.modal.lg { width: min(720px, 100%); } .modal.sm { width: min(420px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 24px 0; }
.modal-title { font-size: var(--fs-xl); font-weight: 500; }
.modal-sub { color: var(--muted); font-size: var(--fs-md); margin-top: 4px; }
.modal-body { padding: 20px 24px; }
.modal-foot { display: flex; gap: 12px; justify-content: flex-end; padding: 0 24px 24px; }
.modal-foot.stack { flex-direction: column; }
.modal-foot .btn { flex: 1; }
.overlay.drawer { place-items: stretch end; padding: 0; }
.overlay.drawer .modal { height: 100vh; max-height: 100vh; border-radius: var(--r-2xl) 0 0 var(--r-2xl); width: min(480px, 100%); animation: slideIn .25s var(--ease); display: flex; flex-direction: column; }
.overlay.drawer .modal-body { flex: 1; overflow: auto; }
@media (max-width: 767px) {
  .overlay { place-items: end stretch; padding: 0; }
  .modal { border-radius: 24px 24px 0 0; width: 100%; max-height: 92vh; animation: sheetUp .25s var(--ease); }
  .overlay.drawer .modal { border-radius: 24px 24px 0 0; height: auto; max-height: 92vh; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-md); font-size: var(--fs-md); box-shadow: var(--sh-lg); display: flex; gap: 10px; align-items: center; animation: pop .2s var(--ease); }
.toast .ic { color: #4ADE80; }

/* ---------- Empty / placeholder ---------- */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .icon-circle { width: 64px; height: 64px; }
.empty-title { color: var(--ink); font-size: var(--fs-lg); font-weight: 500; }

/* ---------- Lista de definição ---------- */
.dl { display: flex; flex-direction: column; }
.dl-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: var(--fs-md); }
.dl-row dt, .dl-row .k { color: var(--muted); }
.dl-row dd, .dl-row .v { margin: 0; color: var(--ink); font-weight: 500; text-align: right; }
.dl.zebra .dl-row { padding: 10px 12px; border-radius: 8px; }
.dl.zebra .dl-row:nth-child(odd) { background: var(--surface-2); }
.dl.lines .dl-row { border-bottom: 1px solid var(--line); }
.dl.lines .dl-row:last-child { border-bottom: 0; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; }
.total-row .v { font-size: 26px; font-weight: 500; letter-spacing: -.02em; }

/* lista de menus (Minha conta, configurações) */
.menu-list { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.menu-item:last-child { border-bottom: 0; }
.menu-item:hover .mi-title { color: var(--red); }
.mi-title { font-weight: 500; color: var(--ink); }
.mi-desc { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.menu-item > .ic:last-child { color: var(--muted); margin-left: auto; }

/* gráfico de barras simples */
.bars { display: flex; align-items: flex-end; gap: 4%; height: 240px; padding-top: 30px; position: relative; }
.bars .bar { flex: 1; background: var(--ink); border-radius: 6px 6px 0 0; position: relative; min-width: 10px; transition: background .15s; }
.bars .bar.hl { background: #F0362B; }
.bars .bar:hover { background: #3a3940; }
.bars .bar.hl:hover { background: var(--red); }
.chart-axis { display: flex; justify-content: space-between; gap: 4%; color: var(--muted); font-size: var(--fs-sm); margin-top: 10px; }
.chart-axis span { flex: 1; text-align: center; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: var(--fs-sm); color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* código (PIX / entrega) */
.code-boxes { display: flex; gap: 10px; justify-content: center; }
.code-boxes span, .code-boxes input { width: 56px; height: 64px; border-radius: var(--r-md); border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 26px; font-weight: 500; text-align: center; background: #fff; outline: none; }
.code-boxes input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-100); }
.code-boxes.big span { width: 64px; height: 76px; font-size: 34px; background: var(--surface-2); border-color: transparent; }

/* upload */
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 28px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--red); background: var(--red-50); }

/* alerta inline */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); font-size: var(--fs-md); align-items: flex-start; }
.alert.info { background: var(--blue-bg); color: #164a9e; }
.alert.success { background: var(--green-bg); color: #13692f; }
.alert.warn { background: var(--amber-bg); color: #7a4f0e; }
.alert.danger { background: var(--danger-bg); color: #9b0000; }
.alert.neutral { background: var(--surface-2); color: var(--text); }

/* skeleton */
.skel { background: linear-gradient(90deg, #f0f0f2 0%, #f7f7f9 50%, #f0f0f2 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* dropdown */
.dropdown { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-md); padding: 6px; min-width: 200px; animation: pop .15s var(--ease); }
.dropdown button, .dropdown a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 8px; font-size: var(--fs-md); text-align: left; color: var(--ink); }
.dropdown button:hover, .dropdown a:hover { background: var(--surface-2); }
.dropdown .danger { color: var(--danger); }
