/* ==================================================================
   Gatü Cakes — cardápio digital
   Tokens da marca (extraídos da logo e das artes do Drive).
   Troque aqui cores, fontes, raios e sombras.
   ================================================================== */
:root {
  /* Cores */
  --c-primaria: #194F52;          /* verde Gatü (fundo da logo) */
  --c-primaria-escura: #113A3C;
  --c-primaria-clara: #E3EDEA;
  --c-destaque: #D0A062;          /* dourado da logo — usar sobre o verde */
  --c-destaque-texto: #8A6326;    /* dourado escuro para texto sobre o creme (AA) */
  --c-destaque-claro: #F3E3C7;
  --c-secundaria: #5B3A24;        /* chocolate das artes */
  --c-fundo: #F4EADC;             /* creme das artes */
  --c-superficie: #FFFBF5;
  --c-texto: #24302E;
  --c-texto-suave: #5A6662;
  --c-texto-claro: #F7EFE3;       /* texto sobre o verde */
  --c-borda: #E2D3BC;
  --c-ok: #2F7A4F;
  --c-erro: #A8261E;
  --c-fundo-externo: #113A3C;     /* em volta da coluna no desktop */

  /* Tipografia */
  --f-titulo: "Playfair Display", Georgia, "Times New Roman", serif;
  --f-texto: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-marca: "Nunito", "Montserrat", system-ui, sans-serif;    /* topo: nome e frases (opção 6, escolhida pela dona) */

  /* Raios */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Sombras */
  --sh-card: 0 2px 12px rgba(17, 58, 60, .08);
  --sh-float: 0 10px 28px rgba(17, 58, 60, .30);
  --sh-panel: 0 -8px 32px rgba(17, 30, 28, .22);

  /* Movimento */
  --t: 300ms;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Layout */
  --col: 480px;
  --nav-h: 60px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t: 1ms; }
  html { scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.45;
  color: var(--c-texto);
  background-color: var(--c-fundo-externo);
  background-image: radial-gradient(rgba(208, 160, 98, .16) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-tap-highlight-color: transparent;
}
body.is-locked { overflow: hidden; }
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--f-titulo); color: var(--c-primaria); margin: 0; line-height: 1.15; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--c-destaque); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 22px; height: 22px; flex: none; }

.app {
  position: relative;
  max-width: var(--col);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--c-fundo);
}
@media (min-width: 520px) {
  .app { box-shadow: 0 0 0 1px rgba(208, 160, 98, .25), 0 20px 60px rgba(0, 0, 0, .35); }
}

/* Modo de teste (?teste=1) */
.test-banner { background: var(--c-destaque); color: #2A1E0C; font-size: 13px; font-weight: 700; padding: 8px 16px; text-align: center; }
.rascunho { display: none; }
.is-teste .rascunho {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: #6B4A00; background: #FFE7B3; border: 1px dashed #C58B12;
  border-radius: var(--r-pill); padding: 2px 8px;
}
.placeholder-txt { color: var(--c-erro); font-weight: 700; }

/* ---------------------------------------------------------------- topo */
.lobby {
  position: relative;
  padding: calc(18px + var(--safe-top)) 16px 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(208, 160, 98, .16), transparent 45%),
    var(--c-primaria);
  color: var(--c-texto-claro);
  border-bottom: 2px solid var(--c-destaque);
}
.lobby__id { display: flex; gap: 14px; align-items: center; }
.lobby__logo { width: 76px; height: 76px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--c-destaque), 0 0 0 5px rgba(208, 160, 98, .25); }
.lobby__text { min-width: 0; display: grid; gap: 3px; }
.lobby__name { font-family: var(--f-marca); font-weight: 600; font-size: 1.9rem; line-height: 1.1; color: var(--c-destaque); }
.lobby__bio { font-family: var(--f-marca); font-weight: 400; font-size: 1.02rem; color: var(--c-texto-claro); line-height: 1.3; margin-top: 6px; }
.lobby__apoio { font-family: var(--f-marca); font-weight: 300; font-size: .8rem; color: rgba(247, 239, 227, .82); }
.status {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; padding: 9px 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(208, 160, 98, .45);
  font-size: .86rem; font-weight: 600; color: var(--c-texto-claro);
}
.status::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c-destaque); }
.status--aberto::before { background: #7FD3A0; box-shadow: 0 0 0 3px rgba(127, 211, 160, .25); }
.status--fechado::before { background: #F0A08F; }
.status:empty { display: none; }

.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.shortcut {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 62px; padding: 8px 4px;
  border: 1px solid rgba(208, 160, 98, .5); border-radius: var(--r-md);
  background: rgba(255, 255, 255, .06);
  color: var(--c-texto-claro); font-size: .72rem; font-weight: 600; text-decoration: none;
}
.shortcut .icon { color: var(--c-destaque); }
.shortcut:active { transform: scale(.97); background: rgba(255, 255, 255, .12); }

.stories { display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 0; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; display: grid; justify-items: center; gap: 4px; width: 68px; border: 0; background: none; padding: 0; font-size: .72rem; font-weight: 600; color: var(--c-texto-claro); }
.story__ring { width: 64px; height: 64px; border-radius: 50%; padding: 3px; background: conic-gradient(var(--c-destaque), #F3D9A8, var(--c-destaque)); }
.story__ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--c-primaria); }
.story span { max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -------------------------------------------------------- abas + busca */
.catnav { position: sticky; top: 0; z-index: 20; background: var(--c-fundo); padding: 10px 0 8px; transition: box-shadow var(--t); }
.catnav.is-stuck { box-shadow: 0 6px 16px rgba(17, 58, 60, .12); }
.catnav__row { display: flex; align-items: center; padding-left: 12px; }
.catnav__search-btn {
  position: relative; z-index: 1;
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  margin-right: 8px; box-shadow: 8px 0 0 var(--c-fundo);
  border: 1.5px solid var(--c-borda); background: var(--c-superficie);
  display: grid; place-items: center; color: var(--c-primaria);
}
.catnav__search-btn[aria-expanded="true"] { background: var(--c-primaria); border-color: var(--c-primaria); color: var(--c-texto-claro); }
.tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 16px 4px 2px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px);
  mask-image: linear-gradient(90deg, transparent 0, #000 10px);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--c-borda); border-radius: var(--r-pill);
  background: var(--c-superficie); color: var(--c-primaria);
  font-weight: 600; font-size: .86rem; white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.tab[aria-current="true"] { background: var(--c-primaria); border-color: var(--c-primaria); color: var(--c-texto-claro); }
.search-row { padding: 8px 16px 2px; }
.search-input { width: 100%; min-height: 46px; padding: 0 16px; font-size: 16px; border: 1.5px solid var(--c-borda); border-radius: var(--r-pill); background: var(--c-superficie); }
.search-input:focus { outline: none; border-color: var(--c-primaria); }

/* ------------------------------------------------------------ cardápio */
.menu { padding: 0 16px 24px; }
.menu-section { scroll-margin-top: calc(var(--nav-h) + 8px); padding-top: 16px; }
.menu-section h2 { font-size: 1.28rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.menu-section h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--c-destaque), transparent); }
.menu-list { display: grid; gap: 12px; }
.menu-empty { text-align: center; color: var(--c-texto-suave); padding: 24px 16px 60px; }

.card {
  position: relative;
  border: 1px solid rgba(226, 211, 188, .7); border-radius: var(--r-md);
  background: var(--c-superficie); box-shadow: var(--sh-card);
  animation: fade-up var(--t) var(--ease) both;
}
.card__open {
  display: grid; grid-template-columns: 1fr 116px; gap: 12px; align-items: stretch;
  width: 100%; padding: 12px; text-align: left;
  border: 0; border-radius: inherit; background: none;
  transition: transform 120ms;
}
.card__open:active { transform: scale(.985); }
.card__add {
  position: absolute; right: 8px; bottom: 8px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--c-superficie);
  background: var(--c-primaria); color: var(--c-destaque);
  box-shadow: 0 4px 12px rgba(17, 58, 60, .3);
  transition: transform 120ms;
}
.card__add:active { transform: scale(.9); }
.card__add .icon { width: 22px; height: 22px; stroke-width: 2.4; }
.card__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card__name { font-family: var(--f-titulo); font-weight: 700; font-size: 1.1rem; color: var(--c-primaria); line-height: 1.2; }
.card__desc { font-size: .82rem; color: var(--c-texto-suave); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__price { margin-top: auto; padding-top: 4px; padding-right: 8px; font-size: .9rem; color: var(--c-texto-suave); }
.card__price strong { color: var(--c-primaria); font-weight: 700; font-size: 1rem; }
.card__media { position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1; background: var(--c-primaria-clara); align-self: start; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__play { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(17, 58, 60, .8); color: var(--c-destaque); }
.card__play .icon { width: 14px; height: 14px; }
.card--off { opacity: .55; }
.card--off .card__media img { filter: grayscale(.7); }

.tag {
  display: inline-flex; align-items: center;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--c-primaria-clara); color: var(--c-primaria);
}
.tag--novo { background: var(--c-destaque-claro); color: #6E4C16; border: 1px solid var(--c-destaque); }
.tag--limitada { background: #EFE2D6; color: var(--c-secundaria); }
.tag--off { background: #E9E2DE; color: #5B4A44; }

.foot { display: grid; justify-items: center; gap: 4px; padding: 12px 16px 120px; color: var(--c-texto-suave); font-size: .8rem; text-align: center; }
.foot__script { font-family: var(--f-titulo); font-style: italic; font-size: 1.05rem; color: var(--c-destaque-texto); }

/* ------------------------------------------------------ barra carrinho */
.cartbar-wrap {
  position: fixed; z-index: 30; bottom: 0; left: 50%;
  width: min(var(--col), 100%); transform: translateX(-50%);
  padding: 10px 16px calc(12px + var(--safe-bottom));
  background: linear-gradient(to top, var(--c-fundo) 55%, rgba(244, 234, 220, 0));
  pointer-events: none;
}
.cartbar {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 56px; padding: 8px 20px 8px 8px;
  border: 0; border-radius: var(--r-pill);
  background: var(--c-primaria); color: var(--c-texto-claro);
  box-shadow: var(--sh-float);
  font-weight: 700; font-size: .95rem;
  animation: slide-up var(--t) var(--ease) both;
}
.cartbar__count { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-destaque); color: var(--c-primaria-escura); }
.cartbar__label { flex: 1; text-align: left; }
.cartbar.is-pulse { animation: pulse 520ms var(--ease); }

/* -------------------------------------------------------------- painel */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet__overlay { position: absolute; inset: 0; background: rgba(10, 30, 30, .6); opacity: 0; transition: opacity var(--t); }
.sheet__panel {
  position: absolute; left: 50%; bottom: 0;
  width: min(var(--col), 100%);
  height: calc(100dvh - 10px - var(--safe-top));
  display: flex; flex-direction: column;
  background: var(--c-fundo);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--sh-panel);
  transform: translate(-50%, 100%);
  transition: transform var(--t) var(--ease);
  overflow: hidden; outline: none;
}
.sheet.is-open .sheet__overlay { opacity: 1; }
.sheet.is-open .sheet__panel { transform: translate(-50%, 0); }
.sheet--info .sheet__panel { height: auto; max-height: calc(100dvh - 40px - var(--safe-top)); }

.sheet__grab { position: absolute; top: 8px; left: 50%; z-index: 3; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(17, 58, 60, .25); }
.sheet--detail .sheet__grab { background: rgba(255, 255, 255, .85); }
.sheet__top { display: flex; align-items: center; gap: 8px; padding: 18px 12px 8px 16px; min-height: 64px; border-bottom: 1px solid var(--c-borda); }
.sheet__top h2 { flex: 1; font-size: 1.25rem; }
.sheet--detail .sheet__top, .sheet--story .sheet__top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; justify-content: flex-end; border: 0; pointer-events: none; }
.sheet--detail .sheet__top > *, .sheet--story .sheet__top > * { pointer-events: auto; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--c-superficie); color: var(--c-primaria); box-shadow: var(--sh-card); }
.sheet__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet__footer { padding: 12px 16px calc(12px + var(--safe-bottom)); background: var(--c-superficie); border-top: 1px solid var(--c-borda); }
.sheet__footer:empty { display: none; }

@media (min-width: 720px) {
  .sheet__panel {
    top: 50%; bottom: auto; height: min(860px, calc(100dvh - 48px)); width: 460px;
    border-radius: var(--r-lg); transform: translate(-50%, -46%) scale(.97); opacity: 0;
    transition: transform var(--t) var(--ease), opacity var(--t);
  }
  .sheet.is-open .sheet__panel { transform: translate(-50%, -50%); opacity: 1; }
  .sheet--info .sheet__panel { height: auto; max-height: calc(100dvh - 48px); }
  .sheet__grab { display: none; }
}

.sheet--story .sheet__panel { height: 100dvh; border-radius: 0; background: #000; }
.sheet--story .sheet__grab { display: none; }
.story-view { position: relative; height: 100%; display: grid; place-items: center; }
.story-view video { width: 100%; height: 100%; object-fit: contain; }
.story-view__title { position: absolute; left: 16px; top: calc(24px + var(--safe-top)); color: #fff; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
@media (min-width: 720px) { .sheet--story .sheet__panel { height: min(860px, calc(100dvh - 48px)); width: 420px; border-radius: var(--r-lg); } }

/* ------------------------------------------------------ detalhe do bolo */
.gallery { position: relative; background: var(--c-primaria); }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track.is-drag, .viewer__track.is-drag { cursor: grabbing; }
.gallery__slide { position: relative; flex: 0 0 100%; aspect-ratio: 4 / 5; max-height: 60dvh; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery__slide[data-ver] { cursor: zoom-in; }
.gallery__slide img, .gallery__slide video { width: 100%; height: 100%; object-fit: cover; }
.gallery__slide--arte img { object-fit: contain; background: var(--c-primaria-escura); }
.gallery__badge--arte { left: auto; right: 12px; bottom: 30px; background: rgba(17, 58, 60, .85); color: var(--c-destaque); border: 1px solid rgba(208, 160, 98, .6); }
.gallery__nav {
  position: absolute; top: 50%; z-index: 2;
  width: 44px; height: 44px; margin-top: -22px; border-radius: 50%;
  display: none; place-items: center;
  border: 0; background: rgba(255, 251, 245, .92); color: var(--c-primaria); box-shadow: var(--sh-card);
}
.gallery__nav--prev { left: 10px; }
.gallery__nav--next { right: 10px; }
.gallery__nav--next .icon { transform: rotate(180deg); }
.gallery__nav:disabled { opacity: 0; pointer-events: none; }
@media (pointer: fine) { .gallery__nav { display: grid; } }
.gallery__badge { position: absolute; left: 12px; bottom: 30px; padding: 3px 10px; border-radius: var(--r-pill); background: rgba(17, 58, 60, .8); color: #fff; font-size: .72rem; font-weight: 700; }
.gallery__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.gallery__dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(17, 58, 60, .25); transition: width var(--t), background var(--t); }
.gallery__dot.is-active { width: 20px; border-radius: 4px; background: var(--c-destaque); }

.detail { padding: 16px 16px 24px; display: grid; gap: 18px; }
.detail__head { display: grid; gap: 6px; }
.detail__head h2 { font-size: 1.6rem; }
.detail__desc { color: var(--c-texto-suave); font-size: .95rem; }
.detail__price { font-size: 1.3rem; font-weight: 700; color: var(--c-primaria); }
.detail__price small { font-size: .82rem; font-weight: 600; color: var(--c-texto-suave); }
.detail__rend { font-size: .86rem; font-weight: 600; color: var(--c-texto-suave); margin-top: -2px; }
.detail__prazo { display: flex; align-items: center; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--c-destaque-texto); }
.detail__prazo .icon { width: 18px; height: 18px; }
.detail__off { padding: 10px 14px; border-radius: var(--r-sm); background: #EFE8E4; color: #5B4A44; font-weight: 600; }

.group { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.group legend, .group__title { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; margin-bottom: 8px; font-weight: 700; color: var(--c-primaria); }
.pill-req { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: var(--r-pill); background: var(--c-primaria); color: var(--c-texto-claro); }
.pill-opt { font-size: .74rem; font-weight: 500; color: var(--c-texto-suave); }

.option {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 14px;
  border: 1.5px solid var(--c-borda); border-radius: var(--r-md);
  background: var(--c-superficie); cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option__mark { flex: none; width: 22px; height: 22px; border: 2px solid var(--c-borda); border-radius: 50%; transition: all var(--t); }
.option--check .option__mark { border-radius: 6px; }
.option__label { flex: 1; font-weight: 600; min-width: 0; }
.option__label small { display: block; font-weight: 500; font-size: .78rem; color: var(--c-texto-suave); }
.option__price { font-weight: 700; color: var(--c-primaria); white-space: nowrap; font-size: .9rem; }
.option:has(input:checked) { border-color: var(--c-primaria); background: var(--c-primaria-clara); }
.option input:checked + .option__mark { border-color: var(--c-primaria); background: var(--c-primaria); box-shadow: inset 0 0 0 3px #fff; }
.option input:focus-visible + .option__mark { outline: 3px solid var(--c-destaque); outline-offset: 2px; }
.option:has(input:disabled) { opacity: .5; cursor: not-allowed; background: #F1EBE2; }
.group.is-error .option { border-color: var(--c-erro); }

.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--c-borda); border-radius: var(--r-pill); background: var(--c-superficie); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; color: var(--c-primaria); border-radius: 50%; }
.stepper button:disabled { color: var(--c-borda); }
.stepper output { min-width: 32px; text-align: center; font-weight: 700; }
.stepper--sm button { width: 40px; height: 40px; }

.acc { border-top: 1px solid var(--c-borda); }
.acc:last-child { border-bottom: 1px solid var(--c-borda); }
.acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-weight: 700; color: var(--c-primaria); cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ""; width: 9px; height: 9px; border-right: 2.5px solid var(--c-destaque); border-bottom: 2.5px solid var(--c-destaque); transform: rotate(45deg) translate(-3px, -3px); transition: transform var(--t); }
.acc[open] summary::after { transform: rotate(-135deg); }
.acc__body { padding: 0 2px 16px; font-size: .92rem; }
.acc__body ul, .acc__body ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.acc__video { margin-bottom: 12px; border-radius: var(--r-md); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.acc__video video { width: 100%; height: 100%; object-fit: cover; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 4px 10px; border-radius: var(--r-pill); background: var(--c-destaque-claro); font-size: .84rem; }

/* ------------------------------------------------------- formulários */
.field { display: grid; gap: 6px; }
.field label, .field .field__label { font-weight: 700; color: var(--c-primaria); font-size: .92rem; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font-size: 16px; border: 1.5px solid var(--c-borda); border-radius: var(--r-sm);
  background: var(--c-superficie);
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--c-primaria); box-shadow: 0 0 0 3px rgba(25, 79, 82, .15); }
.field__hint { font-size: .8rem; color: var(--c-texto-suave); }
.field__error { font-size: .84rem; font-weight: 600; color: var(--c-erro); }
.field__error:empty { display: none; }
.field.is-error input, .field.is-error textarea, .field.is-error select { border-color: var(--c-erro); }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.segmented .option { justify-content: center; text-align: center; padding: 10px 8px; }
.segmented .option__mark { display: none; }
.segmented .option__label { flex: none; }

.selo-entrega { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--c-destaque-claro); border: 1px solid var(--c-destaque); color: #6E4C16; font-size: .78rem; font-weight: 700; }
.nota { font-size: .78rem; color: var(--c-texto-suave); }

/* --------------------------------------------------------------- botões */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 54px; padding: 10px 20px;
  border: 0; border-radius: var(--r-pill);
  background: var(--c-primaria); color: var(--c-texto-claro);
  font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center;
  transition: background var(--t), transform 120ms;
}
.btn .icon { color: var(--c-destaque); }
.btn:active { transform: scale(.98); }
.btn:disabled { background: #9DAFAB; }
.btn--ghost { background: transparent; color: var(--c-primaria); box-shadow: inset 0 0 0 1.5px var(--c-primaria); }
.btn--ghost .icon { color: var(--c-primaria); }
.btn + .btn { margin-top: 10px; }
.link-btn { border: 0; background: none; padding: 10px 4px; min-height: 44px; color: var(--c-primaria); font-weight: 700; text-decoration: underline; text-decoration-color: var(--c-destaque); text-underline-offset: 4px; }

/* --------------------------------------------------------------- pedido */
.order { padding: 12px 16px 24px; display: grid; gap: 16px; }
.steps { display: flex; gap: 4px; align-items: center; font-size: .7rem; font-weight: 700; color: var(--c-texto-suave); flex-wrap: wrap; }
.steps span { padding: 3px 9px; border-radius: var(--r-pill); background: #E9DDCB; }
.steps span.is-on { background: var(--c-primaria); color: var(--c-texto-claro); }
.steps span.is-done { background: var(--c-primaria-clara); color: var(--c-primaria); }
.item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px; border-radius: var(--r-md); background: var(--c-superficie); box-shadow: var(--sh-card); }
.item__thumb { width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-primaria-clara); }
.item__main { min-width: 0; display: grid; gap: 2px; }
.item__name { font-weight: 700; color: var(--c-primaria); }
.item__meta { font-size: .84rem; color: var(--c-texto-suave); }
.item__obs { font-size: .84rem; font-style: italic; color: var(--c-texto-suave); overflow-wrap: anywhere; }
.item__bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.item__price { font-weight: 700; color: var(--c-primaria); }
.item__actions { display: flex; gap: 2px; margin-left: -4px; }
.item__actions button { min-height: 40px; padding: 0 8px; border: 0; background: none; color: var(--c-texto-suave); font-weight: 600; font-size: .82rem; display: inline-flex; align-items: center; gap: 4px; }
.item__actions .icon { width: 16px; height: 16px; }
.totals { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-md); background: var(--c-destaque-claro); }
.totals div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.totals .totals__total { font-weight: 700; font-size: 1.08rem; color: var(--c-primaria); }
.totals .totals__sep { padding-top: 6px; border-top: 1px dashed rgba(17, 58, 60, .3); }
.empty { display: grid; justify-items: center; gap: 12px; padding: 40px 16px; text-align: center; color: var(--c-texto-suave); }
.empty img { width: 84px; border-radius: 50%; }

.notice { padding: 10px 14px; border-radius: var(--r-sm); background: #FBE9C9; color: #5A3D00; font-size: .86rem; font-weight: 600; text-align: left; border-left: 4px solid var(--c-destaque); }
.notice--info { background: var(--c-primaria-clara); color: var(--c-primaria-escura); border-left-color: var(--c-primaria); }

/* ------------------------------------------------------------ agenda */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; margin: 0 -16px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; }
.days::after { content: ""; flex: 0 0 8px; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; scroll-snap-align: start;
  width: 76px; min-height: 96px; padding: 10px 4px 8px;
  display: grid; justify-items: center; align-content: start; gap: 2px;
  border: 1.5px solid var(--c-borda); border-radius: var(--r-md);
  background: var(--c-superficie); color: var(--c-primaria);
  transition: background var(--t), border-color var(--t), color var(--t);
}
.day__dow { font-size: .7rem; font-weight: 700; letter-spacing: .06em; }
.day__date { font-family: var(--f-titulo); font-size: 1.22rem; font-weight: 700; line-height: 1.2; }
.day__vagas { margin-top: 4px; font-size: .66rem; font-weight: 700; line-height: 1.2; color: var(--c-ok); text-align: center; }
.day--ultimas-vagas .day__vagas { color: #8A5A00; background: var(--c-destaque-claro); padding: 1px 6px; border-radius: var(--r-pill); }
.day--off { background: #EFE7DB; border-style: dashed; color: #8A938F; }
.day--off .day__vagas { color: #8A938F; font-weight: 600; }
.day[aria-pressed="true"] { background: var(--c-primaria); border-color: var(--c-destaque); color: var(--c-texto-claro); box-shadow: 0 6px 16px rgba(17, 58, 60, .25); }
.day[aria-pressed="true"] .day__vagas { color: var(--c-destaque); background: none; }
.agenda-motivo:empty { display: none; }

.fechado { display: grid; justify-items: center; gap: 12px; padding: 26px 18px; text-align: center; border-radius: var(--r-lg); background: var(--c-primaria); color: var(--c-texto-claro); }
.fechado img { width: 76px; border-radius: 50%; box-shadow: 0 0 0 2px var(--c-destaque); }
.fechado h3 { color: var(--c-destaque); font-size: 1.3rem; }
.fechado p { font-size: .92rem; }
.fechado .btn { background: var(--c-destaque); color: var(--c-primaria-escura); }
.fechado .btn .icon { color: var(--c-primaria-escura); }

/* ------------------------------------------------------------- resumo */
.resumo { display: grid; gap: 10px; }
.resumo__bloco { padding: 12px 14px; border-radius: var(--r-md); background: var(--c-superficie); box-shadow: var(--sh-card); display: grid; gap: 2px; }
.resumo__bloco h3 { font-family: var(--f-texto); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--c-destaque-texto); display: flex; justify-content: space-between; align-items: center; }
.resumo__bloco h3 button { border: 0; background: none; color: var(--c-primaria); font-weight: 700; font-size: .78rem; text-transform: none; letter-spacing: 0; text-decoration: underline; min-height: 32px; padding: 0 2px; }
.resumo__bloco p { font-size: .92rem; overflow-wrap: anywhere; }
.resumo__linha { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }

/* --------------------------------------------------------- confirmação */
.done { display: grid; justify-items: center; gap: 14px; padding: 28px 20px 24px; text-align: center; }
.done img { width: 96px; border-radius: 50%; box-shadow: 0 0 0 3px var(--c-destaque); animation: pop 500ms var(--ease) both; }
.done h2 { font-size: 1.55rem; }
.done p { color: var(--c-texto-suave); }
.done__codigo { padding: 6px 14px; border-radius: var(--r-pill); background: var(--c-primaria); color: var(--c-destaque); font-weight: 700; font-size: .9rem; }
.done__msg { width: 100%; text-align: left; white-space: pre-wrap; font-size: .8rem; padding: 14px; border-radius: var(--r-md); background: var(--c-superficie); box-shadow: var(--sh-card); max-height: 240px; overflow: auto; }

/* ------------------------------------------------------- informações */
.info { padding: 8px 16px 20px; display: grid; gap: 4px; }
.info__row { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--c-borda); }
.info__row:last-child { border-bottom: 0; }
.info__row .icon { color: var(--c-destaque-texto); margin-top: 2px; }
.info__row h3 { font-family: var(--f-texto); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-texto-suave); margin-bottom: 2px; }
.info__row p, .info__row li { font-size: .92rem; }
.info__row ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; }

/* --------------------------------------------------------------- toast */
.toast {
  position: fixed; z-index: 70; left: 50%; bottom: calc(92px + var(--safe-bottom));
  width: calc(min(var(--col), 100%) - 32px);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 16px; border-radius: 18px; text-align: center;
  background: var(--c-primaria-escura); color: var(--c-texto-claro); font-weight: 600; font-size: .92rem;
  border: 1px solid var(--c-destaque);
  box-shadow: var(--sh-float);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: transform var(--t) var(--ease), opacity var(--t);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast.toast--acao.is-on { pointer-events: auto; justify-content: space-between; text-align: left; }
.toast__msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast__btn { flex: none; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--c-destaque); color: var(--c-primaria-escura); font-weight: 700; font-size: .86rem; }
body.is-locked .toast { bottom: calc(96px + var(--safe-bottom)); }
@media (min-width: 720px) { body.is-locked .toast { bottom: 24px; } }

/* ------------------------------------------------------------ animações */
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slide-up { from { transform: translateY(120%); } to { transform: none; } }
@keyframes pulse { 0% { transform: scale(1); } 35% { transform: scale(1.05); } 70% { transform: scale(.98); } 100% { transform: scale(1); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .card, .cartbar, .cartbar.is-pulse, .done img { animation: none; }
}

/* ------------------------------------------- visualizador em tela cheia */
.viewer { position: fixed; inset: 0; z-index: 60; background: #0B2324; }
.viewer__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.viewer__track::-webkit-scrollbar { display: none; }
.viewer__slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; }
.viewer__slide img, .viewer__slide video { width: 100%; height: 100%; object-fit: contain; }
.viewer__slide .gallery__badge { bottom: calc(24px + var(--safe-bottom)); }
.viewer__bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + var(--safe-top)) 12px 12px 18px; background: linear-gradient(rgba(0,0,0,.45), transparent); pointer-events: none; }
.viewer__bar > * { pointer-events: auto; }
.viewer__count { color: #fff; font-weight: 700; font-size: .9rem; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.viewer__nav { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 0; background: rgba(255, 251, 245, .9); color: var(--c-primaria); font-size: 1.8rem; line-height: 1; display: none; place-items: center; }
.viewer__nav--prev { left: 16px; }
.viewer__nav--next { right: 16px; }
.viewer__nav:disabled { opacity: 0; pointer-events: none; }
@media (pointer: fine) { .viewer__nav { display: grid; } }
