/* ============================================================
   OtimizaPedido — Storefront moderno (mobile-first)
   Scoped em .body-estabelecimento. Cor da marca = var(--brand)
   (injetada por css/style.php). Vale para TODOS os modelos:
   exibicao 1 (grade .produto) / 2 (lista .novoproduto),
   tela_produto 1/2/3, mostra_valor 1/2.
   ============================================================ */

.body-estabelecimento {
  /* superfícies (neutros quentes, nunca preto/branco puros) */
  --sf-bg:        #f4f5f7;
  --sf-surface:   #ffffff;
  --sf-ink:       #1f2630;   /* títulos */
  --sf-ink-soft:  #5b636e;   /* texto secundário */
  --sf-line:      #e7e9ee;   /* bordas/divisores */
  --sf-shadow:    0 6px 20px rgba(22, 28, 38, .08);
  --sf-shadow-lg: 0 14px 34px rgba(22, 28, 38, .12);
  --sf-radius:    18px;
  /* tints da marca (color-mix funciona no Chrome alvo) */
  --sf-brand-soft: color-mix(in srgb, var(--brand) 12%, #fff);
  --sf-brand-ring: color-mix(in srgb, var(--brand) 38%, transparent);
  --sf-brand-tint: color-mix(in srgb, var(--brand) 8%, #fff);
  -webkit-tap-highlight-color: transparent;
}

.body-estabelecimento .app-infos,
.body-estabelecimento .middle.corfundo_loja {
  background: var(--sf-bg) !important;
}

/* ------------------------------------------------------------
   1. HERO / CABEÇALHO DA LOJA (mobile)
   ------------------------------------------------------------ */

/* faixa de capa com overlay para o status pill respirar */
.body-estabelecimento .box-delivery .cover-delivery {
  position: relative;
  min-height: 150px;
  background-size: cover !important;
  background-position: center !important;
  border-radius: 0 0 26px 26px;
}
.body-estabelecimento .box-delivery .cover-delivery::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,18,24,0) 35%, rgba(15,18,24,.55) 100%);
  border-radius: inherit;
  pointer-events: none;
}
.body-estabelecimento .cover-delivery .infos { z-index: 2; }

/* status pill (Aberto/Fechado) — pílula limpa */
.body-estabelecimento .status-loja {
  border-radius: 999px !important;
  padding: 0 18px !important;
  height: 34px !important;
  font-weight: 600 !important;
  letter-spacing: .2px;
  box-shadow: 0 6px 16px rgba(0,0,0,.22) !important;
  backdrop-filter: saturate(1.2);
}
.body-estabelecimento .status-aberto { background: #1faa53 !important; }
.body-estabelecimento .status-fechado { background: #e04f4f !important; }

/* "Fazemos entrega" sobre a capa → chip de vidro */
.body-estabelecimento .cover-delivery .horario-entrega .tempo {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.92);
  color: var(--sf-ink) !important;
  padding: 7px 14px; border-radius: 999px;
  font-weight: 600; font-size: 12.5px; line-height: 1.1;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.body-estabelecimento .cover-delivery .horario-entrega .tempo i { color: var(--brand) !important; }
.body-estabelecimento .cover-delivery .horario-entrega .tempo br { display: none; }
.body-estabelecimento .cover-delivery .horario-entrega .tempo span {
  display: inline !important; margin-left: 4px;
}

/* logo flutuante sobre a capa */
.body-estabelecimento .avatar.celular .holder.celular {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(22,28,38,.22);
  border: 3px solid #fff;
  background: #fff;
}

/* nome + descrição da loja */
.body-estabelecimento .app-infos .title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700 !important;
  font-size: 21px !important;
  color: var(--sf-ink) !important;
  line-height: 1.25 !important;
  letter-spacing: -.2px;
}
.body-estabelecimento .app-infos .description {
  color: var(--sf-ink-soft) !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  max-width: 34rem; margin: 4px auto 0; display: block;
}

/* ------------------------------------------------------------
   2. INSTALAR APP — controle único e intencional
   (Android = primário; iOS = secundário). #installButton +
   #showInstructionsButton vêm lado a lado no index.php.
   ------------------------------------------------------------ */
.body-estabelecimento #installButton,
.body-estabelecimento #showInstructionsButton {
  display: inline-flex !important; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px !important;
  border: 0 !important; border-radius: 999px !important;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.body-estabelecimento #installButton {
  background: var(--brand) !important; color: #fff !important;
  box-shadow: 0 8px 20px var(--sf-brand-ring);
}
.body-estabelecimento #installButton i { color: #fff !important; }
.body-estabelecimento #showInstructionsButton {
  background: #fff !important; color: var(--sf-ink) !important;
  border: 1px solid var(--sf-line) !important;
}
.body-estabelecimento #installButton:active,
.body-estabelecimento #showInstructionsButton:active { transform: scale(.97); }

/* ------------------------------------------------------------
   3. CHIPS DE CATEGORIA (carrossel horizontal)
   ------------------------------------------------------------ */
.body-estabelecimento .tv-infinite-menu { gap: 4px; padding: 4px 2px 8px; }
.body-estabelecimento .tv-infinite-menu a {
  border: 0 !important;
  padding: 6px 4px !important;
}
.body-estabelecimento .categoria-wrapper {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 78px;
}
.body-estabelecimento .categoria-img {
  display: grid; place-items: center;
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--sf-surface);
  box-shadow: var(--sf-shadow);
  border: 2px solid transparent;
  transition: border-color .15s ease, transform .15s ease;
}
.body-estabelecimento .categoria-img img {
  width: 56px !important; height: 56px !important;
  object-fit: cover; border-radius: 50% !important;
}
.body-estabelecimento .categoria-nome {
  font-size: 11.5px !important; font-weight: 600 !important;
  color: var(--sf-ink-soft) !important; text-align: center;
  line-height: 1.2; width: 78px;
  white-space: normal !important; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 28px;
}
/* fundo sutil no tile (suaviza ícone-padrão branco quando loja não subiu ícone) */
.body-estabelecimento .categoria-img { background: var(--sf-brand-tint); }
/* estado ativo / hover */
.body-estabelecimento .tv-infinite-menu a.active .categoria-img,
.body-estabelecimento .tv-infinite-menu a:hover .categoria-img {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.body-estabelecimento .tv-infinite-menu a.active .categoria-nome {
  color: var(--brand) !important;
}
/* esconde o quadrado de fundo legado */
.body-estabelecimento .categoria-fundo { display: none !important; }
/* setas discretas */
.body-estabelecimento .tv-infinite-container .arrow-left,
.body-estabelecimento .tv-infinite-container .arrow-right {
  color: var(--sf-ink-soft);
}

/* ------------------------------------------------------------
   4. CARROSSEL DE DESTAQUES (featured / ofertas)
   ------------------------------------------------------------ */
.body-estabelecimento .featured-carousel .work .img {
  border-radius: 16px !important;
  overflow: hidden;
  min-height: 150px;
  box-shadow: var(--sf-shadow);
}
.body-estabelecimento .featured-carousel .work .text { padding: 12px 14px; }
.body-estabelecimento .featured-carousel .work .text .cat {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  font-weight: 700; font-size: 13px;
  padding: 3px 12px; border-radius: 999px;
  margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.body-estabelecimento .featured-carousel .work .text h3 {
  color: #fff !important; font-weight: 600; font-size: 15px;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

/* ------------------------------------------------------------
   5. TÍTULOS DE SEÇÃO + "Ver tudo"
   ------------------------------------------------------------ */
.body-estabelecimento .categoria > .row .title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700 !important;
  font-size: 18px !important;
  color: var(--sf-ink) !important;
  letter-spacing: -.2px;
}
.body-estabelecimento .categoria .vertudo {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 600 !important; font-size: 13px !important;
  color: var(--brand) !important;
  background: var(--sf-brand-tint);
  padding: 6px 12px; border-radius: 999px;
}
.body-estabelecimento .categoria .vertudo i { color: var(--brand) !important; }

/* ------------------------------------------------------------
   6. CARD DE PRODUTO — GRADE (exibicao 1, .produto)
   ------------------------------------------------------------ */
.body-estabelecimento .grid_produtos { gap: 14px !important; }
.body-estabelecimento .grid_produtos .produto {
  margin: 0 !important;
  background: var(--sf-surface) !important;
  border: 1px solid var(--sf-line) !important;
  border-radius: var(--sf-radius) !important;
  box-shadow: var(--sf-shadow) !important;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease !important;
}
.body-estabelecimento .grid_produtos .produto:hover {
  transform: translateY(-3px);
  box-shadow: var(--sf-shadow-lg) !important;
}
.body-estabelecimento .grid_produtos .produto .capa {
  aspect-ratio: 1 / 1;
  background-size: cover !important;
  border-radius: 0 !important;
}
/* badge de oferta como pílula */
.body-estabelecimento .tag-preco-oferta {
  background: var(--brand) !important;
  color: #fff !important;
  font-weight: 700 !important; font-size: 12px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  position: absolute; top: 10px; left: 10px;
}
/* nome do produto */
.body-estabelecimento .grid_produtos .produto .nome { display: none; }
/* preço (verde legado → marca, peso forte) */
.body-estabelecimento .grid_produtos .produto .valor {
  color: var(--sf-ink) !important;
  font-weight: 700 !important; font-size: 16px !important;
}
.body-estabelecimento .grid_produtos .produto .valor_anterior {
  color: #98a0ab !important; font-size: 12px !important;
  text-decoration: line-through;
}
.body-estabelecimento .grid_produtos .produto .apenas {
  color: var(--sf-ink-soft) !important; font-size: 11px !important;
  display: block; margin: 2px 0 0 !important; line-height: 1.2;
}
.body-estabelecimento .grid_produtos .produto .valor { line-height: 1.25; display: inline-block; }

/* botão Pedir (renderizado via index.php: .sf-pedir) */
.body-estabelecimento .sf-pedir {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; height: 40px; margin-top: 8px;
  background: var(--brand); color: #fff !important;
  border: 0; border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 18px var(--sf-brand-ring);
  transition: transform .15s ease, filter .15s ease;
}
.body-estabelecimento .sf-pedir i { color: #fff !important; font-size: 17px !important; }
.body-estabelecimento .sf-pedir:active { transform: scale(.97); filter: brightness(.96); }

/* linha preço + Pedir: empilha (preço em cima, Pedir full-width embaixo) */
.body-estabelecimento .grid_produtos .produto div:has(> [style*="width: 25%"]) {
  display: flex !important; flex-wrap: wrap; gap: 8px; align-items: stretch;
}
.body-estabelecimento .grid_produtos .produto [style*="width: 75%"] {
  width: auto !important; float: none !important; flex: 1 1 100%; text-align: left;
}
.body-estabelecimento .grid_produtos .produto [style*="width: 25%"] {
  width: auto !important; float: none !important; flex: 1 1 100%;
}
/* botão Pedir full-width abaixo do preço */
.body-estabelecimento .sf-pedir-inline {
  width: 100%; height: 38px; margin-top: 0; padding: 0 16px;
}
/* ícone calendário (agendamento, tela_produto 3) na cor da marca */
.body-estabelecimento .grid_produtos .produto .lni-calendar {
  color: var(--brand) !important;
}

/* card "Mais itens de…" — discreto, não compete com produtos */
.body-estabelecimento .grid_produtos + * .produto .vertudo,
.body-estabelecimento .produto a.vertudo {
  color: var(--brand) !important; font-weight: 600 !important;
}

/* ------------------------------------------------------------
   7. CARD DE PRODUTO — LISTA (exibicao 2, .novoproduto)
   ------------------------------------------------------------ */
.body-estabelecimento .grid_produtos2 { gap: 12px !important; }
.body-estabelecimento .novoproduto {
  background: var(--sf-surface) !important;
  border: 1px solid var(--sf-line) !important;
  border-radius: var(--sf-radius) !important;
  box-shadow: var(--sf-shadow) !important;
  padding: 12px !important;
  transition: transform .18s ease, box-shadow .18s ease;
}
.body-estabelecimento .novoproduto:hover {
  transform: translateY(-2px);
  box-shadow: var(--sf-shadow-lg) !important;
}
.body-estabelecimento .novoproduto .nome {
  font-weight: 700 !important; font-size: 15px !important;
  color: var(--sf-ink) !important; line-height: 1.25;
}
.body-estabelecimento .novoproduto .descricao {
  color: var(--sf-ink-soft) !important; font-size: 12.5px !important;
  line-height: 1.45;
}
.body-estabelecimento .novoproduto .valor,
.body-estabelecimento .novoproduto .valor-green {
  color: var(--sf-ink) !important; font-weight: 700 !important; font-size: 16px !important;
}
.body-estabelecimento .novoproduto .valor_anterior {
  color: #98a0ab !important; font-size: 12px !important;
}
.body-estabelecimento .novoproduto .capa {
  border-radius: 14px !important; overflow: hidden;
  box-shadow: var(--sf-shadow);
}
.body-estabelecimento .novoproduto .capa img {
  border-radius: 14px !important; object-fit: cover;
}

/* ------------------------------------------------------------
   8. DETALHES GERAIS
   ------------------------------------------------------------ */
/* respiro entre seções */
.body-estabelecimento .categoria { margin-bottom: 26px; }
/* divisor fininho legado */
.body-estabelecimento .clearline { border: 0; }
