@import url("m3-refinements.css?v=20260815-1");
@import url("home-footer-trim.css?v=20260815-1");
@import url("nav-icon-human-hair.css?v=20260815-1");
@import url("m3-tablet-fix.css?v=20260815-1");
@import url("ux-followup.css?v=20260815-1");
@import url("ux-current-fixes.css?v=20260815-2");

/* Produtos M3E — fonte da superfície compacta aprovada em 2026-09-20. */
:root {
  --products-m3-primary: #8b5000;
  --products-m3-surface: #fef8f4;
  --products-m3-surface-container-high: #ede7e3;
  --products-m3-on-surface: #1f1b18;
  --products-m3-on-surface-variant: #4f453d;
  --products-m3-outline: #80756c;
  --products-m3-outline-variant: #d1c4ba;
}

.vit-app-intro {
  background: #fff;
}

.vit-app-search {
  background: #f2f2f2;
  border-color: rgba(28, 27, 26, 0.08);
}

.vit-app-search:hover {
  background: #ebebeb;
}

@media (max-width: 640px) {
  .site-view--products,
  .site-view--products :is(button, input) {
    font-family: "Roboto", Arial, sans-serif;
  }

  .site-view--products {
    display: flow-root;
    margin-top: 0;
    background: var(--products-m3-surface);
  }

  .vit-app-intro {
    margin: 0 calc(50% - 50vw) 22px;
    padding: 28px 16px 16px;
    border-radius: 28px;
    background: var(--products-m3-surface-container-high);
    color: var(--products-m3-on-surface);
  }

  .vit-app-heading { display: block; }
  .vit-app-heading .eyebrow,
  .vit-app-heading .vit-product-count { display: none; }
  .vit-app-heading h2 {
    margin: 0;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 28px !important;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.025em;
  }

  .vit-app-search {
    min-height: 56px !important;
    margin-top: 18px !important;
    padding-inline: 16px !important;
    border: 1px solid var(--products-m3-outline) !important;
    border-radius: 999px;
    background: var(--products-m3-surface) !important;
    color: var(--products-m3-on-surface);
    font-size: 15px;
    font-weight: 400;
    box-shadow: none;
  }
  .vit-app-search svg { color: var(--products-m3-on-surface); }
  .vit-app-search:hover { background: var(--products-m3-surface) !important; }

  .vit-app-categories {
    margin-top: 12px !important;
  }

  .vit-app-categories-head {
    height: 0;
    margin: 0;
    overflow: hidden;
  }

  .vit-app-categories-head h3 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .vit-app-category-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 76px;
    grid-template-rows: 1fr;
    gap: 8px;
    max-height: 104px;
    margin-inline: -16px;
    padding: 2px 16px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 16px;
  }

  .vit-app-category {
    width: 76px;
    min-width: 0;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
    touch-action: manipulation;
  }

  .vit-app-category-media {
    width: 68px;
    height: 68px;
    border: 2px solid var(--products-m3-surface);
    background: var(--products-m3-surface);
  }

  .vit-app-categories.is-expanded .vit-app-category-track {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 10px;
    max-height: none;
    margin-inline: 0;
    padding: 8px 0 12px;
    overflow: hidden;
  }

  .vit-app-categories.is-expanded .vit-app-category { width: 100%; }

  .vit-app-categories-toggle {
    display: flex;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 4px auto 0;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--products-m3-on-surface-variant);
    font: 500 12px/1 "Roboto", Arial, sans-serif;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color 200ms linear, transform 200ms cubic-bezier(.2, 0, 0, 1);
  }

  .vit-app-categories-toggle:hover { background: rgba(139, 80, 0, 0.08); }
  .vit-app-categories-toggle:active { transform: scale(.98); }
  .vit-app-categories-toggle:focus-visible { outline: 3px solid var(--products-m3-primary); outline-offset: 2px; }
  .vit-app-categories-toggle .material-symbols-rounded {
    font-size: 24px;
    transition: transform 300ms cubic-bezier(.2, 0, 0, 1);
  }
  .vit-app-categories.is-expanded .vit-app-categories-toggle .material-symbols-rounded { transform: rotate(180deg); }

  #produtos-mais-pedidos {
    padding-top: 20px;
  }

  #produtos-mais-pedidos .aisle-head {
    margin-bottom: 14px;
  }

  .mobile-bottom-nav > a:last-child > span:last-child {
    white-space: nowrap;
    font-size: 9.5px;
    letter-spacing: -0.025em;
  }
}

@media (min-width: 641px) {
  .vit-app-categories-toggle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vit-app-category-track,
  .vit-app-categories-toggle,
  .vit-app-categories-toggle .material-symbols-rounded { transition-duration: 0.01ms !important; }
}

@media (max-width: 720px) {
  .mobile-bottom-nav {
    height: calc(68px + env(safe-area-inset-bottom));
    padding: 2px 4px env(safe-area-inset-bottom);
  }

  .mobile-bottom-nav > a,
  .mobile-bottom-nav > button {
    min-height: 64px;
    justify-content: flex-start;
    gap: 1px;
    padding-top: 4px;
  }

  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .foot {
    padding-bottom: calc(28px + 68px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .mobile-bottom-nav > a:last-child > span:last-child {
    font-size: 9px;
  }
}

@media (max-width: 1099px) {
  .mobile-bottom-nav {
    inset-inline: 0 !important;
    bottom: 0 !important;
    box-sizing: border-box;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }

  /* Evita a linha clara de 1px que pode aparecer na composição entre o
     scroller e a camada fixa da barra inferior no Firefox Android. */
  .mobile-bottom-nav::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -2px;
    height: 2px;
    background: #1a1a1a;
    pointer-events: none;
  }
}

@media (max-width: 720px) {
  .mobile-bottom-nav {
    height: calc(68px + env(safe-area-inset-bottom)) !important;
    min-height: calc(68px + env(safe-area-inset-bottom));
    max-height: calc(68px + env(safe-area-inset-bottom));
  }
}

/*
  Firefox Android / toolbar no topo.

  O documento não rola, então a toolbar dinâmica do Fenix não desloca o
  GeckoView. O scroller passa a ser somente <main>, enquanto cabeçalho e bottom
  nav ficam fora dele. No Firefox Android o viewport do conteúdo já termina
  acima da navegação nativa do sistema; por isso NÃO somamos safe-area aqui —
  fazê-lo criava exatamente o grande espaço preto visto no aparelho real.
*/
@media (max-width: 1099px) {
  html.firefox-android-stable-scroll,
  html.firefox-android-stable-scroll body {
    width: 100%;
    height: 100%;
    overflow: hidden !important;
  }

  html.firefox-android-stable-scroll body {
    padding-bottom: 0 !important;
  }

  html.firefox-android-stable-scroll #root {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  html.firefox-android-stable-scroll .nav {
    position: relative !important;
    top: auto !important;
    flex: 0 0 auto;
  }

  html.firefox-android-stable-scroll #conteudo {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 68px;
    scroll-padding-bottom: 68px;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  html.firefox-android-stable-scroll #conteudo [id] {
    scroll-margin-top: 0;
  }

  html.firefox-android-stable-scroll .mobile-bottom-nav {
    position: fixed !important;
    inset-inline: 0 !important;
    bottom: 0 !important;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    padding: 2px 4px 0 !important;
    transform: none !important;
  }

  html.firefox-android-stable-scroll .foot {
    padding-bottom: 28px !important;
  }
}
