/* ============================================================================
   Portal Personal Shopper — Sistema white-label
   Tudo que é cor passa por token. Troque o bloco :root p/ trocar de marca.
   Marca de referência: "USA sem sair de casa"
   ========================================================================== */

:root {
  /* --- Marca (troque estes 4 p/ white-label) --- */
  --primary:   #BD5A37;   /* terracota — ações, preços, CTAs */
  --secondary: #173E32;   /* verde-escuro — texto base, superfícies escuras */
  --surface:   #FFFDF8;   /* off-white — fundo da página */
  --accent:    #D6A24F;   /* dourado — selos, detalhes */

  /* --- Derivados de marca --- */
  --primary-ink: #FFFFFF;
  --primary-tint: color-mix(in oklab, var(--primary) 10%, var(--surface));
  --primary-hover: color-mix(in oklab, var(--primary), black 10%);
  --accent-tint: color-mix(in oklab, var(--accent) 16%, var(--surface));
  --secondary-tint: color-mix(in oklab, var(--secondary) 8%, var(--surface));

  /* --- Neutros --- */
  --card: #FFFFFF;
  --fg: var(--secondary);
  --muted: #566B60;                 /* texto secundário sobre claro (AA ≥5:1) */
  --muted-2: #9AA79F;               /* status cinza / cancelado */
  --line: color-mix(in oklab, var(--secondary) 12%, transparent);
  --line-strong: color-mix(in oklab, var(--secondary) 20%, transparent);

  /* --- Semânticas de status (consistentes no portal todo) --- */
  --success: #1E874B;  --success-bg: #E4F3E9;
  --warn:    #B57611;  --warn-bg:    #FBEFD5;
  --info:    #2563A8;  --info-bg:    #E2ECF7;
  --danger:  #C0392B;  --danger-bg:  #F8E5E2;
  --wa:      #128C3E;  --wa-btn:     #25D366;  /* botão WhatsApp */

  /* --- Tipografia --- */
  --font: system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 15px; --fs-md: 16px;
  --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 27px; --fs-3xl: 34px;

  /* --- Forma & espaço --- */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --shadow-1: 0 1px 2px color-mix(in oklab, var(--secondary) 8%, transparent);
  --shadow-2: 0 8px 24px color-mix(in oklab, var(--secondary) 14%, transparent);
  --shadow-up: 0 -4px 20px color-mix(in oklab, var(--secondary) 12%, transparent);
  --tap: 48px;                       /* alvo mínimo thumb-friendly */
  --maxw: 460px;                     /* coluna mobile-first */
  --ease: cubic-bezier(.2,0,0,1);
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--fg);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--primary) 45%, transparent); outline-offset: 2px; border-radius: 6px; }

/* --- Shell mobile-first --- */
.app { max-width: var(--maxw); margin: 0 auto; min-height: 100dvh; position: relative;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.pad { padding: var(--sp-4); }
.stack > * + * { margin-top: var(--sp-3); }
.stack-lg > * + * { margin-top: var(--sp-5); }
.scroll-pad { padding-bottom: 96px; }   /* espaço p/ barra fixa */

/* ========================= Header ========================= */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: color-mix(in oklab, var(--surface) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo {
  width: 40px; height: 40px; border-radius: var(--r-pill); flex: none;
  background: radial-gradient(120% 120% at 30% 25%, var(--accent), var(--primary));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 2px color-mix(in oklab, #fff 55%, transparent);
}
.brand-name { font-weight: 800; font-size: var(--fs-md); letter-spacing: -.01em; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.topbar-actions { margin-left: auto; display: flex; gap: var(--sp-2); align-items: center; }
.icon-btn { width: var(--tap); height: var(--tap); border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--card); display: grid; place-items: center; cursor: pointer; }

/* ========================= Botões ========================= */
.btn { --_h: var(--tap);
  min-height: var(--_h); border: none; border-radius: var(--r-md); cursor: pointer;
  font-weight: 700; font-size: var(--fs-md); padding: 0 var(--sp-5);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  transition: transform .08s var(--ease), background .15s var(--ease); width: 100%;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--card); color: var(--fg); border: 1.5px solid var(--line-strong); }
.btn-dark { background: var(--secondary); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-wa { background: var(--wa-btn); color: #06371a; }
.btn-wa:hover { filter: brightness(.97); }
.btn-sm { --_h: 40px; font-size: var(--fs-sm); padding: 0 var(--sp-4); width: auto; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ========================= Chips de status ========================= */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700;
  padding: 5px 11px; border-radius: var(--r-pill); line-height: 1; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip--warn    { background: var(--warn-bg);    color: var(--warn); }
.chip--success { background: var(--success-bg); color: var(--success); }
.chip--info    { background: var(--info-bg);    color: var(--info); }
.chip--muted   { background: color-mix(in oklab, var(--muted-2) 18%, var(--surface)); color: #5c6b62; }
.chip--accent  { background: var(--accent-tint); color: color-mix(in oklab, var(--accent), black 34%); }
.chip.no-dot::before { display: none; }

/* ========================= Card de marca ========================= */
.brand-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
.brand-card { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card);
  box-shadow: var(--shadow-1); cursor: pointer; transition: transform .12s var(--ease), box-shadow .12s var(--ease); }
.brand-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.brand-cover { aspect-ratio: 16/9; position: relative; }
.brand-cover .cover-fill { width: 100%; height: 100%; object-fit: cover; }
.brand-cover .ph { width: 100%; height: 100%; }
.brand-card-body { padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; gap: var(--sp-3); }
.brand-avatar { width: 44px; height: 44px; border-radius: var(--r-pill); flex: none; margin-top: -34px;
  border: 3px solid var(--card); box-shadow: var(--shadow-1); background: var(--secondary-tint); position: relative; z-index: 2; }
.brand-card-body h3 { font-size: var(--fs-md); font-weight: 700; }
.brand-card-body p { font-size: var(--fs-sm); color: var(--muted); }

/* ========================= Card de produto ========================= */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.product-card { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--card);
  display: flex; flex-direction: column; box-shadow: var(--shadow-1); }
.product-photo { aspect-ratio: 1/1; position: relative; }
.product-photo .ph { width: 100%; height: 100%; }
.product-photo .brand-tag { position: absolute; top: 8px; left: 8px; background: color-mix(in oklab, var(--secondary) 82%, transparent);
  color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--r-pill); backdrop-filter: blur(4px); }
.product-body { padding: var(--sp-3); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.price { margin-top: auto; }
.price .brl { font-size: var(--fs-lg); font-weight: 800; color: var(--primary); letter-spacing: -.02em; }
.price .usd { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; margin-top: 1px; }

/* ========================= Stepper (− qtd +) ========================= */
.add-row { margin-top: 2px; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--primary); border-radius: var(--r-md);
  overflow: hidden; height: 44px; }
.stepper button { flex: none; width: 44px; height: 100%; background: var(--primary-tint); color: var(--primary);
  border: none; font-size: 20px; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.stepper button:active { background: color-mix(in oklab, var(--primary) 20%, var(--surface)); }
.stepper .qty { flex: 1; text-align: center; font-weight: 800; color: var(--fg); font-size: var(--fs-md); }

/* ========================= Bottom bar (carrinho fixo / nav) ========================= */
.bottombar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: var(--maxw);
  z-index: 45; background: var(--card); border-top: 1px solid var(--line); box-shadow: var(--shadow-up);
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom)); }
.cart-bar { display: flex; align-items: center; gap: var(--sp-3); }
.cart-bar .cart-total { line-height: 1.1; }
.cart-bar .cart-total small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.cart-bar .cart-total .brl { font-size: var(--fs-lg); font-weight: 800; color: var(--primary); }
.cart-bar .btn { width: auto; margin-left: auto; padding: 0 var(--sp-5); }
.cart-count { background: var(--accent); color: var(--secondary); font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: var(--r-pill); display: inline-grid; place-items: center; padding: 0 6px; }

/* nav inferior (suíte) */
.tabbar { display: flex; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0;
  font-size: 11px; font-weight: 600; color: var(--muted); min-height: var(--tap); justify-content: center; }
.tabbar a.active { color: var(--primary); }
.tabbar a svg { width: 22px; height: 22px; }

/* ========================= Bottom sheet / modal ========================= */
.sheet-scrim { position: fixed; inset: 0; z-index: 60; background: color-mix(in oklab, var(--secondary) 45%, transparent);
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s; backdrop-filter: blur(2px); }
.sheet-scrim.open { opacity: 1; visibility: visible; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: var(--maxw);
  z-index: 61; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0;
  transition: transform .28s var(--ease), opacity .2s var(--ease), visibility .28s;
  max-height: 88dvh; display: flex; flex-direction: column; box-shadow: var(--shadow-2);
  /* fechada = invisível de verdade (o media query desktop centrava sheets fechadas) */
  opacity: 0; visibility: hidden; pointer-events: none; }
.sheet.open { transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto; }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 10px auto 4px; }
.sheet-head { display: flex; align-items: center; padding: var(--sp-2) var(--sp-4) var(--sp-3); border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: var(--fs-lg); font-weight: 800; }
.sheet-head .close { margin-left: auto; }
.sheet-body { overflow-y: auto; padding: var(--sp-4); flex: 1; }
.sheet-foot { padding: var(--sp-4); border-top: 1px solid var(--line); background: var(--card); }

/* ========================= Card / seção genérica ========================= */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4); box-shadow: var(--shadow-1); }
.section-title { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.01em; }
.eyebrow { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.muted { color: var(--muted); }
.hint { font-size: var(--fs-sm); color: var(--muted); line-height: 1.45; }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--sp-4) 0; }

/* linha de item (carrinho / suíte) */
.line-item { display: flex; gap: var(--sp-3); align-items: center; }
.line-item .thumb { width: 60px; height: 60px; border-radius: var(--r-sm); flex: none; overflow: hidden; }
.line-item .thumb .ph { width: 100%; height: 100%; }
.line-item .li-body { flex: 1; min-width: 0; }
.line-item .li-body .nm { font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }
.line-item .li-body .meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.line-item .li-price { font-weight: 800; color: var(--primary); white-space: nowrap; }
.link-remove { color: var(--danger); font-size: var(--fs-xs); font-weight: 600; background: none; border: none; cursor: pointer; padding: 4px 0; }

/* ========================= Bloco Pix ========================= */
.pix { background: var(--secondary-tint); border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: var(--sp-4); }
.pix .pix-key { display: flex; align-items: center; gap: var(--sp-2); background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 12px; margin: 8px 0; font-family: ui-monospace, "SF Mono", monospace; font-size: 13px; }
.pix .pix-key code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { background: var(--primary-tint); color: var(--primary); border: none; border-radius: 8px; padding: 7px 12px;
  font-weight: 700; font-size: 12px; cursor: pointer; flex: none; }
.copy-btn.done { background: var(--success-bg); color: var(--success); }

/* ========================= Timeline de envio ========================= */
.timeline { position: relative; padding-left: 30px; }
.timeline .tl-item { position: relative; padding-bottom: var(--sp-5); }
.timeline .tl-item:last-child { padding-bottom: 0; }
.timeline .tl-item::before { content: ""; position: absolute; left: -30px; top: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--card); border: 2px solid var(--line-strong); }
.timeline .tl-item::after { content: ""; position: absolute; left: -22px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline .tl-item:last-child::after { display: none; }
.timeline .tl-item.done::before { background: var(--success); border-color: var(--success); }
.timeline .tl-item.done::after { background: var(--success); }
.timeline .tl-item.active::before { background: var(--primary); border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-tint); }
.timeline .tl-title { font-weight: 700; font-size: var(--fs-sm); }
.timeline .tl-item.muted-step .tl-title { color: var(--muted-2); font-weight: 600; }
.timeline .tl-date { font-size: var(--fs-xs); color: var(--muted); }

/* ========================= Wizard steps ========================= */
.steps { display: flex; align-items: center; gap: 6px; padding: var(--sp-3) var(--sp-4); }
.steps .dot { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.steps .dot.done { background: var(--primary); }
.steps .dot.active { background: var(--primary); }
.check-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--line);
  border-radius: var(--r-md); cursor: pointer; background: var(--card); }
.check-row input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.check-row.selected { border-color: var(--primary); background: var(--primary-tint); }
.check-row .cr-body { flex: 1; }
.check-row .cr-price { font-weight: 800; color: var(--primary); }

/* ========================= Inputs / formulário ========================= */
.field { display: block; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 5px; }
.field .req { color: var(--primary); }
.input { width: 100%; min-height: var(--tap); border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--card); padding: 0 14px; font-size: var(--fs-md); }
textarea.input { padding: 12px 14px; min-height: 80px; line-height: 1.4; }
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-tint); }
.field-grid { display: grid; gap: var(--sp-3); grid-template-columns: 1fr 1fr; }
.field-hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.input-group { display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--card); overflow: hidden; }
.input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.input-group .prefix { padding: 0 12px; color: var(--muted); font-weight: 600; border-right: 1px solid var(--line); align-self: stretch; display: grid; place-items: center; }
.input-group input { border: none; min-height: var(--tap); flex: 1; padding: 0 12px; background: none; }
.input-group input:focus { outline: none; }

/* ========================= Placeholder de imagem (nunca CDN externo) ========================= */
.ph { background:
    linear-gradient(135deg, color-mix(in oklab, var(--accent) 22%, var(--surface)), color-mix(in oklab, var(--primary) 16%, var(--surface)));
  display: grid; place-items: center; color: color-mix(in oklab, var(--secondary) 55%, transparent); }
.ph svg { width: 32%; height: 32%; opacity: .55; }
.ph--cover { background:
    linear-gradient(135deg, color-mix(in oklab, var(--secondary) 30%, var(--surface)), color-mix(in oklab, var(--accent) 40%, var(--surface))); }
.ph--avatar { background: radial-gradient(circle at 35% 30%, var(--accent), var(--primary)); }

/* ========================= KPI / action cards da suíte ========================= */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.action-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4);
  display: flex; flex-direction: column; gap: 10px; cursor: pointer; box-shadow: var(--shadow-1); min-height: 96px; }
.action-card:active { transform: scale(.99); }
.action-card .ic { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--primary-tint); color: var(--primary);
  display: grid; place-items: center; }
.action-card .ic svg { width: 22px; height: 22px; }
.action-card .ac-title { font-weight: 700; font-size: var(--fs-sm); }
.action-card .ac-sub { font-size: var(--fs-xs); color: var(--muted); }

.suite-item { position: relative; }
.badge-count { position: absolute; top: -6px; right: -6px; background: var(--primary); color: #fff; font-size: 11px;
  font-weight: 800; min-width: 22px; height: 22px; border-radius: var(--r-pill); display: grid; place-items: center; padding: 0 6px; border: 2px solid var(--card); }

/* fila horizontal (produtos na suíte) */
.hscroll { display: flex; gap: var(--sp-3); overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.suite-prod { width: 116px; }
.suite-prod .ph { aspect-ratio: 1; border-radius: var(--r-sm); }
.suite-prod .nm { font-size: var(--fs-xs); font-weight: 600; margin-top: 6px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* pedido resumido */
.order-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--card); }
.order-row .oid { font-weight: 800; font-size: var(--fs-sm); }
.order-row .odate { font-size: var(--fs-xs); color: var(--muted); }
.order-row .ototal { margin-left: auto; text-align: right; }
.order-row .ototal .v { font-weight: 800; color: var(--primary); }

/* botão flutuante WhatsApp */
.wa-fab { position: fixed; right: max(16px, calc(50% - var(--maxw)/2 + 16px)); bottom: calc(84px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: var(--r-pill); background: var(--wa-btn); color: #06371a; z-index: 44;
  display: grid; place-items: center; box-shadow: var(--shadow-2); border: none; cursor: pointer; }
.wa-fab svg { width: 28px; height: 28px; }

/* estado vazio */
.empty { text-align: center; padding: var(--sp-8) var(--sp-4); }
.empty .emoji { font-size: 40px; }
.empty h3 { font-size: var(--fs-lg); font-weight: 800; margin: var(--sp-3) 0 6px; }
.empty p { color: var(--muted); max-width: 30ch; margin: 0 auto var(--sp-4); }

/* breadcrumb / busca */
.breadcrumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; padding: 4px 0; }
.searchbar { display: flex; align-items: center; gap: var(--sp-2); background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r-pill); padding: 0 14px; height: 46px; }
.searchbar input { flex: 1; border: none; background: none; min-height: 44px; }
.searchbar input:focus { outline: none; }
.searchbar svg { width: 20px; height: 20px; color: var(--muted); }

/* microcopy tooltip "primeira vez" */
.info-callout { display: flex; gap: 10px; background: var(--accent-tint); border-radius: var(--r-md); padding: 12px 14px;
  font-size: var(--fs-sm); line-height: 1.45; color: color-mix(in oklab, var(--secondary) 88%, black); }
.info-callout b { color: var(--secondary); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); background: var(--secondary); color: #fff;
  padding: 12px 18px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; z-index: 80; opacity: 0;
  transition: all .25s var(--ease); pointer-events: none; max-width: 90%; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ========================= Desktop (aprimoramento secundário) ========================= */
@media (min-width: 900px) {
  :root { --maxw: 1080px; }
  .app { box-shadow: none; }
  .desk-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: start; }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .action-grid { grid-template-columns: repeat(4, 1fr); }
  .bottombar { max-width: var(--maxw); }
  .sheet { border-radius: var(--r-lg); max-width: 480px; bottom: auto; top: 50%; transform: translate(-50%, -46%) scale(.98); }
  .sheet.open { transform: translate(-50%, -50%) scale(1); }
  .wa-fab { right: max(24px, calc(50% - var(--maxw)/2)); }
}
@media (min-width: 620px) and (max-width: 899px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Desktop de verdade (produção no domínio próprio) ===== */
@media (min-width: 900px) {
  :root { --maxw: 1200px; }
  .pad { padding: var(--sp-5) var(--sp-6); }
  .topbar { padding: var(--sp-3) var(--sp-6); }
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(5, 1fr); }
  .searchbar { max-width: 640px; }
  .cart-bar { max-width: var(--maxw); margin: 0 auto; }
  .tabbar { display: none; }               /* nav inferior é coisa de mobile */
  .order-row, .card { transition: box-shadow .15s var(--ease); }
  .product-card:hover { box-shadow: var(--shadow-2); }
  .brand-card:hover { box-shadow: var(--shadow-2); }
}
@media (min-width: 1400px) {
  :root { --maxw: 1320px; }
  .product-grid { grid-template-columns: repeat(6, 1fr); }
  .brand-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Correções do review UI/UX (14/07) ===== */
/* hidden SEMPRE vence (display:flex de componentes anulava o atributo) */
[hidden] { display: none !important; }
/* ícones injetados sem tamanho explícito ficavam invisíveis */
[data-icon] svg { width: 20px; height: 20px; display: block; }
.icon-btn { color: var(--fg); }
.tabbar [data-icon] svg { width: 22px; height: 22px; }
/* avatar da marca vira INICIAL (a bolinha laranja parecia badge de erro) */
.brand-avatar { display: grid; place-items: center; font-weight: 800; font-size: 15px;
  color: var(--primary); background: var(--primary-tint); border: 1px solid var(--line); }

/* ===== Loja: navegação CATEGORIA-primeiro (14/07) ===== */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.cat-card { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card);
  box-shadow: var(--shadow-1); cursor: pointer; padding: 0; text-align: left; font: inherit; color: inherit;
  display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.cat-cover { aspect-ratio: 16/10; position: relative; background: var(--primary-tint); }
.cat-cover img { width: 100%; height: 100%; object-fit: cover; }
.cat-emoji { width: 100%; height: 100%; display: grid; place-items: center; font-size: 40px;
  background: var(--primary-tint); }
.cat-card-body { padding: var(--sp-3) var(--sp-4); }
.cat-card-body h3 { font-size: var(--fs-md); font-weight: 800; }
.cat-card-body p { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }

/* chips de marca (filtro nível 2 dentro da categoria) */
.brand-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.brand-chips::-webkit-scrollbar { display: none; }
.brand-chips .bchip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-pill); background: var(--card); color: var(--fg);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.brand-chips .bchip span { font-size: 11px; font-weight: 700; color: var(--muted); }
.brand-chips .bchip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.brand-chips .bchip.on span { color: color-mix(in oklab, #fff 75%, var(--primary)); }

@media (min-width: 620px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
