.botao-icone {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tinta);
  cursor: pointer;
  transition: background-color .2s var(--suave);
}

.botao-icone:hover { background: var(--areia); }
.botao-pequeno { min-height: 44px; padding: 0 16px; font-size: 14px; gap: 8px; }
.botao-pequeno .ico { width: 18px; height: 18px; }
.botao-texto { background: none; color: var(--tinta); text-decoration: underline; text-underline-offset: 3px; padding: 0 8px; }
.botao-texto:hover { color: var(--terracota-forte); }

.fav-link-texto { display: none; }

select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--areia-2);
  border-radius: 12px;
  background: var(--branco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23474D57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: var(--tinta);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s var(--suave);
}

select:hover { border-color: var(--tinta-3); }

.segmento {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--areia);
}

.segmento input { position: absolute; opacity: 0; pointer-events: none; }

.segmento label {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--tinta-2);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s var(--suave), color .2s var(--suave), box-shadow .2s var(--suave);
}

.segmento input:checked + label { background: var(--branco); color: var(--tinta); box-shadow: 0 1px 3px rgba(20, 24, 31, .12); }
.segmento input:focus-visible + label { outline: 3px solid var(--terracota); outline-offset: 2px; }

.vazio-icone {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--terracota-suave);
  color: var(--terracota-forte);
}

.vazio-icone .ico { width: 26px; height: 26px; }

.gaveta {
  width: min(420px, 100%);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--fundo);
  color: var(--tinta);
  box-shadow: -20px 0 50px rgba(20, 24, 31, .15);
}

.gaveta::backdrop { background: rgba(20, 24, 31, .4); }
.gaveta[open] { animation: gaveta-entra .32s var(--suave); }

@keyframes gaveta-entra {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.gaveta-caixa { display: flex; flex-direction: column; height: 100%; }

.gaveta-topo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 20px;
  border-bottom: 1px solid var(--linha);
}

.gaveta-topo h2 { font-size: 20px; }
.gaveta-total { margin-right: auto; color: var(--tinta-3); font-size: 14px; }
.gaveta-corpo { flex: 1; overflow-y: auto; padding: 8px 20px 24px; overscroll-behavior: contain; }

.fav-item {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr 44px;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--linha);
}

.fav-item img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; }
.fav-item-texto { min-width: 0; }
.fav-item-preco { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.fav-item-preco small, .cartao-preco small, .compacto-preco small { font-size: .72em; font-weight: 600; color: var(--tinta-3); margin-left: 2px; }
.fav-item a { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; }
.fav-item a::after { content: ''; position: absolute; inset: 0; }
.fav-item-bairro { margin-top: 2px; color: var(--tinta-3); font-size: 13px; }

.fav-item-tirar {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--tinta-3);
  cursor: pointer;
}

.fav-item-tirar:hover { background: var(--areia); color: var(--tinta); }
.fav-item-tirar .ico { width: 18px; height: 18px; }
.gaveta-acao { width: 100%; margin-top: 20px; }

.gaveta-vazia { display: grid; justify-items: center; gap: 10px; padding: 56px 12px; text-align: center; color: var(--tinta-2); }
.gaveta-vazia .botao { margin-top: 10px; }

@media (min-width: 900px) {
  .fav-link { width: auto; padding: 0 14px; gap: 8px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; }
  .fav-link-texto { display: inline; }
  .fav-link .contador { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  .gaveta[open] { animation: none; }
}

@keyframes surge {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
