/* Monkey Tech — tokens */
:root {
  --aluminio: #F2F2F0;   /* fundo da página */
  --papel: #FFFFFF;      /* superfícies */
  --grafite: #1C1C1E;    /* texto e botões principais */
  --pedra: #74747A;      /* texto secundário */
  --linha: #E1E1DE;      /* divisões e contornos */
  --whats: #128C4A;      /* só o envio do pedido */
  --alerta: #B42318;

  --fonte: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-grande: 28px;
  --r-medio: 18px;
  --r-pilula: 999px;
  --largura: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--aluminio);
  color: var(--grafite);
  font-family: var(--fonte);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 2px solid var(--grafite); outline-offset: 3px; border-radius: 6px; }

.pular { position: absolute; left: -999px; top: 8px; background: var(--grafite); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.pular:focus { left: 8px; }

/* Logo do cliente: arte quadrada com fundo preto, recortada na faixa do nome */
.logo { display: block; flex-shrink: 0; height: 44px; aspect-ratio: 2.2; border-radius: 12px; overflow: hidden; background: #000; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo--rodape { height: 76px; border-radius: 18px; margin-bottom: 16px; }

/* Marca */
.marca { font-weight: 700; font-size: 20px; letter-spacing: -0.04em; text-decoration: none; }
.marca span { font-weight: 400; color: var(--pedra); margin-left: 1px; }

/* Topo */
.topo {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--aluminio) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topo.rolou { border-bottom-color: var(--linha); }
.topo__in { max-width: var(--largura); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 24px; }
.topo__nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; }
.topo__nav a { text-decoration: none; color: var(--pedra); }
.topo__nav a:hover { color: var(--grafite); }
.sacola-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: var(--papel); display: grid; place-items: center; cursor: pointer;
}
.sacola-btn svg { width: 22px; height: 22px; }
.sacola-btn__qtd {
  position: absolute; top: -2px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pilula); background: var(--grafite); color: #fff;
  font-size: 12px; font-weight: 600; display: grid; place-items: center;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r-pilula);
  font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn--escuro { background: var(--grafite); color: #fff; }
.btn--escuro:hover { background: #000; }
.btn--linha { background: transparent; border-color: #C9C9C5; }
.btn--linha:hover { background: var(--papel); }
.btn--whats { background: var(--whats); color: #fff; width: 100%; min-height: 54px; }
.btn--whats:hover { background: #0E7A40; }
.btn--whats svg { width: 20px; height: 20px; }

/* Hero */
.hero {
  max-width: var(--largura); margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
  overflow-x: clip;
}
.hero h1 { font-size: clamp(44px, 7.4vw, 92px); letter-spacing: -0.055em; line-height: .98; max-width: 9.5ch; }
.hero p { font-size: clamp(17px, 1.6vw, 20px); color: var(--pedra); max-width: 34ch; margin: 24px 0 32px; }
.hero__acoes { display: flex; flex-wrap: wrap; gap: 12px; }

/* Leque: o momento marcante da página */
.leque { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 520px; justify-self: center; cursor: pointer; }
.leque__carta {
  position: absolute; inset: 12% 16%; border-radius: var(--r-grande); overflow: hidden;
  background: var(--papel); box-shadow: 0 30px 60px -30px rgba(28, 28, 30, .45), 0 2px 6px rgba(28, 28, 30, .08);
  transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .5s;
  transform: rotate(0) translateX(0);
}
.leque__carta img { width: 100%; height: 100%; object-fit: cover; }
.leque.aberto .leque__carta[data-pos="0"] { transform: translateX(-30%) rotate(-11deg) scale(.86); z-index: 1; }
.leque.aberto .leque__carta[data-pos="1"] { transform: translateX(30%) rotate(11deg) scale(.86); z-index: 2; }
.leque.aberto .leque__carta[data-pos="2"] { transform: rotate(0) translateY(-2%); z-index: 3; }
.leque { margin-bottom: 28px; }
.leque__dica { position: absolute; bottom: -28px; margin: 0; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--pedra); }

/* Catálogo */
.catalogo { max-width: var(--largura); margin: 0 auto; padding: 24px var(--gutter) 80px; }
.catalogo__cab { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.catalogo h2, .passos h2 { font-size: clamp(32px, 4vw, 48px); }
.filtros { min-width: 0; display: flex; gap: 4px; padding: 4px; background: #E6E6E3; border-radius: var(--r-pilula); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.filtros::-webkit-scrollbar { display: none; }
.filtros button {
  border: 0; background: transparent; padding: 8px 16px; border-radius: var(--r-pilula);
  font-size: 15px; color: var(--pedra); cursor: pointer; white-space: nowrap;
}
.filtros button[aria-selected="true"] { background: var(--papel); color: var(--grafite); box-shadow: 0 1px 3px rgba(28, 28, 30, .12); }

.grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.produto { background: var(--papel); border-radius: var(--r-grande); overflow: hidden; display: flex; flex-direction: column; }
.produto__foto { position: relative; border: 0; padding: 0; background: #EDEDEA; cursor: zoom-in; aspect-ratio: 1 / 1; }
.produto__foto img { width: 100%; height: 100%; object-fit: cover; }
.produto__selo {
  position: absolute; top: 14px; left: 14px; padding: 5px 12px; border-radius: var(--r-pilula);
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); font-size: 13px; font-weight: 500;
}
.produto__selo--esgotado { background: var(--grafite); color: #fff; }
.produto__info { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.produto__info h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; }
.produto__detalhes { margin: 0; color: var(--pedra); font-size: 15px; }
.produto__rodape { margin-top: auto; padding-top: 18px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.preco { display: flex; flex-direction: column; }
.preco del { color: var(--pedra); font-size: 14px; }
.preco strong { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.preco small { color: var(--pedra); font-size: 13px; }
.produto.esgotado .produto__foto img { filter: grayscale(.6); opacity: .7; }

.add { min-height: 42px; padding: 0 18px; font-size: 15px; flex-shrink: 0; }
.add:disabled { background: #E6E6E3; color: var(--pedra); cursor: not-allowed; }
.passo { display: inline-flex; align-items: center; background: var(--aluminio); border-radius: var(--r-pilula); flex-shrink: 0; }
.passo button { width: 40px; height: 42px; border: 0; background: transparent; font-size: 20px; cursor: pointer; border-radius: var(--r-pilula); }
.passo button:hover { background: #E6E6E3; }
.passo output { min-width: 22px; text-align: center; font-weight: 600; }

.grade__vazia { grid-column: 1 / -1; padding: 60px 0; text-align: center; color: var(--pedra); }

/* Como comprar — é de fato uma sequência, por isso numerada */
.passos { max-width: var(--largura); margin: 0 auto; padding: 0 var(--gutter) 96px; }
.passos ol { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: passo; }
.passos li { counter-increment: passo; border-top: 1px solid #C9C9C5; padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.passos li::before { content: counter(passo); font-size: 15px; color: var(--pedra); }
.passos strong { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.passos span { color: var(--pedra); max-width: 32ch; }

/* Rodapé */
.rodape { background: var(--papel); }
.rodape__in { max-width: var(--largura); margin: 0 auto; padding: 48px var(--gutter) 120px; color: var(--pedra); font-size: 15px; }
.rodape__in p { margin: 0 0 8px; }
.marca--rodape { color: var(--grafite); margin-bottom: 12px !important; }
.rodape__links { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px !important; }
.rodape__links a { color: var(--grafite); text-decoration: none; }
.rodape__links a:hover { text-decoration: underline; }

/* Barra flutuante */
.barra-sacola {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 15;
  display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 22px; border: 0; cursor: pointer;
  background: var(--grafite); color: #fff; border-radius: var(--r-pilula);
  box-shadow: 0 16px 40px -12px rgba(28, 28, 30, .55); white-space: nowrap; max-width: calc(100vw - 32px);
  animation: sobe .35s cubic-bezier(.2, .8, .2, 1);
}
.barra-sacola span:first-child { color: #B8B8BC; font-size: 15px; }
.barra-sacola__acao { background: #fff; color: var(--grafite); padding: 10px 18px; border-radius: var(--r-pilula); font-weight: 500; font-size: 15px; }
@keyframes sobe { from { transform: translate(-50%, 140%); } }

/* Diálogos */
dialog { border: 0; padding: 0; color: var(--grafite); }
dialog::backdrop { background: rgba(28, 28, 30, .4); backdrop-filter: blur(4px); }

.sacola {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(440px, 100vw);
  background: var(--papel); flex-direction: column;
}
.sacola[open] { display: flex; animation: entraLado .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes entraLado { from { transform: translateX(100%); } }
.sacola__cab { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--linha); }
.sacola__cab h2 { font-size: 24px; }
.sacola__corpo { overflow-y: auto; overflow-x: hidden; padding: 8px 24px 28px; flex: 1; }
.sacola__vazia { text-align: center; padding: 48px 0; color: var(--pedra); }

.icone-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--aluminio); display: grid; place-items: center; cursor: pointer; }
.icone-btn svg { width: 18px; height: 18px; }

.itens { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--linha); }
.item img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.item h3 { font-size: 16px; letter-spacing: -0.01em; line-height: 1.25; }
.item p { margin: 2px 0 0; font-size: 14px; color: var(--pedra); }
.item .passo { background: var(--aluminio); }
.item .passo button { width: 34px; height: 36px; font-size: 18px; }

.pedido { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; }
.pedido__total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; }
.pedido__total strong { font-size: 26px; letter-spacing: -0.02em; }
.pedido__nota { margin: -6px 0 0; font-size: 13px; color: var(--pedra); text-align: center; }
.campo { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.campo > span, .campo legend { font-size: 14px; font-weight: 500; padding: 0; }
.campo em { font-style: normal; color: var(--pedra); font-weight: 400; }
.campo input, .campo textarea, .campo select {
  width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--linha); background: var(--aluminio);
  font-size: 16px; resize: vertical;
}
.campo input:focus, .campo textarea:focus, .campo select:focus { outline: 2px solid var(--grafite); outline-offset: 0; background: var(--papel); }
.campo [aria-invalid="true"] { border-color: var(--alerta); }
.opcoes { display: flex; gap: 8px; flex-wrap: wrap; }
.opcoes label { flex: 1; }
.opcoes input { position: absolute; opacity: 0; pointer-events: none; }
.opcoes span { display: block; text-align: center; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--linha); cursor: pointer; font-size: 15px; }
.opcoes input:checked + span { border-color: var(--grafite); background: var(--grafite); color: #fff; }
.opcoes input:focus-visible + span { outline: 2px solid var(--grafite); outline-offset: 2px; }
.erro { margin: 0; color: var(--alerta); font-size: 14px; }

.zoom { background: transparent; max-width: min(92vw, 760px); max-height: 92dvh; overflow: visible; }
.zoom img { width: 100%; max-height: 88dvh; object-fit: contain; border-radius: var(--r-grande); }
.zoom .icone-btn { position: absolute; top: -12px; right: -12px; background: var(--papel); box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }

.aviso {
  position: fixed; top: 76px; left: 50%; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  background: var(--grafite); color: #fff; padding: 10px 18px; border-radius: var(--r-pilula); font-size: 15px; z-index: 40;
  transition: opacity .2s, transform .2s;
}
.aviso.ativo { opacity: 1; transform: translate(-50%, 0); }

/* Responsivo */
@media (max-width: 960px) {
  .grade { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .leque { max-width: 420px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topo__nav { display: none; }
  .sacola-btn { margin-left: auto; }
  .grade { grid-template-columns: 1fr; gap: 16px; }
  .passos ol { grid-template-columns: 1fr; }
  .leque { max-width: 340px; }
  .sacola { width: 100vw; margin: auto 0 0; height: 92dvh; border-radius: var(--r-grande) var(--r-grande) 0 0; }
  .sacola[open] { animation-name: entraBaixo; }
  .filtros { width: 100%; }
  .barra-sacola { left: 16px; width: calc(100% - 32px); transform: none; justify-content: space-between; }
  .barra-sacola span:first-child { display: none; }
  @keyframes sobe { from { transform: translateY(140%); } }
}
@keyframes entraBaixo { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
