  :root {
    /* Paleta oficial extraída do cardápio Mil Sonhos */
    --bg:            #ffffff;                    /* branco puro do cardápio */
    --bg-alt:        oklch(0.975 0.006 15);      /* creme rosado bem sutil */
    --bg-warm:       oklch(0.95 0.014 15);       /* rosa nude mais visível para seções */
    --bg-deep:       #3B2729;                    /* burgundy escuro (títulos do cardápio) */
    --primary:       #A0787A;                    /* rosa amadeirado da logo */
    --primary-dark:  #7f5c5e;                    /* hover/press */
    --primary-soft:  oklch(0.82 0.03 15);
    --accent:        oklch(0.72 0.05 15);        /* rosa mauve suave */
    --gold:          #A38A63;                    /* estrelinhas do cardápio */
    /* Fundo do "ambiente". Na loja é branco; quando o lojista aprovado entra,
       vira dourado claro para a pessoa perceber na hora que trocou de ambiente.
       Só as SEÇÕES DE PÁGINA usam --bg-page: cartões, modais e barra de
       navegação continuam em --bg (branco) para não perder contraste. */
    --bg-page:       #ffffff;
    --bg-revenda:    #F8EFD8;
    --text:          #3B2729;                    /* burgundy — headings */
    --text-soft:     #4a3b3c;
    --text-body:     #524040;                    /* corpo de texto */
    --text-muted:    #A69595;                    /* subtitle cinza-mauve */
    --line:          oklch(0.9 0.008 15);
    --line-soft:     oklch(0.95 0.006 15);
    --white:         #ffffff;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html, body {
    background: var(--bg-page);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* Ambiente lojista: fundo dourado claro em toda a página.
     A classe é posta em <html> pelo CartProvider, e só quando o servidor
     confirmou um parceiro APROVADO — nunca por preferência salva no navegador. */
  html.ambiente-revenda { --bg-page: var(--bg-revenda); }
  html.ambiente-revenda, html.ambiente-revenda body { background: var(--bg-revenda); }

  h1, h2, h3, h4, .serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.1;
    color: var(--text);
  }

  /* Utilitário para ecos da logo — texto todo caixa alta, espaçado */
  .wordmark {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  /* Serif "de vitrine" (nomes de produto) */
  .serif-italic {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 400;
  }

  .script {
    font-family: 'Petit Formal Script', cursive;
    font-weight: 400;
  }

  .mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
  }

  button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
  input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
  a { color: inherit; text-decoration: none; }

  /* ————————————— placeholder imagens ————————————— */
  .ph {
    background:
      linear-gradient(135deg, transparent 48%, oklch(0.88 0.02 30) 49%, oklch(0.88 0.02 30) 51%, transparent 52%),
      linear-gradient(45deg, transparent 48%, oklch(0.88 0.02 30) 49%, oklch(0.88 0.02 30) 51%, transparent 52%),
      var(--bg-alt);
    background-size: 22px 22px, 22px 22px, 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
  }
  .ph::before {
    content: '';
    position: absolute; inset: 8px;
    border: 1px dashed oklch(0.78 0.02 30);
    border-radius: inherit;
    pointer-events: none;
  }
  .ph span { position: relative; z-index: 1; background: var(--bg); padding: 4px 10px; border-radius: 999px; }

  /* ————————————— scrollbar sutil ————————————— */
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: oklch(0.85 0.02 30); border-radius: 10px; border: 2px solid var(--bg); }
  ::-webkit-scrollbar-thumb:hover { background: var(--primary-soft); }

  /* ————————————— utilitários ————————————— */
  .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: all .2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
  }
  .btn-primary {
    background: var(--primary);
    color: var(--white);
  }
  .btn-primary:hover { background: var(--text); }
  .btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--text);
  }
  .btn-outline:hover { background: var(--text); color: var(--white); }
  .btn-ghost { color: var(--text); }
  .btn-ghost:hover { color: var(--primary); }

  .divider-ornament {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    color: var(--gold);
    margin: 8px 0;
  }
  .divider-ornament::before, .divider-ornament::after {
    content: ''; height: 1px; background: currentColor; flex: 1; max-width: 60px; opacity: 0.5;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 500;
  }

  /* app root */
  #root { min-height: 100vh; }
  html, body { overflow-x: hidden; }
  img { max-width: 100%; }
  :root { --header-h: 100px; }

  /* ————————————— RESPONSIVO ————————————— */
  /* Tablet: ≤ 1080px */
  @media (max-width: 1080px) {
    :root { --header-h: 61px; }
    .r-stack { grid-template-columns: 1fr !important; gap: 40px !important; }
    .r-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .resumo-aside { position: static !important; }
    .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 40px !important; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
    .hero-grid { gap: 48px !important; }
    .hero-fotos { height: 520px !important; max-width: 640px; width: 100%; margin: 0 auto; }
    .publico-card { grid-template-columns: 1fr 1.1fr !important; gap: 0 !important; }
  }

  /* Celular: ≤ 720px */
  @media (max-width: 720px) {
    html, body { font-size: 15px; }
    .container { padding: 0 20px !important; }
    .cardapio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
    .cardapio-grid h3 { font-size: 17px !important; }
    .cardapio-grid p { font-size: 12.5px !important; }
    .sec { padding-top: 60px !important; padding-bottom: 64px !important; }

    .r-stack-sm { grid-template-columns: 1fr !important; }
    .r-1-sm { grid-template-columns: 1fr !important; }
    .r-2 { gap: 16px !important; }
    .r-stack { gap: 32px !important; }

    /* hero */
    .hero-fotos { height: 380px !important; }
    .hero-fotos > div:first-child { right: 0 !important; width: 86% !important; height: 300px !important; }
    .hero-fotos > div:nth-child(2) { width: 52% !important; height: 170px !important; bottom: 0 !important; }
    .hero-selo { left: 0 !important; top: 16px !important; padding: 10px 14px !important; font-size: 11px !important; }

    /* cartões "para você / revenda" */
    .publico-card { grid-template-columns: 1fr !important; }
    .publico-card > div:first-child { aspect-ratio: 16/10; }
    .publico-body { padding: 28px 22px !important; }

    /* benefícios */
    .beneficios { gap: 20px 12px !important; }
    .beneficios > div { justify-content: flex-start !important; gap: 10px !important; }

    /* cards de produto em 2 colunas */
    .produto-nome { font-size: 16px !important; }

    /* essência */
    .essencia-mini { width: 120px !important; height: 120px !important; right: -6px !important; bottom: -20px !important; border-width: 5px !important; }

    /* parceiro */
    .parceiro-fotos { height: 340px !important; }
    .parceiro-fotos > div:first-child { inset: 0 0 60px 40px !important; }
    .parceiro-fotos > div:nth-child(2) { height: 150px !important; }
    .passos { border-top: none !important; }
    .passo { padding: 24px 0 !important; border-left: none !important; border-top: 1px solid var(--line); }
    .tabela-row { grid-template-columns: 1fr 76px 76px 36px !important; padding-left: 14px !important; padding-right: 14px !important; font-size: 12.5px !important; gap: 6px; }
    .tabela-row img { width: 34px !important; height: 34px !important; }
    .tabela-row .serif-italic { font-size: 14px !important; }
    .abas-parceiro { width: 100%; }
    .abas-parceiro button { flex: 1; padding: 12px 8px !important; font-size: 10.5px !important; }

    /* encomenda */
    .steps-bar { overflow-x: auto; scrollbar-width: none; margin-left: -20px; margin-right: -20px; padding: 0 12px; }
    .steps-bar::-webkit-scrollbar { display: none; }
    .steps-bar button { flex: 0 0 auto !important; min-width: 84px; padding: 12px 10px !important; }

    /* checkout */
    .horarios { grid-template-columns: repeat(3, 1fr) !important; }
    .m-col { flex-direction: column-reverse; }
    .m-full { width: 100%; min-width: 0 !important; }

    /* cardápio: filtros roláveis na horizontal */
    .filtros-cats { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; width: calc(100% + 40px); }
    .filtros-cats::-webkit-scrollbar { display: none; }
    .filtros-cats button { flex: 0 0 auto; padding: 10px 14px !important; font-size: 11px !important; }
    .busca { width: 100%; min-width: 0 !important; }

    /* modal de produto vira folha inferior */
    .modal-wrap { padding: 0 !important; align-items: flex-end !important; }
    .modal-box { grid-template-columns: 1fr !important; max-height: 92vh !important; overflow-y: auto !important; border-radius: 12px 12px 0 0 !important; }
    .modal-img { aspect-ratio: 4/3; }
    .modal-body { padding: 24px 20px 28px !important; overflow: visible !important; }

    /* rodapé */
    .footer-grid { grid-template-columns: 1fr !important; gap: 34px !important; margin-bottom: 40px !important; }

    .btn { padding: 14px 20px; }
  }

  @media (max-width: 380px) {
    .r-2.beneficios { grid-template-columns: 1fr !important; }
  }

/* ==========================================================================
   Cardápio de pedido (mesa por QR code e link do WhatsApp)
   --------------------------------------------------------------------------
   Layout inspirado nos cardápios digitais de salão: card da loja no topo,
   busca, navegação por categorias e itens em lista com a foto à direita.
   O objetivo é o cliente montar o pedido sozinho, sem ler instrução.
   ========================================================================== */

.ped-wrap {
  --ped-radius: 14px;
  min-height: 100vh;
  background: var(--bg-alt);
  padding-bottom: 104px;
  font-family: 'Inter', system-ui, sans-serif;
}

/* — Cabeçalho da loja — */
.ped-head {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.ped-head-inner {
  max-width: 760px; margin: 0 auto;
  padding: 14px 16px 0;
}
.ped-store {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.ped-store-logo {
  width: 46px; height: 46px; border-radius: 12px; object-fit: contain;
  background: var(--bg-warm); padding: 6px; flex: 0 0 auto;
}
.ped-store-txt { min-width: 0; flex: 1; }
.ped-store-name {
  font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 500;
  color: var(--text); line-height: 1.2; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ped-store-meta {
  font-size: 11.5px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.ped-open { color: #2E7D5B; font-weight: 500; }
.ped-open::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: #2E7D5B; margin-right: 5px; vertical-align: middle;
}
.ped-mesa-tag {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 999px;
  background: var(--bg-deep); color: var(--white);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
}

/* — Busca — */
.ped-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--ped-radius); padding: 11px 14px; margin-bottom: 10px;
}
.ped-search input {
  flex: 1; border: 0; background: transparent; font-size: 14px;
  color: var(--text); outline: none; font-family: inherit;
}
.ped-search input::placeholder { color: var(--text-muted); }

/* — Categorias (rolagem horizontal, âncora para a seção) — */
.ped-cats {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 11px;
}
.ped-cats::-webkit-scrollbar { display: none; }
.ped-cat {
  flex: 0 0 auto; padding: 8px 15px; border-radius: 999px;
  font-size: 12.5px; font-family: inherit; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--text-soft);
  transition: all .15s;
}
.ped-cat[data-ativo='1'] {
  background: var(--bg-deep); border-color: var(--bg-deep); color: var(--white);
}

/* — Corpo — */
.ped-body { max-width: 760px; margin: 0 auto; padding: 6px 16px 0; }

.ped-sec { padding-top: 22px; }
.ped-sec-title {
  font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 500;
  color: var(--text); margin-bottom: 3px; scroll-margin-top: 148px;
}
.ped-sec-desc {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px;
}

/* — Item: texto à esquerda, foto à direita — */
.ped-item {
  display: flex; align-items: stretch; gap: 12px;
  background: var(--bg); border-radius: var(--ped-radius);
  padding: 12px; margin-bottom: 9px;
  border: 1px solid var(--line-soft);
  transition: border-color .15s;
}
.ped-item:hover { border-color: var(--line); }
.ped-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ped-item-name {
  font-size: 14.5px; font-weight: 600; color: var(--text);
  line-height: 1.3; margin-bottom: 3px;
}
.ped-item-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.45;
  margin-bottom: 7px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ped-item-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.ped-item-price {
  font-size: 14px; font-weight: 600; color: var(--primary);
}
.ped-item-serve { font-size: 11px; color: var(--text-muted); }
.ped-item-img {
  flex: 0 0 92px; width: 92px; height: 92px; border-radius: 10px;
  overflow: hidden; background: var(--bg-warm); position: relative;
}
.ped-item-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.ped-item-off {
  position: absolute; inset: 0; background: oklch(0.2 0.02 25 / 0.55);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; text-align: center; padding: 6px;
}

/* — Botão adicionar / controle de quantidade — */
.ped-add {
  width: 30px; height: 30px; border-radius: 999px; flex: 0 0 auto;
  background: var(--bg-deep); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 0; transition: transform .12s;
}
.ped-add:active { transform: scale(0.92); }
.ped-qty {
  display: flex; align-items: center; gap: 2px; flex: 0 0 auto;
  border: 1px solid var(--primary); border-radius: 999px; overflow: hidden;
}
.ped-qty button {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; color: var(--primary);
}
.ped-qty span {
  min-width: 20px; text-align: center; font-size: 13px; font-weight: 600;
  color: var(--primary);
}

/* — Barra fixa da sacola — */
.ped-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 26px oklch(0.2 0.02 25 / 0.09);
}
.ped-bar-inner {
  max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
}
.ped-bar-btn {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px; border-radius: var(--ped-radius);
  background: var(--bg-deep); color: var(--white); border: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500;
}
.ped-bar-count {
  font-size: 11.5px; opacity: 0.75; display: block; text-align: left;
  letter-spacing: 0.04em;
}

/* — Folha (sacola / dados) — */
.ped-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: oklch(0.2 0.02 25 / 0.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.ped-sheet {
  background: var(--bg); width: 100%; max-width: 620px;
  max-height: 92vh; display: flex; flex-direction: column;
  border-radius: 18px 18px 0 0;
}
.ped-sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--line);
}
.ped-sheet-title {
  font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 500;
  color: var(--text);
}
.ped-sheet-body {
  overflow-y: auto; padding: 16px 20px 4px; flex: 1;
}
.ped-sheet-foot {
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
}

.ped-line {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.ped-line-txt { flex: 1; min-width: 0; }
.ped-line-name { font-size: 13.5px; font-weight: 500; color: var(--text); line-height: 1.35; }
.ped-line-price { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.ped-line-total { font-size: 13.5px; font-weight: 600; color: var(--primary); white-space: nowrap; }

.ped-field { margin-bottom: 14px; }
.ped-label {
  display: block; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-soft); margin-bottom: 6px;
}
.ped-input, .ped-textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); font-size: 14px;
  font-family: inherit; color: var(--text); outline: none;
}
.ped-input:focus, .ped-textarea:focus { border-color: var(--primary); }
.ped-textarea { resize: vertical; }

.ped-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ped-opt {
  padding: 13px 14px; border-radius: 10px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); font-family: inherit;
  transition: all .15s;
}
.ped-opt[data-ativo='1'] {
  border-color: var(--primary); background: oklch(0.97 0.02 25);
}
.ped-opt-title { font-size: 13.5px; font-weight: 500; color: var(--text); }
.ped-opt-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.ped-sum {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--text-soft); margin-bottom: 6px;
}
.ped-sum-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 11px; margin-top: 5px; border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); margin-bottom: 14px;
}
.ped-sum-total b {
  font-family: 'Fraunces', Georgia, serif; font-size: 22px;
  color: var(--primary); letter-spacing: 0; text-transform: none;
}

.ped-alert {
  font-size: 12px; line-height: 1.5; padding: 10px 12px;
  border-radius: 9px; margin-bottom: 13px;
  background: #FEF3C7; border: 1px solid #F0C36D; color: #7A4F00;
}
.ped-alert-erro {
  background: oklch(0.97 0.02 40); border-color: #E3B3A6; color: #8C3D2C;
}

/* — Confirmação — */
.ped-done {
  max-width: 520px; margin: 0 auto; padding: 56px 20px; text-align: center;
}
.ped-done-ico {
  width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 999px;
  background: #2E7D5B; color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.ped-done h1 {
  font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 500;
  color: var(--text); margin-bottom: 10px;
}
.ped-done p { font-size: 14px; color: var(--text-soft); line-height: 1.65; }
.ped-done-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--ped-radius);
  padding: 18px; margin: 22px 0; text-align: left;
}

@media (max-width: 420px) {
  .ped-item-img { flex-basis: 76px; width: 76px; height: 76px; }
  .ped-store-name { font-size: 15.5px; }
  .ped-opts { grid-template-columns: 1fr; }
}

/* Pulso do indicador "aguardando pagamento" na confirmação do pedido.
   Fica no CSS e não inline porque `animation` referencia um keyframe global:
   sem ele o navegador ignora a animação e o ponto fica estático — parece
   travado justamente quando a pessoa está esperando o Pix cair. */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.8); }
}
