/* Fuguetinho — layout de site (design Ian, branch design/novo-visual-app, c7eb009).
   Só apresentação: cores e fontes já são as mesmas de fuguetinho-client.css.
   Estrutura: cabeçalho navy com busca e carrinho, barra de categorias, banners,
   grade de produtos, rodapé; produto em janela e carrinho em gaveta no desktop.
   Carregado depois de fuguetinho-client.css. */

:root {
  --display: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
  --shadow: 0 1px 2px rgba(13,27,42,.06), 0 10px 30px rgba(13,27,42,.07);
  --shadow-hover: 0 2px 4px rgba(13,27,42,.06), 0 16px 40px rgba(13,27,42,.1);
  --overlay: rgba(13,27,42,.55);
  --on-navy-muted: #B7C4D3;
}

.site-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 18px; }

/* O foco programático vai para o contêiner da tela (tabindex -1), que não é um
   controle: sem contorno, senão a borda da gaveta/janela ganha uma linha laranja. */
.screen:focus, .screen:focus-visible { outline: none; }

/* ── OVERLAY (produto e carrinho sobre o catálogo) ───────────── */
.screen.under { display: flex; }
#screen-backdrop {
  display: none; position: absolute; inset: 0; z-index: 60;
  background: var(--overlay); cursor: pointer;
}
#stage.overlay-open #screen-backdrop { display: block; }
#screen-product.active, #screen-cart.active { z-index: 70; }

/* ── CABEÇALHO ───────────────────────────────────────────────── */
.site-head {
  position: relative; z-index: 50; flex-shrink: 0;
  background: var(--navy); color: var(--white);
  padding-top: env(safe-area-inset-top);
}
.head-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  max-width: 1240px; margin: 0 auto; padding: 10px 18px;
}
#screen-home .logo {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: var(--white); text-decoration: none; min-height: 44px;
}
#screen-home .logo img, .site-foot .logo img { width: 26px; height: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.hero-side img.hero-smoke { width: 300px; max-width: 86%; height: auto; margin: 0 auto; display: block; border-radius: 14px; background: #fff; object-fit: cover; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
#screen-home .logo .topbar-logo, .site-foot .logo span {
  font-family: var(--display); font-size: 26px; letter-spacing: 1.5px; line-height: 1;
  flex: none; color: var(--white);
}
#screen-home .store-badge.addr {
  display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 0;
  margin: 0; width: auto; max-width: 260px; min-height: 44px; padding: 0;
  background: transparent; border: none; border-radius: 0; color: var(--white); text-align: left;
}
.addr-pin {
  width: 36px; height: 36px; border-radius: 18px; flex-shrink: 0;
  background: rgba(232,98,26,.18); color: var(--orange2);
  display: flex; align-items: center; justify-content: center;
}
.addr-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.addr-txt small { display: none; font-size: 12px; color: var(--mutedL); }
.addr-txt b {
  font-size: 14px; font-weight: 600; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#screen-home .search-bar {
  order: 5; flex: 1 1 100%; margin: 0; width: auto;
  height: 48px; padding: 0 16px; border: none; border-radius: 14px;
  background: var(--white); color: var(--muted);
}
.head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
#screen-home .orders-btn, #screen-home .head-account { display: none; }
#screen-home .cart-btn {
  position: relative; width: auto; min-width: 48px; height: 48px;
  padding: 0 8px 0 14px; gap: 10px; border: none; border-radius: 14px;
  background: var(--orange); color: var(--navy); font-size: 14px; font-weight: 700;
}
#screen-home .cart-btn:hover { filter: brightness(1.06); }
#screen-home .cart-count {
  position: static; width: auto; min-width: 24px; height: 24px; padding: 0 6px;
  border: none; border-radius: 12px; background: var(--navy); color: var(--white); font-size: 12px;
}
.cart-total {
  background: var(--navy); color: var(--white); border-radius: 10px;
  padding: 6px 10px; font-size: 14px;
}
.cart-btn-label { display: none; }
.cart-total { display: none; }

/* ── BARRA DE CATEGORIAS ─────────────────────────────────────── */
.cat-bar {
  background: var(--cream); border-bottom: 1px solid var(--border);
  position: static; z-index: 30;
}
#screen-home .cat-strip {
  display: flex; gap: 6px; width: auto; max-width: 1240px; margin: 0 auto;
  padding: 10px 18px; overflow-x: auto; scrollbar-width: none;
}
#screen-home .cat-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border: none; border-radius: 999px; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--muted2);
}
#screen-home .cat-chip svg { color: var(--price); flex-shrink: 0; }
#screen-home .cat-chip:hover { background: var(--white); }
#screen-home .cat-chip.active { background: var(--navy); color: var(--white); }
#screen-home .cat-chip.active svg { color: var(--orange2); }

/* ── BANNERS ─────────────────────────────────────────────────── */
/* Celular: carrossel (scroll-snap). Desktop: duas colunas, ver @media (min-width: 861px). */
.hero-carousel { padding: 20px 0 0; }
.hero-grid {
  position: relative; display: flex; gap: 12px; padding: 0;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 28px;
}
.hero-grid::-webkit-scrollbar { display: none; }
.hero-grid > * { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.hero-controls { display: flex; align-items: center; justify-content: center; gap: 0; min-height: 44px; }
.hero-dot {
  position: relative; width: 44px; height: 44px; border: none; background: transparent; cursor: pointer;
}
.hero-dot::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 5px;
  transform: translate(-50%, -50%); background: var(--border); transition: width .2s, background .2s;
}
.hero-dot[aria-current="true"]::before { width: 26px; background: var(--navy); }
.hero-toggle {
  width: 44px; height: 44px; border: none; background: transparent; color: var(--muted2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; margin-left: 4px;
}
.hero-toggle .icon-play, .hero-toggle.paused .icon-pause { display: none; }
.hero-toggle.paused .icon-play { display: block; }
#screen-home .hero.hero-main {
  width: auto; margin: 0; min-height: 0; padding: 28px 24px;
  border-radius: 28px; gap: 14px; justify-content: flex-start; align-items: flex-start;
  background: var(--orange);
}
.hero-pill {
  align-self: flex-start; background: var(--navy); color: var(--white);
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
}
#screen-home .hero-title {
  font-family: var(--display); font-weight: 400; font-size: 52px; line-height: .95;
  letter-spacing: .6px; max-width: 520px; color: var(--navy);
}
#screen-home .hero-sub {
  font-size: 16px; font-weight: 400; max-width: 440px; margin: 0; color: #2A1A10;
}
.hero-main .hero-cta { margin-top: auto; } /* botão no pé do card, como no banner do condomínio */
.hero-cta {
  height: 52px; padding: 0 24px; border: none; border-radius: 14px;
  background: var(--navy); color: var(--white); font-size: 16px; font-weight: 700; cursor: pointer;
}
/* Segundo banner no celular: mesmo tamanho do primeiro, conteúdo em coluna. */
.hero-side {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  background: var(--navy); color: var(--white); border-radius: 28px; padding: 28px 24px; overflow: hidden;
}
.hero-side img { width: 96px; height: auto; margin: 0 auto; }
.hero-side h2 { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: .6px; }
.hero-side p { color: var(--on-navy-muted); font-size: 15px; margin-top: 8px; max-width: 340px; }

.trust {
  list-style: none; display: grid; grid-template-columns: 1fr; gap: 10px; padding: 16px 0 4px;
}
.trust li {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border-radius: 20px; padding: 16px 18px;
}
.trust i {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--tan); color: var(--price);
}
.trust i.ok { background: var(--successBg); color: var(--success); }
.trust b { display: block; font-size: 15px; color: var(--ink); }
.trust span { font-size: 14px; color: var(--muted); }

#screen-home .coverage-warning { margin-left: 0; margin-right: 0; }

/* ── CATÁLOGO ────────────────────────────────────────────────── */
#screen-home .section-head { width: auto; margin: 0; padding: 32px 0 14px; }
#screen-home .section-title { font-family: var(--display); font-weight: 400; font-size: 34px; }
#screen-home .section-count { font-size: 15px; }
#screen-home .product-list { width: auto; margin: 0; padding: 0; }
#screen-home .cat-section { margin: 0 0 8px; }
#screen-home .cat-section-title {
  font-family: var(--display); font-weight: 400; font-size: 28px;
  letter-spacing: .6px; text-transform: none; color: var(--ink); padding: 18px 0 12px;
}
#screen-home .cat-scroll {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 0; overflow: visible;
}
#screen-home .prod-card {
  width: auto; min-width: 0; padding: 10px; gap: 12px; border: none; border-radius: 22px;
  box-shadow: var(--shadow);
}
#screen-home .prod-photo, #screen-home .prod-icon {
  width: 100%; height: auto; aspect-ratio: 1 / .85; border-radius: 16px;
}
#screen-home .prod-name { font-size: 15px; min-height: 40px; }
#screen-home .prod-price { font-size: 26px; padding-right: 52px; }
#screen-home .prod-add-btn { right: 10px; bottom: 10px; border-radius: 14px; }
#screen-home .prod-add-btn:hover { filter: brightness(1.06); }

/* ── RODAPÉ ──────────────────────────────────────────────────── */
.site-foot { margin-top: 48px; background: var(--navy); color: var(--white); padding: 36px 0 28px; }
.site-foot .logo { display: flex; align-items: center; gap: 10px; }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.foot-tag { color: var(--on-navy-muted); margin-top: 14px; max-width: 340px; font-size: 15px; }
.foot-links { display: flex; flex-direction: column; gap: 4px; }
.foot-links a {
  color: var(--white); text-decoration: none; font-size: 15px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.foot-links a:hover { text-decoration: underline; }
.site-foot .app-purpose--home {
  max-width: none; margin: 24px 0 0; padding: 0; text-align: left;
  color: var(--on-navy-muted); font-size: 12px;
}
.site-foot .app-purpose--home a { color: var(--white); font-weight: 600; }
.foot-legal {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 18px;
  font-size: 13px; color: var(--on-navy-muted);
  display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
}

/* ── PRODUTO: folha no celular, janela no desktop ────────────── */
@media (max-width: 860px) {
  #screen-product.active {
    inset: auto 0 0 0; height: 92%; border-radius: 28px 28px 0 0; z-index: 70;
  }
  #screen-product .topbar { border-radius: 28px 28px 0 0; }
}
/* Celular deitado: sem folga para a folha, o produto ocupa a tela toda. */
@media (max-width: 860px) and (max-height: 550px) {
  #screen-product.active { inset: 0; height: 100%; border-radius: 0; }
  #screen-product .topbar { border-radius: 0; }
}
#screen-product .prod-detail-hero { flex-shrink: 0; }
#screen-product .prod-detail-body { margin-top: 0; border-radius: 0; }

/* ── CARRINHO ────────────────────────────────────────────────── */
#screen-cart .cart-list { margin-top: 12px; }
#screen-cart .header-title { font-family: var(--display); font-weight: 400; letter-spacing: .6px; }

/* ── DESKTOP ─────────────────────────────────────────────────── */
@media (min-width: 861px) {
  .site-wrap { padding: 0 32px; }
  .head-row { flex-wrap: nowrap; gap: 24px; padding: 0 32px; height: 76px; }
  #screen-home .logo img { width: 32px; }
  .hero-side img.hero-smoke { width: 380px; }
  #screen-home .store-badge.addr { flex: 0 0 auto; max-width: 260px; }
  .addr-txt small { display: block; }
  #screen-home .search-bar { order: 0; flex: 1 1 0; }
  #screen-home .orders-btn, #screen-home .head-account {
    display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px;
    flex-shrink: 0; white-space: nowrap;
    border: 1px solid var(--borderD); border-radius: 14px; background: transparent;
    color: var(--white); font-size: 14px; font-weight: 600; cursor: pointer;
  }
  #screen-home .orders-btn:hover, #screen-home .head-account:hover { background: rgba(255,255,255,.08); }
  .cart-btn-label { display: inline; }
  .cart-total { display: inline-block; }

  #screen-home .cat-bar { position: sticky; top: 0; }
  #screen-home .cat-strip { padding: 10px 32px; }

  .hero-carousel { padding: 36px 0 8px; }
  .hero-grid {
    display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: stretch;
    overflow: visible; scroll-snap-type: none; border-radius: 0;
  }
  .hero-grid > * { flex: none; }
  .hero-controls { display: none; }
  #screen-home .hero.hero-main { padding: 44px 44px 40px; min-height: 340px; gap: 18px; }
  #screen-home .hero-title { font-size: 76px; }
  #screen-home .hero-sub { font-size: 17px; }
  .hero-side { gap: 16px; padding: 32px; }
  .hero-side img { width: 120px; height: auto; margin: 0 auto; }
  .hero-side h2 { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: .6px; }
  .hero-side p { color: var(--on-navy-muted); font-size: 15px; margin-top: 8px; max-width: 340px; }

  .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 24px 0 8px; }
  .trust li { padding: 18px 20px; }

  #screen-home .section-head { padding: 40px 0 18px; }
  #screen-home .section-title { font-size: 36px; }
  #screen-home .cat-scroll { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
  #screen-home .prod-name { font-size: 15px; }
  #screen-home .prod-price { font-size: 30px; }

  .site-foot { margin-top: 72px; padding: 48px 0 32px; }
  .foot-grid { grid-template-columns: 1.4fr 1fr; gap: 32px; }

  /* A barra inferior e o carrinho flutuante saem: o cabeçalho já tem tudo. */
  #screen-home .app-nav, #screen-home .home-cart-bar { display: none !important; }

  /* Janela do produto */
  #screen-product.active {
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "hero main" "hero actions";
    left: 50%; top: 50%; right: auto; bottom: auto;
    width: min(920px, calc(100% - 32px)); height: min(640px, calc(100% - 48px));
    transform: translate(-50%, -50%); border-radius: 28px; background: var(--cream);
    box-shadow: 0 30px 80px rgba(13,27,42,.35);
  }
  #screen-product .topbar {
    position: absolute; top: 14px; right: 14px; left: auto; z-index: 5;
    padding: 0; background: transparent; border-radius: 0;
  }
  #screen-product .topbar-logo, #screen-product .topbar-actions { display: none; }
  #screen-product .topbar-back {
    width: 44px; height: 44px; border-radius: 22px; background: var(--white); color: var(--ink);
    box-shadow: 0 1px 2px rgba(13,27,42,.12);
  }
  #screen-product .topbar-back span { display: none; }
  #screen-product .topbar-back::before { content: "×"; font-size: 28px; line-height: 1; }
  #screen-product .prod-detail-hero {
    grid-area: hero; height: auto; min-height: 0; width: auto; margin: 0;
    border-radius: 0; padding: 32px;
  }
  #screen-product .prod-detail-photo { max-width: 78%; max-height: 78%; }
  #screen-product .product-scroll { grid-area: main; }
  #screen-product .prod-detail-body { padding: 36px 32px 16px; }
  #screen-product .prod-detail-name { font-size: 48px; }
  #screen-product .product-actions {
    grid-area: actions; background: var(--cream); border-top: none; padding: 8px 32px 28px;
  }

  /* Gaveta do carrinho */
  #screen-cart.active {
    inset: 0 0 0 auto; width: min(440px, 100%);
    box-shadow: -20px 0 60px rgba(13,27,42,.25);
  }
  #screen-cart .topbar { background: var(--cream); color: var(--ink); }
  #screen-cart .topbar-back { background: var(--white); color: var(--ink); }
  #screen-cart .header-title { color: var(--ink); font-size: 32px; }
  #screen-cart #cart-body { width: auto; margin: 0; }
  #screen-cart .cart-list { margin: 0 20px; padding: 4px 14px; }
  #screen-cart .cart-summary { margin: 14px 20px 0; }
  #screen-cart .bottom-bar { padding: 16px 20px 20px; }
  #screen-cart .bottom-bar .narrow-column { width: 100%; }

  /* Finalizar pedido em duas colunas */
  #screen-checkout .checkout-section {
    width: min(100% - 64px, 1240px); margin: 24px auto;
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    column-gap: 28px; align-items: start;
  }
  #screen-checkout .checkout-section > * { grid-column: 1; width: auto; margin-left: 0; margin-right: 0; }
  #screen-checkout .checkout-section > .checkout-summary-wrap {
    grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 8px;
  }
  #screen-checkout .checkout-label { font-family: var(--display); font-size: 36px; }
  #screen-checkout .bottom-bar {
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); column-gap: 28px;
    padding-left: max(32px, calc((100% - 1240px) / 2 + 32px));
    padding-right: max(32px, calc((100% - 1240px) / 2 + 32px));
  }
  #screen-checkout .bottom-bar .btn-checkout { grid-column: 2; width: 100%; margin: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  #screen-home .prod-card { transition: transform .15s, box-shadow .15s; }
  #screen-home .prod-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
  @media (min-width: 861px) {
    #screen-cart.active { animation: drawer-in .28s cubic-bezier(.4,0,.2,1); }
    #screen-product.active { animation: modal-in .2s ease-out; }
  }
  @keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
  @keyframes modal-in { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }
}

/* Contexto do checkout: dados pessoais vêm do cadastro. */
.checkout-account-note { font-size: 13px; color: var(--muted); margin: -2px 0 14px; line-height: 1.5; }

/* Itens do carrinho sem loja na região: cinza, com aviso e botão de remover. */
.cart-region-warning {
  margin: 12px 18px 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; line-height: 1.4;
  background: #FFF1E6; color: #8A3B0B; border: 1px solid #F3C9A6;
}
.cart-item--unavailable .cart-item-icon { filter: grayscale(1); opacity: .55; }
.cart-item--unavailable .cart-item-name { color: var(--muted); text-decoration: line-through; }
.cart-item--unavailable .cart-item-price { color: #8A3B0B; font-weight: 700; }
.cart-item-remove {
  min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--navy);
  background: var(--card); color: var(--navy); font-weight: 700; font-size: 13px; cursor: pointer;
}
.summary-row--unavailable { color: var(--muted); text-decoration: line-through; }
.btn-checkout:disabled, #checkout-submit-button:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }
@media (min-width: 861px) {
  #screen-cart .cart-region-warning { margin: 12px 20px 12px; }
}

/* Botão do banner "Mora em condomínio?": filtra a etiqueta Linha Baixo Ruído. */
.hero-side-cta {
  margin-top: 16px; height: 52px; padding: 0 24px; border: none; border-radius: 14px;
  background: var(--orange); color: var(--navy); font-size: 16px; font-weight: 700; cursor: pointer;
  align-self: flex-start;
}
.hero-side-cta:hover { filter: brightness(1.06); }

/* Acompanhamento de pedido cancelado/recusado: quem encerrou e o recado da loja. */
.tracking-cancel {
  margin: 12px 18px 0; padding: 14px 16px; border-radius: 16px; background: #FFF1E6;
  border: 1px solid #F3C9A6; color: #5A2A0A; line-height: 1.5; font-size: 14px;
}
.tracking-cancel strong { display: block; font-size: 15px; color: #8A3B0B; }
.tracking-cancel p { margin-top: 8px; white-space: pre-line; }

/* Vincular o Google a um cadastro que já existe (tela de login). */
.google-link {
  margin: 0 0 16px; padding: 16px; border-radius: 16px; background: #FFF1E6; border: 1px solid #F3C9A6; text-align: left;
}
.google-link h2 { font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: .5px; color: var(--navy); margin: 0 0 6px; }
.google-link p { font-size: 14px; line-height: 1.5; color: #5A2A0A; margin: 0 0 12px; }

/* Acompanhamento do pagamento na tela do Pix. */
.pay-watch {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px auto 4px;
  padding: 12px 16px; max-width: 420px; border-radius: 14px; font-size: 15px; font-weight: 600; line-height: 1.35;
  background: #FFF1E6; color: #8A3B0B; border: 1px solid #F3C9A6;
}
.pay-watch[data-state="ok"] { background: #E3F1E6; color: #1F5132; border-color: #BCDDC4; }
.pay-watch[data-state="fail"] { background: #FDE8E8; color: #8A1C1C; border-color: #F3B8B8; }
.pay-watch-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.pay-watch[data-state="wait"] .pay-watch-icon { border: 3px solid currentColor; border-right-color: transparent; }
.pay-watch[data-state="ok"] .pay-watch-icon { background: #1F7A45; color: #fff; }
.pay-watch[data-state="fail"] .pay-watch-icon { background: #B42323; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .pay-watch[data-state="wait"] .pay-watch-icon { animation: pay-spin 1s linear infinite; }
}
@keyframes pay-spin { to { transform: rotate(360deg); } }

/* Campo travado (e-mail verificado pelo Google) */
input.is-locked, input[readonly].is-locked { background: #EEF1F5; color: #5B6675; cursor: not-allowed; }
.field-hint { margin: 4px 0 0; font-size: 12px; color: #5B6675; }
