.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

html {
  scroll-behavior: smooth;
}

#mobile-menu {
  background-color: color-mix(in oklab, var(--paper) 80%, transparent);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

#mobile-menu.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1 !important;
  height: calc(100dvh - 4rem) !important;
}

@media (min-width: 768px) {
  #mobile-menu.is-open {
    height: calc(100dvh - 5rem) !important;
  }
}

#cart-root[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

#cart-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

#cart-toast:not([hidden]) {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Mobile: garante que imagens em containers aspect-ratio apareçam */
.relative.aspect-square,
.relative.aspect-\[4\/5\] {
  position: relative;
  overflow: hidden;
}

.relative.aspect-square {
  aspect-ratio: 1 / 1;
}

.relative.aspect-\[4\/5\] {
  aspect-ratio: 4 / 5;
}

.relative.aspect-square > img,
.relative.aspect-\[4\/5\] > img,
.relative[class*="aspect-"] > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.relative.mx-auto.h-\[34vh\] {
  min-height: 220px;
}

/* Contador de itens ao lado do título "Sua sacola".
   A altura acompanha a linha do título (1lh), com teto de 22px — é o que mantém a
   bolha alinhada com o texto em qualquer tamanho de fonte. Com 1 dígito fica
   circular; com 2 ou mais o JS remove o data-maintain-ratio e ela vira pílula. */
.cart-bubble {
  --cart-padding: 0.2em;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 22px;
  height: min(1lh, 22px);
  min-width: 22px;
  min-width: min(1lh, 22px);
  padding: var(--cart-padding);
  border-radius: 9999px;
  line-height: normal;
  color: var(--ink);
}

.cart-bubble[data-maintain-ratio] {
  aspect-ratio: 1;
  padding: 0;
}

.cart-bubble__background {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: color-mix(in oklab, var(--ink) 10%, transparent);
}

.cart-bubble__text {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.625rem, 0.75em, 0.8125rem);
  font-weight: 600;
  line-height: 1;
}

/* Setas da galeria de imagens (páginas de produto) */
.gallery-shell {
  position: relative;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: -1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background-color: color-mix(in oklab, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink);
  box-shadow: 0 6px 18px -8px rgb(0 0 0 / 0.28);
  transition: background-color 0.2s, transform 0.2s, opacity 0.2s;
}

.gallery-arrow:hover {
  background-color: var(--paper);
}

.gallery-arrow:active {
  transform: scale(0.94);
}

.gallery-arrow--prev {
  left: 0.75rem;
}

.gallery-arrow--next {
  right: 0.75rem;
}

.gallery-arrow--next svg {
  transform: rotate(180deg);
}

@media (min-width: 1024px) {
  .gallery-arrow {
    width: 2.75rem;
    height: 2.75rem;
    margin-top: -1.375rem;
  }
}

/* Calcular frete e prazo (páginas de produto): o input é h-11 (44px) mas o btn-pill
   tem padding de 1rem, resultando em 52px. Como o input tem altura fixa, ele não
   acompanha o botão e ainda encosta no topo. Igualamos os dois. */
form:has(input[aria-label='Seu CEP']) {
  align-items: center;
}

form:has(input[aria-label='Seu CEP']) button[type='submit'] {
  height: 2.75rem;
  padding-top: 0;
  padding-bottom: 0;
}

/* Busca de rastreio: no mobile o form vira coluna, e aí o `flex-1` do input passa a
   valer no eixo VERTICAL (flex-basis: 0%), anulando o h-12 e deixando o campo com 19px.
   Acima de 640px o form é linha e o problema não existe. */
@media (max-width: 639px) {
  [data-rastreio-form] {
    gap: 0.625rem;
  }

  [data-rastreio-form] input {
    flex: 0 0 auto;
    height: 3rem;
  }
}

/* O card reserva 220px para o resultado da busca. No celular isso deixa metade do
   card vazio antes de qualquer consulta; o espaço volta quando há resultado. */
@media (max-width: 639px) {
  #dialog-tracking-widget,
  #dialog-tracking-widget > div {
    min-height: 0;
  }

  #dialog-tracking-widget:has([data-rastreio-result]) {
    min-height: 220px;
  }
}

/* Esteira de vídeos ("Abrir é só diversão") — decorativa, não interativa.
   Sem isto o toque chega ao <video> e o webview pode abri-lo em tela cheia.
   Os botões nunca tiveram ação de clique. */
.animate-marquee-reverse,
.animate-marquee-reverse button,
.animate-marquee-reverse video {
  pointer-events: none;
}

.animate-marquee-reverse video::-webkit-media-controls,
.animate-marquee-reverse video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}

/* ---- Card de produto do grid "Escolha o seu boom" ----
   Layout empilhado e centralizado (título, preços, botão full-width), igual à loja
   oficial. O botão é decorativo: o card inteiro é o link pra página do produto. */
.product-card__body {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0.625rem 0.8125rem;
  text-align: center;
}

.product-card__title {
  font-family: var(--font-satoshi), sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__was {
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  line-height: 1;
  color: var(--muted);
  text-decoration: line-through;
  white-space: nowrap;
}

.product-card__now {
  margin-top: 0.1875rem;
  font-family: var(--font-satoshi), sans-serif;
  font-size: 1.0625rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.product-card__installments {
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

.product-card__btn {
  margin-top: 0.625rem;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: var(--radius-pill);
  background-color: var(--ink);
  padding: 0.5625rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s;
}

.product-card__btn svg {
  flex: none;
}

/* mobile mostra "comprar"; a partir de md vira "comprar agora" */
.product-card__btn-lg {
  display: none;
}

.product-card:hover .product-card__btn {
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .product-card__body {
    padding: 1rem 1rem 1.125rem;
  }

  .product-card__title {
    font-size: 0.875rem;
  }

  .product-card__was {
    font-size: 0.75rem;
  }

  .product-card__now {
    font-size: 1.25rem;
  }

  .product-card__installments {
    font-size: 0.75rem;
  }

  .product-card__btn {
    margin-top: 0.875rem;
    padding: 0.6875rem 0.75rem;
    font-size: 0.6875rem;
  }

  .product-card__btn-lg {
    display: inline;
  }

  .product-card__btn-sm {
    display: none;
  }
}

/* ---- Caixa de envio do comprovante do Pix (checkout, passo 3) ----
   O Tailwind aqui é compilado: as variantes file:* e border-navy/40 não existem no
   bundle, então o botão do seletor de arquivo ficaria com a aparência padrão do
   navegador. Estas regras são escritas à mão pra fechar o visual com o resto do site. */
.comprovante-box--sent {
  border-color: color-mix(in oklab, var(--navy) 40%, transparent);
}

/* font-size:0 apaga o rótulo nativo ("Nenhum arquivo escolhido"), que truncava feio e
   contradizia o nome do arquivo — este é reexibido por .comprovante-filename, já que
   o render() recria o input vazio a cada redesenho. O botão recupera o tamanho abaixo. */
.comprovante-file {
  max-width: 100%;
  font-size: 0;
}

/* Secundário de propósito: o botão sólido preto é o "Enviar comprovante" logo abaixo.
   Dois botões cheios empilhados competiriam entre si e poluiriam o card. */
.comprovante-file::file-selector-button {
  margin-right: 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background-color: var(--paper);
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.comprovante-file:hover::file-selector-button {
  background-color: var(--off-white);
  border-color: var(--ink);
}

/* Nome de arquivo longo não pode estourar a largura do card. */
.comprovante-filename {
  overflow-wrap: anywhere;
}

/* Indicadores de etapa já concluída no checkout: viram botão de voltar.
   As classes cursor-pointer e hover:opacity-* não existem no Tailwind compilado
   deste projeto, então o afeto de clique é escrito à mão aqui. */
.step-voltar {
  cursor: pointer;
  transition: opacity 0.2s;
}

.step-voltar:hover {
  opacity: 0.65;
}

.step-voltar:active {
  opacity: 0.45;
}

header img[alt="MBOOM"] {
  display: block;
  max-height: 1.75rem;
  width: auto;
}

@media (min-width: 768px) {
  header img[alt="MBOOM"] {
    max-height: 1.85rem;
  }
}
