/* ============================================================
   Design system — inspirado em apps de delivery, com a paleta
   da marca: branco, AZUL VIVO (no lugar do verde), preto, cinza.
   Tudo via variáveis -> o admin poderá personalizar o tema.
   Responsivo: web (grid multi-coluna + top nav) e mobile (bottom nav).
   ============================================================ */
:root {
  --bg:            #ffffff;
  --surface:       #f4f6fa;   /* cinza muito claro (chips, áreas) */
  --surface-2:     #eef1f7;
  --text:          #121722;   /* preto */
  --muted:         #7b8190;   /* cinza */
  --border:        #e9ecf3;

  --primary:       #1565ff;   /* azul vivo */
  --primary-d:     #0d49d0;
  --primary-l:     #e9f0ff;   /* azul bem claro p/ fundos */
  --primary-soft:  #f1f6ff;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --card:          #ffffff;   /* superfícies elevadas (cards, dropdown, nav) */
  --appbar-bg:     rgba(255,255,255,.9);
  --border-hover:  #d7deea;

  --shadow-sm: 0 1px 2px rgba(18,23,34,.05);
  --shadow:    0 6px 18px rgba(18,23,34,.07);
  --shadow-lg: 0 12px 32px rgba(18,23,34,.12);

  --maxw: 1180px;
  --appbar-h: 70px;
}

/* Tema escuro — ativado por html[data-theme="dark"] (preferência do sistema
   por padrão; o visitante alterna no botão do topo e fica salvo no navegador). */
html[data-theme="dark"] {
  --bg:            #0b0f17;
  --surface:       #161d2c;
  --surface-2:     #1b2336;
  --text:          #e8ecf5;
  --muted:         #8f97ab;
  --border:        #232c42;

  --primary-l:     #14264a;
  --primary-soft:  #101d36;

  --card:          #121826;
  --appbar-bg:     rgba(11,15,23,.88);
  --border-hover:  #33405f;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --shadow:    0 6px 18px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
h1, h2, h3, h4 {
  font-family: "Poppins", "Montserrat", "Segoe UI", system-ui, sans-serif;
}
body {
  /* Tipografia da marca (padrão inicial da plataforma): Montserrat no corpo,
     Poppins nos títulos. Quando a personalização por loja chegar, o dono
     escolhe as dele — até lá, todo catálogo fala a tipografia ATNO. */
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  /* Rodapé colado no fim da janela. Em página curta (pedido, carrinho vazio,
     confirmação) o conteúdo não chegava ao fim da tela e sobrava uma faixa da
     cor do fundo abaixo do rodapé. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;  /* no celular desconta a barra do navegador */
}
/* `width: 100%` é obrigatório: como item de flex, o `main` com `margin: 0 auto`
   encolheria para o tamanho do conteúdo em vez de ir até o `max-width`. */
main { flex: 1 0 auto; width: 100%; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.icon { width: 22px; height: 22px; display: block; }
.icon--sm { width: 18px; height: 18px; }

/* ---------- App bar (topo) ---------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--appbar-bg);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.appbar__inner {
  display: flex; align-items: center; gap: 18px;
  min-height: var(--appbar-h); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.2rem;
  background: var(--primary-l); color: var(--primary);
}
.brand__name strong { color: var(--primary); }

.search {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 280px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 10px 16px; color: var(--muted);
}
.search input {
  border: 0; outline: 0; background: transparent; width: 100%;
  font-size: .95rem; color: var(--text);
}
.appbar__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  position: relative;
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: .15s ease;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .badge-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--primary); color: #fff; font-size: .68rem; font-weight: 700;
  border-radius: var(--r-pill); display: grid; place-items: center; border: 2px solid var(--bg);
}
.avatar {
  width: 42px; height: 42px; border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; display: grid; place-items: center; font-weight: 700;
}

/* Toggle de tema: sol no claro, lua no escuro */
.tema-icone--lua { display: none; }
html[data-theme="dark"] .tema-icone--lua { display: block; }
html[data-theme="dark"] .tema-icone--sol { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--r-pill); font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: .15s ease;
}
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-d); }
.btn--primary:disabled { opacity: .5; cursor: not-allowed; }
.btn--light { background: #fff; color: var(--primary); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 26px; font-size: 1.02rem; }

/* ---------- Greeting ---------- */
.greeting { padding: 26px 0 8px; }
.greeting h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.greeting p { margin: 4px 0 0; color: var(--muted); }

/* ---------- Categorias (pills com ícone) ---------- */
/* Desktop: setas + arrastar com o mouse (grab); mobile: scroll por toque. */
.cat-wrap { position: relative; }
.cat-row {
  display: flex; gap: 12px; overflow-x: auto; padding: 16px 2px;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.cat-row::-webkit-scrollbar { display: none; }
.cat-row.is-dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.cat-row.is-dragging .cat-pill { pointer-events: none; }
.cat-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; padding: 0 0 3px;
  font-size: 1.35rem; line-height: 1; cursor: pointer;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: .15s ease;
}
.cat-nav:hover { border-color: var(--primary); color: var(--primary); }
.cat-nav--prev { left: -14px; }
.cat-nav--next { right: -14px; }
@media (max-width: 860px) { .cat-nav { display: none !important; } }
.cat-pill {
  flex: 0 0 auto; display: flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: var(--r-pill); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: .92rem; color: var(--text); transition: .15s ease;
}
.cat-pill__icon {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--card); font-size: 1.05rem; box-shadow: var(--shadow-sm);
}
.cat-pill:hover { border-color: var(--border-hover); }
.cat-pill.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-pill.is-active .cat-pill__icon { background: rgba(255,255,255,.2); }

/* ---------- Banner de promoção ---------- */
.promo {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-d) 100%);
  color: #fff; border-radius: var(--r-lg); padding: 26px 28px; margin: 10px 0 6px;
  box-shadow: var(--shadow); overflow: hidden;
}
.promo__tag {
  display: inline-block; background: rgba(255,255,255,.18); color: #fff;
  padding: 5px 12px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 700; margin-bottom: 10px;
}
.promo__text h2 { margin: 0 0 14px; font-size: 1.5rem; line-height: 1.15; }
.promo__art { font-size: 3.4rem; line-height: 1; white-space: nowrap; filter: drop-shadow(0 6px 12px rgba(0,0,0,.2)); }

/* ---------- Section head ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 14px; }
.section-head h2 { margin: 0; font-size: 1.2rem; }
.section-head a { color: var(--primary); font-weight: 600; font-size: .9rem; }

/* ---------- Grid de produtos ---------- */
.product-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
}
.product-card {
  position: relative;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r);
  padding: 12px; box-shadow: var(--shadow-sm); transition: .18s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card__media {
  height: 120px; border-radius: 14px; margin-bottom: 12px;
  display: grid; place-items: center; font-size: 3rem;
  background: radial-gradient(120% 120% at 50% 20%, var(--primary-soft), var(--surface));
}
.product-card__cat {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 700;
}
.product-card__title { margin: 4px 0 2px; font-size: 1rem; line-height: 1.25; }
.product-card__meta { color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 6px; }
.product-card__bottom {
  display: flex; align-items: center; justify-content: space-between; margin-top: 12px;
}
.price { font-size: 1.12rem; font-weight: 800; }
.price small { font-size: .72rem; color: var(--muted); font-weight: 600; }
.add-btn {
  width: 40px; height: 40px; border-radius: 13px; flex: 0 0 auto;
  background: var(--primary); color: #fff; border: 0; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 6px 14px rgba(21,101,255,.35);
  transition: .15s ease;
}
.add-btn:hover { background: var(--primary-d); transform: scale(1.06); }
.add-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.tag-soft {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--primary-l); color: var(--primary-d);
  padding: 3px 9px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 700;
}
.product-card__fav {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: var(--r-pill); border: 0; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--muted); display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav { display: none; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); margin-top: 48px; background: var(--surface); color: var(--muted); font-size: .9rem; }
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 36px; padding-top: 38px; padding-bottom: 30px; }
.footer__logo { height: 38px; width: auto; display: block; margin-bottom: 12px; }
.footer__title { font-size: 1.15rem; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.footer__about { margin: 0 0 16px; max-width: 380px; line-height: 1.55; }
.footer__socials { display: flex; flex-wrap: wrap; gap: 10px; }
.soc {
  width: 38px; height: 38px; border-radius: var(--r-pill); display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--border); color: var(--text); transition: .15s ease;
}
.soc:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-2px); }
.soc svg { width: 17px; height: 17px; }
.footer__col h4 { margin: 0 0 12px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); font-weight: 700; }
.footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer__list a { transition: color .15s ease; }
.footer__list a:hover { color: var(--primary); }
.footer__addr { margin: 0; line-height: 1.65; }
.footer__bottom { border-top: 1px solid var(--border); }
.footer__bottominner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 16px; padding-bottom: 16px; font-size: .82rem;
}
.footer__powered strong { color: var(--primary); }

/* ---------- Conta (appbar) ---------- */
.acct {
  display: inline-flex; align-items: center; padding: 9px 18px;
  border-radius: var(--r-pill); font-weight: 600; font-size: .9rem;
  background: var(--primary); color: #fff; transition: .15s ease; white-space: nowrap;
}
.acct:hover { background: var(--primary-d); }

/* ---------- Dropdown da conta ---------- */
.acct-menu { position: relative; }
.acct-menu .avatar { border: 0; cursor: pointer; padding: 0; font: inherit; }
.acct-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 234px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 8px;
}
.acct-dropdown__head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.acct-dropdown__head strong { display: block; font-size: .92rem; color: var(--text); }
.acct-dropdown__head span { display: block; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-dropdown__item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: .9rem; font-weight: 500; color: var(--text); transition: .12s ease; }
.acct-dropdown__item > span { width: 18px; text-align: center; }
.acct-dropdown__item:hover { background: var(--surface); color: var(--primary); }
.acct-dropdown__item--out { color: #e5484d; margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0; }
.acct-dropdown__item--out:hover { background: #fdecec; color: #c93b3f; }

/* ---------- Hero ---------- */
.hero { padding: 30px 0 6px; }
.hero__title { margin: 0; font-size: 1.9rem; letter-spacing: -.025em; font-weight: 800; }
.hero__sub { margin: 8px 0 0; color: var(--muted); font-size: 1.02rem; max-width: 660px; }

/* Categorias como <a> (mantém o visual dos pills) */
.cat-pill { text-decoration: none; }

/* ---------- Cabeçalho de resultados ---------- */
.results-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin: 22px 0 14px; flex-wrap: wrap;
}
.results-head h2 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.results-head .muted { font-weight: 500; font-size: .95rem; }
.results-clear { color: var(--primary); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.results-clear:hover { text-decoration: underline; }

/* ---------- Paginação ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 32px 0 8px; }
.page-btn {
  display: inline-flex; align-items: center; padding: 10px 18px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  font-weight: 600; font-size: .9rem; transition: .15s ease;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.is-disabled { opacity: .45; pointer-events: none; }
.page-info { color: var(--muted); font-size: .9rem; }

/* ---------- Estado vazio ---------- */
.empty { text-align: center; padding: 60px 20px; }
.empty__icon { font-size: 3rem; margin-bottom: 10px; }
.empty h3 { margin: 0 0 6px; font-size: 1.2rem; }
.empty p { margin: 0 0 18px; }

/* ---------- "Seu preço" flag (cards e detalhe) ---------- */
.price-flag {
  display: inline-flex; align-items: center; margin-left: 8px;
  background: var(--primary-l); color: var(--primary-d);
  font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 8px; border-radius: var(--r-pill); vertical-align: middle;
}
.price-flag--lg { font-size: .78rem; margin-left: 0; margin-top: 8px; padding: 6px 12px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 22px 0 4px; font-size: .85rem; color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb__sep { color: #c8cfdb; }
.breadcrumb__current { color: var(--text); font-weight: 600; }

/* ---------- Página de produto ---------- */
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; margin: 14px 0 8px; align-items: start; }
.pd__media {
  border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1 / 1;
  display: grid; place-items: center; border: 1px solid var(--border);
  background: radial-gradient(120% 120% at 50% 20%, var(--primary-soft), var(--surface));
}
.pd__media img { width: 100%; height: 100%; object-fit: cover; }
.pd__emoji { font-size: 6rem; }
.pd__cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pd__cat {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 5px 12px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 600; transition: .15s ease;
}
.pd__cat:hover { border-color: var(--primary); color: var(--primary); }
.pd__title { margin: 0 0 12px; font-size: 1.9rem; line-height: 1.15; letter-spacing: -.02em; }
.pd__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.pd__meta strong { color: var(--text); }
.pd__descr { margin: 0 0 20px; line-height: 1.6; color: #36404f; max-width: 560px; }
.pd__price-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; margin-bottom: 18px; }
.pd__price-old { display: block; color: var(--muted); text-decoration: line-through; font-size: .95rem; margin-bottom: 2px; }
.pd__price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.pd__price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.pd__login-hint { display: inline-block; margin-top: 10px; color: var(--primary); font-weight: 600; font-size: .88rem; }
.pd__login-hint:hover { text-decoration: underline; }
.pd__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Quantidade (stepper) ---------- */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-pill); overflow: hidden; background: var(--card); }
.qty__btn { width: 38px; height: 40px; border: 0; background: var(--card); color: var(--text); font-size: 1.2rem; cursor: pointer; line-height: 1; }
.qty__btn:hover { background: var(--surface); color: var(--primary); }
.qty__input {
  width: 54px; height: 40px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  text-align: center; font-size: .95rem; font-weight: 700; color: var(--text); -moz-appearance: textfield;
}
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd__add { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pd__add-btn { flex: 1 1 auto; }
.pd__back { color: var(--primary); font-weight: 600; font-size: .9rem; align-self: center; }

/* Galeria (produto com mais de uma imagem) */
.pd__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pd__thumb {
  width: 64px; height: 64px; border-radius: 12px; overflow: hidden; padding: 0; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface); transition: .15s ease;
}
.pd__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd__thumb.is-active, .pd__thumb:hover { border-color: var(--primary); }

/* Selo de desconto (de/por) e riscado nos cards */
.pd__off {
  display: inline-block; margin-left: 10px; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--primary); color: #fff; font-size: .8rem; font-weight: 800; vertical-align: middle;
}
.price-old { color: var(--muted); text-decoration: line-through; font-weight: 600; font-size: .85em; margin-right: 4px; }

/* Seletor de variantes (pills por opção) */
.opt { margin: 0 0 14px; }
.opt__label { display: block; font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.opt__label strong { color: var(--text); }
.opt__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-pill {
  padding: 7px 16px; border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: .9rem; font-weight: 600; cursor: pointer; transition: .15s ease;
}
.opt-pill:hover { border-color: var(--primary); color: var(--primary); }
.opt-pill.is-active { border-color: var(--primary); background: var(--primary); color: #fff; }
.opt-pill.is-off { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* ---------- Carrinho ---------- */
.cart { display: grid; grid-template-columns: 1fr 330px; gap: 28px; align-items: start; margin-top: 6px; }
.cart__list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid; align-items: center; gap: 14px; padding: 12px 14px;
  grid-template-columns: 64px 1fr auto auto auto;
  grid-template-areas: "media info qty sub del";
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
}
.cart-item__media { grid-area: media; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; font-size: 1.7rem; background: var(--surface); border: 1px solid var(--border); }
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { grid-area: info; min-width: 0; }
.cart-item__name { font-weight: 700; display: block; }
.cart-item__name:hover { color: var(--primary); }
.cart-item__unit { color: var(--muted); font-size: .85rem; margin-top: 3px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cart-item__qty { grid-area: qty; }
.cart-item__subtotal { grid-area: sub; font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.cart-item__del { grid-area: del; }
.cart-item__remove { width: 32px; height: 32px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; }
.cart-item__remove:hover { border-color: #e5484d; color: #e5484d; }

.cart__summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; position: sticky; top: calc(var(--appbar-h) + 14px); }
.cart__summary h3 { margin: 0 0 14px; }
.cart__row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; color: var(--muted); }
.cart__row--total { color: var(--text); font-size: 1.35rem; font-weight: 800; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 14px; }
.cart__hint { font-size: .82rem; margin: 8px 0 14px; }
.cart__summary .btn { margin-top: 8px; }
.cart__clear { width: 100%; margin-top: 14px; background: none; border: 0; color: var(--muted); font-size: .85rem; cursor: pointer; text-decoration: underline; }
.cart__clear:hover { color: #e5484d; }

/* ---------- Coração de favorito ---------- */
.card-wrap { position: relative; display: flex; }
.card-wrap > .product-card { flex: 1 1 auto; width: 100%; }
.fav-btn {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--border); color: var(--muted);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: .15s ease;
}
.fav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.fav-btn:hover { color: #e5484d; }
.fav-btn.is-active { color: #e5484d; }
.fav-btn.is-active svg { fill: currentColor; }
.fav-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; vertical-align: -3px; margin-right: 5px; }
.fav-toggle.is-active { color: #e5484d; border-color: #f3c2c4; }
.fav-toggle.is-active svg { fill: currentColor; }

/* ---------- Minha conta ---------- */
.flash { padding: 12px 16px; border-radius: 12px; font-size: .9rem; margin-bottom: 16px; }
.flash--ok { background: #e9f7ee; color: #14773b; border: 1px solid #bfe6cd; }
.flash--erro { background: #fdecec; color: #b3261e; border: 1px solid #f6c9c6; }
.conta { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.conta-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; }
.conta-card h3 { margin: 0 0 16px; }
.conta-dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; margin: 0 0 18px; }
.conta-dl dt { color: var(--muted); font-size: .85rem; }
.conta-dl dd { margin: 0; font-weight: 600; }
.conta-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.conta-sair { display: inline-block; color: #e5484d; font-weight: 600; font-size: .9rem; }
.conta-sair:hover { text-decoration: underline; }
.conta-form { display: flex; flex-direction: column; gap: 12px; }
.conta-form label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; font-weight: 600; color: var(--text); }
.conta-form input { padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; font-size: .95rem; }
.conta-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.conta-form .btn { margin-top: 6px; align-self: flex-start; }

/* ---------- Pedidos ---------- */
.orders { display: flex; flex-direction: column; gap: 10px; }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; transition: .15s ease; }
.order-row:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.order-row__info strong { display: block; }
.order-row__info span { font-size: .85rem; }
.order-row__right { display: flex; align-items: center; gap: 14px; }
.order-total { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.order-status { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.order-status--pendente { background: #fff4e0; color: #a86310; }
.order-status--enviado { background: #e9f7ee; color: #14773b; }
.order-status--erro { background: var(--primary-l); color: var(--primary-d); }
/* Badges de PAGAMENTO — o que o comprador procura na lista. */
.order-status--pago { background: #e9f7ee; color: #14773b; }
.order-status--aguardando { background: #fff4e0; color: #a86310; }
.order-status--recusado { background: #fdecec; color: #b3261e; }
.order-status--neutro { background: var(--surface-2); color: var(--muted); }

/* ---------- Paginação (lista de pedidos) ---------- */
.paginacao { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.paginacao__btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--card);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: .15s ease;
}
.paginacao__btn:hover { border-color: var(--primary); color: var(--primary-d); }
.paginacao__btn.is-mudo { opacity: .4; pointer-events: none; }
.paginacao__info { font-size: .85rem; color: var(--muted); }
.order-detail { overflow: hidden; background: var(--card); border: 1px solid var(--border); border-radius: var(--r); }
.order-table { width: 100%; border-collapse: collapse; }
.order-table th, .order-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.order-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.order-table .r { text-align: right; }
.order-table a:hover { color: var(--primary); }
.order-table tfoot td { border-bottom: 0; font-size: 1.05rem; padding-top: 14px; }

/* ---------- Toasts (vitrine) ---------- */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); transition: opacity .3s, transform .3s; }
.toast--erro { background: #e5484d; }
.toast--out { opacity: 0; transform: translateY(-8px); }

/* ============================================================
   MOBILE  (<= 860px): vira "app" com bottom nav flutuante
   ============================================================ */
@media (max-width: 860px) {
  .container { padding: 0 16px; }
  /* O topo respira mais que o resto da página: a logo tem folga só porque a
     imagem já vem com margem interna, e busca/botões encostavam nas bordas. */
  .appbar .container { padding: 0 20px; }
  .appbar__inner { padding: 12px 0 14px; gap: 14px; }
  .appbar__actions { margin-left: auto; gap: 10px; }  /* botões colados à direita */
  .appbar .search { order: 3; flex-basis: 100%; }
  .appbar__actions .desktop-only { display: none; }
  .hero { padding: 18px 0 2px; }
  .hero__title { font-size: 1.5rem; }
  .hero__sub { font-size: .95rem; }
  .acct { padding: 8px 14px; }
  .results-head h2 { font-size: 1.08rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .breadcrumb { padding: 14px 0 2px; }
  .pd { grid-template-columns: 1fr; gap: 20px; }
  .pd__title { font-size: 1.5rem; }
  .pd__emoji { font-size: 4.5rem; }
  .pd__price { font-size: 1.7rem; }
  .cart { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 56px 1fr auto; grid-template-areas: "media info del" "media qty sub"; gap: 8px 12px; }
  .cart-item__subtotal { text-align: right; }
  .cart-item__del { justify-self: end; }
  .cart__summary { position: static; }
  .conta { grid-template-columns: 1fr; }

  .bottom-nav {
    display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px;
    z-index: 40; width: calc(100% - 32px); max-width: 460px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-pill);
    box-shadow: var(--shadow-lg); padding: 8px; justify-content: space-around; align-items: center;
  }
  .nav-item {
    display: flex; align-items: center; gap: 6px; color: var(--muted);
    padding: 10px; border-radius: var(--r-pill); font-weight: 600; font-size: .9rem;
  }
  /* Só o RÓTULO some quando a aba não está ativa — o contador de favoritos e
     do carrinho existe para ser visto, em qualquer aba. */
  .nav-item > span:not(.badge-count) { display: none; }
  .nav-item.is-active { background: var(--primary); color: #fff; }
  .nav-item.is-active > span:not(.badge-count) { display: inline; }
  .nav-item .badge-count {
    min-width: 17px; height: 17px; padding: 0 5px; margin-left: -6px; align-self: flex-start;
    background: var(--primary); color: #fff; font-size: .66rem; font-weight: 700;
    border-radius: var(--r-pill); display: grid; place-items: center;
  }
  /* Na própria página do carrinho/favoritos o número está no conteúdo — repetir
     no rodapé só rouba a largura de que o rótulo precisa. */
  .nav-item.is-active .badge-count { display: none; }
  /* A folga da barra flutuante vai NO RODAPÉ, não no body: assim o fim da
     página continua sendo o rodapé, e não uma faixa branca atrás da barra. */
  .footer { margin-top: 32px; padding-bottom: 88px; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; padding-top: 30px; padding-bottom: 24px; }
}

/* Abaixo de 375px o rótulo da aba ativa não cabe junto com os outros quatro
   ícones — e o mais longo ("Categorias") é quem manda no limite. Nessas telas
   fica só a pílula azul, que já diz onde a pessoa está. */
@media (max-width: 374px) {
  .nav-item.is-active > span:not(.badge-count) { display: none; }
}

/* Telas bem pequenas: 1 produto por linha continua confortável a partir de 2 col */
@media (min-width: 861px) {
  .mobile-only { display: none !important; }
}

/* ============================================================================
   CHECKOUT EM ETAPAS
   Uma página só: identificação → entrega → pagamento, com o resumo sempre à
   vista. A etapa aberta mostra os campos; as concluídas viram uma linha de
   resumo com "Alterar"; as futuras ficam esmaecidas — assim a pessoa enxerga o
   caminho inteiro e sabe quanto falta.
   ========================================================================= */
.ck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 0 48px;
}
.ck__main { min-width: 0; }

/* ---- trilha de progresso ---- */
.ck-steps {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}
.ck-steps__item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
}
.ck-steps__n {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 800;
  transition: background .2s, color .2s;
}
.ck-steps__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-steps__item.is-atual { color: var(--text); }
.ck-steps__item.is-atual .ck-steps__n { background: var(--primary); color: #fff; }
.ck-steps__item.is-feito .ck-steps__n { background: var(--primary-l); color: var(--primary-d); }
/* No escuro, `--primary-l` já é azul-escuro: o número precisa de tinta clara. */
html[data-theme="dark"] .ck-steps__item.is-feito .ck-steps__n,
html[data-theme="dark"] .ck-card.is-feito .ck-card__n { color: var(--text); }

.ck-steps__bar {
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: 18px;
}
.ck-steps__bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--primary);
  transition: width .35s ease;
}

/* ---- cartão de etapa ---- */
.ck-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  overflow: hidden;
  transition: opacity .2s, border-color .2s;
}
.ck-card.is-aberto { border-color: var(--border-hover); box-shadow: var(--shadow); }
.ck-card.is-bloqueado { opacity: .55; }
.ck-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
}
.ck-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}
.ck-card__n {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.ck-card.is-aberto .ck-card__n { background: var(--primary); color: #fff; }
.ck-card.is-feito .ck-card__n { background: var(--primary-l); color: var(--primary-d); }
.ck-card__edit {
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--r-sm);
}
.ck-card__edit:hover { background: var(--primary-soft); }
.ck-card__body,
.ck-card__foot { display: none; }
.ck-card.is-aberto .ck-card__body { display: block; padding: 0 20px 4px; }
.ck-card.is-aberto .ck-card__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px 20px;
}
.ck-card__resumo {
  margin: 0;
  padding: 0 20px 16px 54px;
  color: var(--muted);
  font-size: .9rem;
}

/* ---- formulários ---- */
.ck-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ck-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ck-field--full { grid-column: 1 / -1; }
.ck-field--uf { max-width: 110px; }
.ck-field > span { font-size: .85rem; font-weight: 600; color: var(--text); }
.ck-field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.ck-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-l);
}
.ck-field input:user-invalid { border-color: #e5484d; }
.ck-field small { color: var(--muted); font-size: .78rem; }

.ck__hint { color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.ck__hint a { color: var(--primary); font-weight: 600; }
.ck__voltar {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: none;
}
.ck__voltar:hover { color: var(--text); text-decoration: underline; }
/* ---- pagamento ---- */
.ck-pay {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
/* Os métodos são irmãos dentro do form: o grid dá o respiro entre eles e o
   formulário do cartão — mais robusto que seletor de adjacência. */
#form-pagamento { display: grid; gap: 12px; }

/* Formulário do cartão (abre quando o método é escolhido) */
.ck-cartao {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
}
/* O select no MESMO desenho dos inputs do checkout — o nativo destoava. */
.ck-cartao select,
.ck-field select {
  width: 100%;
  padding: 11px 40px 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background-color: var(--bg);
  color: var(--text);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237b8190' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.ck-cartao select:focus,
.ck-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-l);
}
#cc-bandeira { color: var(--primary-d); font-weight: 700; min-height: 1em; }
html[data-theme="dark"] #cc-bandeira { color: var(--text); }

/* ---- Modal do pagamento (processando / aprovado / recusado) ---- */
/* O display: grid abaixo venceria o [hidden] do navegador e deixaria o modal
   aberto desde o carregamento — esta regra devolve a palavra ao atributo. */
.ck-modal[hidden] { display: none; }
.ck-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 14, 22, .55);
  backdrop-filter: blur(3px);
}
.ck-modal__caixa {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  text-align: center;
}
.ck-modal__caixa h3 { margin: 14px 0 6px; font-size: 1.1rem; }
.ck-modal__caixa p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.ck-modal__icone {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: var(--r-pill);
  background: var(--primary-l);
  font-size: 1.6rem;
  font-weight: 800;
}
.ck-modal__icone.is-ok { background: #e9f7ee; color: #14773b; }
.ck-modal__icone.is-erro { background: #fdecec; color: #b3261e; }
.ck-modal__spinner {
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  border: 3px solid var(--primary-l);
  border-top-color: var(--primary);
  animation: ck-girar .8s linear infinite;
}
@keyframes ck-girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ck-modal__spinner { animation-duration: 2s; }
}
.ck-modal__acoes { margin-top: 18px; }
.ck-pay:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.ck-pay input { margin-top: 3px; accent-color: var(--primary); }
.ck-pay__ico { font-size: 1.3rem; line-height: 1; display: flex; align-items: center; }
.ck-pay__ico img { display: block; }
.ck-pay__ico--duplo { gap: 4px; }
/* Faixa de bandeiras aceitas dentro da opção do cartão. */
.ck-pay__bandeiras { display: flex; gap: 6px; margin-top: 8px; }
.ck-pay__bandeiras img {
  height: 20px;
  width: auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--border);
}
/* A bandeira detectada mora DENTRO do campo do número — o wrapper centraliza
   o ícone em qualquer altura de input, sem número mágico de pixels. */
.ck-input-wrap { position: relative; display: block; }
.ck-input-wrap input { padding-right: 56px; }
.cc-bandeira-img {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  width: auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--border);
  background: #fff;
}
/* Selo de segurança sob o botão de finalizar. */
.ck-seguro {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}
.ck-seguro svg { flex-shrink: 0; opacity: .7; }
/* Bandeira do cartão no texto da confirmação do pedido. */
.pix__bandeira {
  display: inline-block;
  vertical-align: -5px;
  height: 20px;
  width: auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--border);
  margin-right: 2px;
}
.ck-pay__txt { display: flex; flex-direction: column; gap: 3px; }
.ck-pay__txt strong { color: var(--text); }
.ck-pay__txt small { color: var(--muted); font-size: .84rem; }

/* ---- frete: como receber (cotado depois que o endereço salva) ---- */
.ck-frete { margin-top: 20px; }
.ck-frete__titulo { margin: 0 0 10px; font-size: .98rem; color: var(--text); }
.ck-frete__aviso {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(245, 158, 11, .14);
  color: var(--text);
  font-size: .87rem;
}
.ck-frete__opcoes { display: flex; flex-direction: column; gap: 10px; }
.ck-frete__opcao { align-items: center; }
.ck-frete__preco { margin-left: auto; font-weight: 700; color: var(--text); white-space: nowrap; }

/* ---- pedido: card de entrega/retirada com linha do tempo e mapa ---- */
.entrega-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 18px;
}
.entrega-card__head h3 { margin: 0 0 4px; font-size: 1.05rem; }
.entrega-card__head p { margin: 0; }
.entrega-card__quando { margin: 10px 0 0; font-size: .84rem; }
.entrega-passos {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.entrega-passos li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  position: relative;
  color: var(--muted);
  font-size: .84rem;
}
.entrega-passos li::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.entrega-passos li:first-child::before { display: none; }
.entrega-passos li.is-feito::before,
.entrega-passos li.is-atual::before { background: var(--primary); }
.entrega-passos__ponto {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f2f4f8);
  border: 2px solid var(--border);
  font-size: .8rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.entrega-passos li.is-feito .entrega-passos__ponto,
.entrega-passos li.is-atual .entrega-passos__ponto {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.entrega-passos li.is-atual { color: var(--text); font-weight: 600; }
.entrega-mapa { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.entrega-mapa img {
  width: 100%;
  max-width: 640px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  display: block;
}
.entrega-mapa .btn { align-self: flex-start; }

/* ---- resumo do pedido ---- */
.ck__aside { position: sticky; top: 88px; }
.ck-resumo {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.ck-resumo__toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ck-resumo__corpo { padding: 16px; }
.ck-resumo__itens { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.ck-resumo__itens li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  font-size: .9rem;
}
.ck-resumo__qtd { color: var(--muted); font-variant-numeric: tabular-nums; }
.ck-resumo__nome { color: var(--text); }
.ck-resumo__val { font-weight: 600; font-variant-numeric: tabular-nums; }
.ck-resumo__linha {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ck-resumo__linha--total { font-size: 1.05rem; }
.ck-resumo__linha--total strong { font-size: 1.15rem; }
.ck-resumo__nota { margin: 10px 0 0; color: var(--muted); font-size: .84rem; }
.ck-resumo__editar {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
  font-size: .88rem;
  font-weight: 600;
}
.ck__selo { margin: 12px 2px 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }

/* ---- celular: uma coluna, resumo no topo e recolhido ---- */
@media (max-width: 860px) {
  .ck { grid-template-columns: 1fr; padding-top: 4px; }
  .ck__aside { position: static; order: -1; }
  .ck-resumo__toggle { display: flex; }
  .ck-resumo__corpo { display: none; }
  .ck-resumo__corpo.is-aberto { display: block; }
  /* Sem espaço para os três rótulos: fica só o da etapa atual + a barra. */
  .ck-steps__t { display: none; }
  .ck-steps__item.is-atual .ck-steps__t { display: block; }
  .ck-form { grid-template-columns: 1fr; }
  .ck-field--uf { max-width: none; }
  .ck-card.is-aberto .ck-card__foot .btn { width: 100%; }
}

/* ============================================================================
   PAGAMENTO PIX (tela do pedido)
   É o último passo da compra: quanto, até quando e como pagar, sem a pessoa
   precisar procurar. Mesma linguagem do checkout.
   ========================================================================= */
.pix {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  overflow: hidden;
}
.pix__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px;
}
.pix__titulo { display: flex; align-items: center; gap: 14px; }
.pix__titulo h3 { margin: 0; font-size: 1.08rem; }
.pix__ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--primary-l);
  font-size: 1.35rem;
}
.pix__valor {
  margin: 2px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
/* O display: flex venceria o [hidden] — sem prazo, a caixa fica mesmo escondida. */
.pix__prazo[hidden] { display: none; }
.pix__prazo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: .78rem;
}
.pix__prazo strong {
  font-size: 1.3rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.pix__prazo.is-urgente { background: #fdecec; color: #b3261e; }
.pix__prazo.is-urgente strong { color: #b3261e; }

.pix__barra { height: 3px; background: var(--surface-2); }
.pix__barra > span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--primary);
  transition: width 1s linear;
}

.pix__corpo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  border-top: 1px solid var(--border);
}
.pix__qr { margin: 0; text-align: center; }
.pix__qr img {
  width: 220px;
  height: 220px;
  display: block;
  padding: 10px;
  border-radius: var(--r-sm);
  /* O QR precisa de fundo branco mesmo no tema escuro: leitor de banco não lê
     código invertido. */
  background: #fff;
  border: 1px solid var(--border);
}
.pix__qr figcaption { margin-top: 8px; color: var(--muted); font-size: .8rem; }

.pix__lado { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pix__passos { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.pix__passos li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: .93rem;
}
.pix__passos span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--primary-l);
  color: var(--primary-d);
  font-size: .78rem;
  font-weight: 800;
}
html[data-theme="dark"] .pix__passos span { color: var(--text); }

.pix__ou {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: .8rem;
}
.pix__ou::before, .pix__ou::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.pix__codigo { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.pix__codigo code {
  flex: 1 1 240px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .78rem;
  line-height: 1.5;
  word-break: break-all;
  /* O código é longo: mostramos duas linhas e o resto rola, para o botão não
     ser empurrado para fora da tela. */
  max-height: 66px;
  overflow-y: auto;
}
.pix__codigo .btn { flex: none; }
.pix__codigo .btn.is-copiado { background: #14773b; }

.pix__status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: .88rem;
}
.pix__pulso {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--primary);
  animation: pix-pulso 1.6s ease-in-out infinite;
}
@keyframes pix-pulso {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.75); }
}
@media (prefers-reduced-motion: reduce) {
  .pix__pulso { animation: none; }
}

/* Estados finais — pago e expirado dividem o mesmo formato. */
.pix--pago, .pix--expirado {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
}
.pix--pago h3, .pix--expirado h3 { margin: 0 0 4px; font-size: 1.05rem; }
.pix--pago p, .pix--expirado p { margin: 0; color: var(--muted); font-size: .92rem; }
.pix__selo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-pill);
  font-size: 1.2rem;
  font-weight: 800;
}
.pix--pago { border-color: #bfe6cd; }
.pix--pago .pix__selo { background: #e9f7ee; color: #14773b; }
.pix--expirado .pix__selo { background: var(--surface-2); color: var(--muted); }

@media (max-width: 720px) {
  .pix__corpo { grid-template-columns: 1fr; gap: 18px; }
  .pix__qr img { margin: 0 auto; width: min(220px, 70vw); height: auto; }
  .pix__head { align-items: flex-start; }
  .pix__prazo { align-items: flex-start; }
  .pix__codigo .btn { width: 100%; }
}
