/* =========================================================================
   home-mrcd-v3.css  •  Multigiro Supermercado
   Redesign da HOME (tema claro, full-width, seções de venda e cards turbinados)

   Carregado por ÚLTIMO no <head> do index.html, portanto sobrescreve os
   estilos antigos (base/layout/components) onde for necessário.
   Mantém compatibilidade com todo o JS existente (carrinho, modais, etc).
   ========================================================================= */

/* ---------------------------------------------------------------------------
   1. TOKENS DE MARCA / TEMA
   - Tema CLARO é o padrão. O tema escuro continua funcionando pelo
     atributo html[data-theme="dark"].
--------------------------------------------------------------------------- */
:root{
  /* Marca: amarelo/dourado Multigiro */
  --mg-yellow:   #FFC20E;
  --mg-yellow-2: #F4A900;
  --mg-ink:      #1a1d24;   /* texto principal */
  --mg-ink-soft: #5b6470;   /* texto secundário */

  /* Cores de apoio (venda) */
  --mg-red:    #E53935;     /* descontos */
  --mg-green:  #1e9e54;     /* economia / frete grátis */
  --mg-blue:   #0d6efd;

  /* Superfícies (tema claro) */
  --mg-bg:      #f4f6fb;
  --mg-surface: #ffffff;
  --mg-line:    #e6e8ef;
  --mg-shadow:  0 8px 28px rgba(20,30,55,0.08);
  --mg-shadow-sm: 0 2px 10px rgba(20,30,55,0.06);

  /* Largura útil (full-width controlado) */
  --mg-wrap: min(1480px, 100% - 40px);

  /* Reaproveita variáveis do projeto antigo p/ os componentes herdados */
  --brand:  var(--mg-yellow);
  --brand2: var(--mg-yellow-2);
}

/* TEMA ESCURO (opcional, pelo botão de tema) */
html[data-theme="dark"]{
  --mg-bg:      #0b0f14;
  --mg-surface: #11161e;
  --mg-line:    rgba(255,255,255,0.10);
  --mg-ink:     #e8eef6;
  --mg-ink-soft:rgba(232,238,246,0.70);
  --mg-shadow:  0 14px 40px rgba(0,0,0,0.45);
  --mg-shadow-sm: 0 2px 12px rgba(0,0,0,0.40);
}

/* Fundo do site limpo (sobrescreve o gradiente escuro do base.css) */
body{
  background: var(--mg-bg) !important;
  color: var(--mg-ink);
}
html[data-theme="dark"] body{
  background:
    radial-gradient(900px 280px at 50% -40px, rgba(255,194,14,0.10), transparent 70%),
    var(--mg-bg) !important;
}

/* Corrige o bug do menu inferior fixo "subindo" ao puxar o fim da página:
   1) overscroll-behavior trava o efeito elástico (rubber-band) que arrasta
      o menu fixo e mostra um vão preto no celular;
   2) o fundo do <html> passa a acompanhar o tema, para que qualquer área
      exposta nunca apareça preta. */
html{
  background: var(--mg-bg) !important;
  overscroll-behavior: none;
}
body{
  overscroll-behavior: none;
  /* trava o "bounce" também via toque no iOS/Android */
  overscroll-behavior-y: none;
}

/* Container mais largo para aproveitar a tela */
.container{ width: var(--mg-wrap) !important; }

/* Helper de acessibilidade: oculta visualmente mas mantém p/ leitores de tela */
.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Helper: faixa que ocupa 100% da largura (full-bleed) */
.full-bleed{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ---------------------------------------------------------------------------
   2. TOP BAR DE UTILIDADES (diferenciais)
--------------------------------------------------------------------------- */
.utilbar{
  background: linear-gradient(90deg, var(--mg-yellow), var(--mg-yellow-2));
  color: #2a1d00;
  font-weight: 700;
  font-size: 13px;
}
.utilbar__inner{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
  padding: 7px 0;
}
.utilbar__item{ display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.utilbar__item svg{ width: 16px; height: 16px; flex: 0 0 auto; }
.utilbar a{ color: inherit; text-decoration: underline; }

@media (max-width: 760px){
  .utilbar__inner{ gap: 14px; font-size: 11.5px; padding: 6px 12px; }
  /* esconde os 2 itens menos essenciais no celular */
  .utilbar__item--opt{ display: none; }
}

/* ---------------------------------------------------------------------------
   3. HEADER (logo • busca grande • conta/carrinho/WhatsApp)
--------------------------------------------------------------------------- */
.header{
  position: sticky;
  top: 0;
  z-index: 30;   /* abaixo do backdrop(40)/drawer(50)/modal(60) p/ não cobrir o carrinho */
  background: var(--mg-surface) !important;
  border-bottom: 1px solid var(--mg-line);
  backdrop-filter: none;
  box-shadow: var(--mg-shadow-sm);
}
.header__inner{
  display: grid !important;
  grid-template-columns: auto minmax(0,1fr) auto !important;
  grid-template-areas: "brand search actions" !important;
  align-items: center;
  gap: 14px 20px !important;
  padding: 12px 0 !important;
}
.brand{ grid-area: brand; display: flex !important; align-items: center; gap: 6px !important; }
.brand__mascot{ width: 70px !important; }
.brand__wordmark{ width: min(140px, 40vw) !important; }
.brand__tag{ font-size: 11px; color: var(--mg-ink-soft); }

/* Busca dominante e centralizada */
.search{ grid-area: search; max-width: 720px; width: 100%; margin: 0 auto; }
.search__input{
  background: var(--mg-bg) !important;
  border: 2px solid var(--mg-line) !important;
  color: var(--mg-ink) !important;
  padding: 14px 48px 14px 18px !important;
  font-size: 15px;
}
.search__input::placeholder{ color: var(--mg-ink-soft); }
.search__input:focus{
  border-color: var(--mg-yellow) !important;
  box-shadow: 0 0 0 4px rgba(255,194,14,0.18) !important;
}
.search__clear{ color: var(--mg-ink-soft); }

/* Ações à direita */
.actions{
  grid-area: actions;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px !important;
}
.actions .btn{
  background: var(--mg-bg);
  border: 1px solid var(--mg-line);
  color: var(--mg-ink);
  white-space: nowrap;
}
.actions .btn:hover{ background: #eef1f7; }
html[data-theme="dark"] .actions .btn:hover{ background: rgba(255,255,255,0.08); }
.actions .btn--primary{
  background: linear-gradient(135deg, var(--mg-yellow), var(--mg-yellow-2)) !important;
  color: #2a1d00 !important;
  border: none !important;
  font-weight: 800;
}
.actions .pill{
  background: var(--mg-red);
  border: none;
  color: #fff;
}

/* Tablet/Mobile: marca + ações em cima; busca ocupa a linha inteira embaixo */
@media (max-width: 980px){
  .header__inner{
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "brand actions"
      "search search" !important;
    gap: 10px !important;
    padding: 10px 0 !important;
  }
  .search{ max-width: none !important; margin: 0 !important; }
}
@media (max-width: 520px){
  .brand__mascot{ width: 36px !important; }
  .brand__wordmark{ width: 92px !important; }
  .brand__tag{ display: none; }
  .header__inner{ gap: 6px !important; }
  .actions{ gap: 4px !important; }
  .actions .btn{ padding: 7px 8px !important; min-height: 34px; font-size: 13px; }
  .actions .btn--offer{ padding: 7px 8px !important; }
  .actions .btn--cart{ padding: 7px 9px !important; }
  .btn--offer__pct{ width: 18px; height: 18px; font-size: 11px; }
  .search__input{ padding: 12px 42px 12px 14px !important; font-size: 14px; }
}
/* telas estreitas: reduz marca p/ sobrar espaço aos botões */
@media (max-width: 430px){
  .brand__mascot{ width: 30px !important; }
  .brand__wordmark{ width: 80px !important; }
  .actions{ gap: 3px !important; }
  .actions .btn{ padding: 6px 7px !important; }
  .actions .btn--offer{ padding: 6px 7px !important; }
  .actions .btn--cart{ padding: 6px 8px !important; }
}
/* telas bem estreitas: esconde o mascote p/ sobrar espaço */
@media (max-width: 380px){
  .brand__mascot{ display: none !important; }
  .brand__wordmark{ width: 88px !important; }
  .actions .btn{ padding: 6px 6px !important; }
}

/* ---------------------------------------------------------------------------
   4. MENU DE DEPARTAMENTOS (barra horizontal)
--------------------------------------------------------------------------- */
.dept{
  background: var(--mg-ink);
  position: relative;    /* não fixo: evita colidir com o header sticky */
  z-index: 20;           /* abaixo do header(30) e do backdrop(40) */
}
html[data-theme="dark"] .dept{ background: #060a0f; }
.dept__inner{
  display: flex;
  gap: 4px;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.dept__inner::-webkit-scrollbar{ display: none; }
.dept__link{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  color: #f3f4f6;
  font-weight: 700;
  font-size: 14px;
  border-radius: 10px;
  white-space: nowrap;
}
.dept__link:hover{ background: rgba(255,255,255,0.12); }
.dept__link--hot{ color: var(--mg-yellow); }

/* ---------------------------------------------------------------------------
   5. BANNER PRINCIPAL (reaproveita o carrossel .promo) + FAIXA DE MARCAS
--------------------------------------------------------------------------- */
.main{ padding: 0 0 48px !important; }

.hero{
  display: block !important;
  margin: 18px auto 6px !important;
}
.hero__card{
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}
.promo__slide{ border: 0 !important; background: transparent !important; }
.promo__slide img{
  height: auto !important;
  max-height: 420px;
  object-fit: contain !important;
  border-radius: 18px;
}
@media (max-width: 520px){
  .promo__slide img{ max-height: 200px; }
}

/* Faixa de marcas vendidas */
.brands{
  background: var(--mg-surface);
  border-top: 1px solid var(--mg-line);
  border-bottom: 1px solid var(--mg-line);
  margin-top: 14px;
}
.brands__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 0;
}
.brands__label{ font-weight: 800; color: var(--mg-ink-soft); font-size: 13px; }
.brands__list{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: center;
}
/* "logo" placeholder em pílula — troque por <img> da marca real */
.brand-chip{
  border: 1px solid var(--mg-line);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 800;
  font-size: 14px;
  color: var(--mg-ink);
  background: var(--mg-bg);
  filter: grayscale(1) opacity(0.75);
  transition: filter .2s ease, transform .2s ease;
}
.brand-chip:hover{ filter: none; transform: translateY(-2px); }

/* ---------------------------------------------------------------------------
   6. PÍLULAS DE BENEFÍCIOS (4 blocos)
--------------------------------------------------------------------------- */
.benefits{
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin: 22px auto;
}
.benefit{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--mg-surface);
  border: 1px solid var(--mg-line);
  border-radius: 16px;
  box-shadow: var(--mg-shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.benefit:hover{ transform: translateY(-3px); box-shadow: var(--mg-shadow); }
.benefit__icon{
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255,194,14,0.16);
  color: var(--mg-yellow-2);
}
.benefit__icon svg{ width: 24px; height: 24px; }
.benefit__title{ font-weight: 800; font-size: 15px; }
.benefit__sub{ font-size: 12.5px; color: var(--mg-ink-soft); margin-top: 2px; }

@media (max-width: 900px){ .benefits{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 420px){ .benefits{ grid-template-columns: 1fr; } }

/* No TEMA CLARO: cards de benefício com fundo grafite e texto dourado */
html[data-theme="light"] .benefit{
  background: #3f454e;                 /* grafite claro */
  border-color: #4a515b;
  box-shadow: 0 6px 18px rgba(20,30,55,0.12);
}
html[data-theme="light"] .benefit__title{ color: var(--mg-yellow); }
html[data-theme="light"] .benefit__sub{ color: rgba(255,194,14,0.78); }
html[data-theme="light"] .benefit__icon{
  background: rgba(255,194,14,0.18);
  color: var(--mg-yellow);
}

/* ---------------------------------------------------------------------------
   7. FAIXA DE FRETE / ENTREGA
--------------------------------------------------------------------------- */
.shipband{
  background: linear-gradient(90deg, var(--mg-green), #16a34a);
  color: #fff;
  margin: 8px 0 26px;
}
.shipband__inner{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px;
  text-align: center;
  font-weight: 700;
  flex-wrap: wrap;
}
.shipband strong{ font-weight: 900; }
.shipband svg{ width: 22px; height: 22px; }

/* ---------------------------------------------------------------------------
   8. TÍTULOS DE SEÇÃO
--------------------------------------------------------------------------- */
.sec{ margin: 30px auto; }
.sec__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.sec__title{
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  position: relative;
  padding-left: 14px;
}
.sec__title::before{
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 5px; border-radius: 4px;
  background: linear-gradient(var(--mg-yellow), var(--mg-yellow-2));
}
.sec__link{ font-weight: 800; color: var(--mg-yellow-2); font-size: 14px; white-space: nowrap; }
.sec__link:hover{ text-decoration: underline; }
/* quando o "Ver todos" é um <button> (ex.: na categoria) */
.sec__link--btn{ border: 0; background: none; cursor: pointer; padding: 0; }

@media (max-width: 520px){ .sec__title{ font-size: 19px; } }

/* ---------------------------------------------------------------------------
   9. CATEGORIAS VISUAIS (blocos grandes com apelo de desconto)
--------------------------------------------------------------------------- */
.cats{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
.cat{
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 150px;
  padding: 16px;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  box-shadow: var(--mg-shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cat:hover{ transform: translateY(-3px); box-shadow: var(--mg-shadow); }

/* FOTO do departamento (admin): a imagem PREENCHE o card inteiro, qualquer
   tamanho/proporção, sem repetir. Centralizada, então o corte (quando há) é
   o mínimo e equilibrado. O texto continua legível pelo gradiente abaixo. */
.cat__photo{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
/* imagem sem filtro escuro (mostra a foto na cor original). Mantemos só um
   leve gradiente na base para o nome continuar legível sobre a imagem. */
.cat--photo::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0) 45%);
  z-index: 1;
  pointer-events: none;
}
.cat--photo .cat__name,
.cat--photo .cat__off{ position: relative; z-index: 2; }
/* ícone volta a aparecer por cima da imagem (canto superior) */
.cat--photo .cat__ico{ z-index: 2; }

.cat__emoji{ position: absolute; top: 10px; right: 14px; font-size: 44px; opacity: .9; }
.cat__name{ font-weight: 900; font-size: 18px; text-shadow: 0 2px 4px rgba(0,0,0,.85), 0 1px 12px rgba(0,0,0,.55); }
.cat__off{
  display: inline-block;
  margin-top: 6px;
  width: fit-content;
  background: rgba(0,0,0,0.28);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
/* Cores por departamento (troque por foto: adicione background-image inline) */
.cat--bebidas  { background: linear-gradient(135deg,#0ea5e9,#0369a1); }
.cat--limpeza  { background: linear-gradient(135deg,#22c55e,#15803d); }
.cat--hortifruti{background: linear-gradient(135deg,#84cc16,#4d7c0f); }
.cat--acougue  { background: linear-gradient(135deg,#ef4444,#991b1b); }
.cat--mercearia{ background: linear-gradient(135deg,#f59e0b,#b45309); }
.cat--higiene  { background: linear-gradient(135deg,#8b5cf6,#5b21b6); }
.cat--padaria  { background: linear-gradient(135deg,#d97706,#92400e); }
.cat--congelados{background: linear-gradient(135deg,#06b6d4,#0e7490); }
.cat--frios-laticinios{ background: linear-gradient(135deg,#fbbf24,#a16207); }
.cat--doces    { background: linear-gradient(135deg,#ec4899,#9d174d); }
.cat--outros   { background: linear-gradient(135deg,#64748b,#334155); }

@media (max-width: 900px){ .cats{ grid-template-columns: repeat(2,1fr); } }
/* no CELULAR: 1 departamento por linha (cards largos), não 2 quadradinhos */
@media (max-width: 560px){ .cats{ grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   10. COMPRE POR OCASIÃO
--------------------------------------------------------------------------- */
.occasions{
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 12px;
}
.occasion{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--mg-surface);
  border: 1px solid var(--mg-line);
  border-radius: 16px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--mg-ink);
  transition: transform .15s ease, border-color .15s ease;
}
.occasion:hover{ transform: translateY(-3px); border-color: var(--mg-yellow); }
.occasion__emoji{ font-size: 30px; }

@media (max-width: 760px){ .occasions{ grid-template-columns: repeat(3,1fr); } }
@media (max-width: 420px){ .occasions{ grid-template-columns: repeat(2,1fr); } }

/* ---------------------------------------------------------------------------
   11. CONTROLES (ordenar / somente ofertas)  — herdados, só ajuste de cor
--------------------------------------------------------------------------- */
.controls{ padding: 6px 0 4px !important; }
.section-title{ font-size: 22px; }
.select__control, .toggle{ color: var(--mg-ink); }
.select__control{ background: var(--mg-surface); border-color: var(--mg-line); }

/* ===========================================================================
   12. CARDS DE PRODUTO  (PRIORIDADE MÁXIMA)
   Estrutura gerada por js/ui-mrcd-v3.js:
     .card > .card__media (badge desconto + img + tag unidade)
           > .card__body  (nome, meta, selo economia)
           > .card__bottom (preços + ação)
=========================================================================== */
.catalog-section .grid,
.grid{
  grid-template-columns: repeat(5, minmax(0,1fr)) !important; /* mais produtos por linha em telas largas */
  gap: 16px !important;
}
@media (max-width: 1200px){ .catalog-section .grid, .grid{ grid-template-columns: repeat(4,1fr) !important; } }
@media (max-width: 900px){  .catalog-section .grid, .grid{ grid-template-columns: repeat(3,1fr) !important; } }
@media (max-width: 600px){  .catalog-section .grid, .grid{ grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; } }

.card{
  background: var(--mg-surface) !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 16px !important;
  box-shadow: var(--mg-shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
  min-height: 0 !important;
}
.card:hover{
  transform: translateY(-4px);
  box-shadow: var(--mg-shadow);
  border-color: rgba(255,194,14,0.6) !important;
}

/* Mídia (imagem) */
.card__media{
  position: relative;
  height: 150px !important;
  background: #fff !important;
  padding: 10px;
  cursor: pointer;
}
@media (max-width: 900px){ .card__media{ height: 140px !important; } }
html[data-theme="dark"] .card__media{ background: #0e131a !important; }
.card__media img,
.card img,
.card__media img.card__img{
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;  /* produto inteiro, sem cortar */
}

/* Badge de desconto (canto superior esquerdo) */
.card__discount{
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  background: var(--mg-red);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  padding: 5px 9px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(229,57,53,0.35);
}
/* Selo OFERTA (quando não há % de desconto calculável) */
.card__flag{
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  background: linear-gradient(135deg, var(--mg-yellow), var(--mg-yellow-2));
  color: #2a1d00;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .04em;
  padding: 5px 9px;
  border-radius: 10px;
}
/* Tag de unidade/peso (canto inferior direito da imagem) */
.card__unit{
  position: absolute;
  bottom: 8px; right: 8px;
  z-index: 2;
  background: rgba(20,24,32,0.85);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .03em;
  padding: 4px 8px;
  border-radius: 8px;
}

/* Corpo */
.card__body{ padding: 12px 12px 6px !important; gap: 6px !important; }
.card__name{
  font-weight: 700 !important;
  font-size: 14px;
  line-height: 1.3;
  color: var(--mg-ink);
  min-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__meta{ font-size: 11px !important; color: var(--mg-ink-soft) !important; }

/* Selo de economia */
.card__save{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  background: rgba(30,158,84,0.12);
  color: var(--mg-green);
  font-weight: 800;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
}

/* Rodapé do card: preços + ação */
.card__bottom{
  border-top: none !important;
  padding: 4px 12px 14px !important;
  display: grid !important;
  gap: 8px !important;
  align-items: stretch !important;
}
.card__prices{ display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price--old{
  color: var(--mg-ink-soft);
  text-decoration: line-through;
  font-size: 13px;
  font-weight: 600;
}
.price{
  color: var(--mg-ink) !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1;
}
.price small{ font-size: 12px; font-weight: 700; color: var(--mg-ink-soft); }

/* Botão Adicionar — verde de "comprar", largura total */
.card__bottom .btn--primary{
  background: linear-gradient(135deg, var(--mg-yellow), var(--mg-yellow-2)) !important;
  color: #2a1d00 !important;
  border: none !important;
  font-weight: 900 !important;
  width: 100% !important;
  justify-content: center !important;
  padding: 11px 12px !important;
  border-radius: 12px !important;
}
.card__bottom .btn--ghost{ border-radius: 12px !important; }
.card__qty{
  justify-content: space-between;
  width: 100%;
  background: var(--mg-bg);
  border-color: var(--mg-line);
}

/* Cartão de variação (select de sabor/tamanho) — visual de dropdown */
.card__variant{
  width: 100% !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--mg-bg) !important;
  color: var(--mg-ink) !important;
  border: 1px solid var(--mg-line) !important;
  border-radius: 10px !important;
  padding: 10px 34px 10px 12px !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  /* setinha custom */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  text-overflow: ellipsis;
}
.card__variant:focus{
  outline: none;
  border-color: var(--mg-yellow) !important;
  box-shadow: 0 0 0 3px rgba(255,194,14,0.18);
}
/* Variante dentro do card__body: empurra para baixo, alinha preço/botão entre cards */
.card__body .card__variant{
  margin-top: auto !important;
}
/* Spacer invisível no card normal — mesma altura do select, garante que
   card normal e card agrupado tenham a mesma altura natural.
   O select no card--group e o spacer no card normal ambos usam margin-top:auto
   para ocupar o fundo do card__body, nivelando card__bottom entre os dois. */
.card__variant-spacer{
  margin-top: auto;
  /* mesma altura do select: padding 10+10 + border 1+1 + font 13*1.2 ≈ 38px */
  min-height: 38px;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 600px){
  .card__media{ height: 124px !important; }
  .card__name{ font-size: 12.5px !important; min-height: 32px !important; }
  .card__meta{ font-size: 10px !important; }
  .price{ font-size: 16px !important; }
  .price--old{ font-size: 11px !important; }
  .card__save{ font-size: 10px !important; padding: 2px 7px !important; }
  .card__bottom .btn--primary{ font-size: 12px !important; padding: 9px !important; }
  .card__discount{ font-size: 11px !important; padding: 3px 7px !important; }
}

/* ---------------------------------------------------------------------------
   13. RODAPÉ PROFISSIONAL
--------------------------------------------------------------------------- */
.site-footer{
  margin-top: 50px;
  background: var(--mg-ink);
  color: #cfd4dc;
  /* respiro final (escuro) p/ o menu inferior flutuante não cobrir os selos.
     Substitui o padding-bottom claro do body, que deixava uma faixa vazia. */
  padding-bottom: 78px;
}
html[data-theme="dark"] .site-footer{ background: #060a0f; }

/* Remove o espaço claro morto após o rodapé (vinha do bottomNav) */
body{ padding-bottom: 0 !important; }

/* Newsletter */
.newsletter{
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.newsletter__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 24px 0;
}
.newsletter__text h3{ margin: 0; color: #fff; font-size: 18px; }
.newsletter__text p{ margin: 4px 0 0; font-size: 13px; color: #9aa3b2; }
.newsletter__form{ display: flex; gap: 10px; flex: 1 1 380px; max-width: 520px; }
.newsletter__form input{
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.newsletter__form input::placeholder{ color: #8b94a3; }
.newsletter__form button{
  background: linear-gradient(135deg, var(--mg-yellow), var(--mg-yellow-2));
  color: #2a1d00;
  font-weight: 900;
  border: none;
  border-radius: 12px;
  padding: 0 22px;
  cursor: pointer;
  white-space: nowrap;
}

/* Colunas */
.footcols__inner{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 34px 0;
}
.footbrand__logo{ width: 150px; margin-bottom: 12px; }
.footbrand p{ font-size: 13px; line-height: 1.6; color: #9aa3b2; max-width: 280px; }
.footcol h4{
  color: #fff;
  font-size: 14px;
  margin: 0 0 14px;
  letter-spacing: .02em;
}
.footcol a, .footcol p{
  display: block;
  color: #b6bdc9;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 9px;
}
.footcol a:hover{ color: var(--mg-yellow); }
.footcol__contact{ display: flex; align-items: center; gap: 8px; }
.footcol__contact svg{ width: 15px; height: 15px; flex: 0 0 auto; color: var(--mg-yellow); }

/* Horários (loja física e entrega) */
.foothours{ margin-top: 14px; }
.foothours .foothours__title{
  display: flex; align-items: center; gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 0 0 6px;
}
.foothours .foothours__title:not(:first-child){ margin-top: 12px; }
.foothours .foothours__title svg{ width: 15px; height: 15px; flex: 0 0 auto; color: var(--mg-yellow); }
.foothours .foothours__line{ margin: 0 0 4px; padding-left: 23px; }
.foothours .foothours__line--muted{ color: #8b94a3; }

/* Redes sociais */
.social{ display: flex; gap: 10px; margin-top: 6px; }
.social a{
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  margin: 0;
}
.social a:hover{ background: var(--mg-yellow); color: #2a1d00; }
.social svg{ width: 18px; height: 18px; }

/* Faixa de pagamentos */
.paybar{ border-top: 1px solid rgba(255,255,255,0.10); }
.paybar__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0;
}
.paybar__copy{ font-size: 12.5px; color: #8b94a3; }
.pay-seals{ display: flex; gap: 8px; flex-wrap: wrap; }
.pay-seal{
  background: #fff;
  color: #1a1d24;
  font-weight: 900;
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 8px;
  letter-spacing: .02em;
}
.pay-seal--pix{ background: #32bcad; color: #fff; }
.pay-seal--boleto{ background: #2d3748; color: #fff; }

@media (max-width: 900px){
  /* logo/descrição ocupa a linha toda; as 3 colunas ficam 2 a 2 embaixo */
  .footcols__inner{ grid-template-columns: 1fr 1fr; gap: 24px; }
  .footcols__inner > .footbrand{ grid-column: 1 / -1; }
}
@media (max-width: 520px){
  /* Institucional fica ao lado de Ajuda e Suporte (2 colunas) */
  .footcols__inner{ grid-template-columns: 1fr 1fr; gap: 20px 18px; }
  .footcols__inner > .footbrand{ grid-column: 1 / -1; }
  /* Central de Atendimento ocupa a largura toda com os contatos em 2x2 */
  .footcols__inner > .footcol:nth-child(4){
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 16px;
  }
  .footcols__inner > .footcol:nth-child(4) > h4{ grid-column: 1 / -1; }
  .footcols__inner > .footcol:nth-child(4) > .foothours{ grid-column: 1 / -1; }
  .footcols__inner > .footcol:nth-child(4) > p:last-child{ grid-column: 1 / -1; }

  .newsletter__inner{ flex-direction: column; align-items: stretch; }
  /* corrige: em coluna, o flex-basis vira ALTURA — zera isso e empilha input+botão */
  .newsletter__form{
    flex: 0 0 auto !important;
    width: 100%;
    max-width: none;
    flex-direction: column;
  }
  .newsletter__form input{ width: 100%; }
  .newsletter__form button{ width: 100%; padding: 14px; }
  .paybar__inner{ flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------------------
   13.b CORREÇÃO DE CONTRASTE NO TEMA CLARO
   (o components.css usa fundos escuros fixos no carrinho e nos modais;
    no tema claro o texto é escuro, então precisamos clarear o fundo)
--------------------------------------------------------------------------- */
html[data-theme="light"] .drawer{
  background: var(--mg-surface) !important;
  border-left: 1px solid var(--mg-line) !important;
  color: var(--mg-ink);
}
html[data-theme="light"] .modal{
  background: var(--mg-surface) !important;
  border: 1px solid var(--mg-line) !important;
  color: var(--mg-ink);
  box-shadow: var(--mg-shadow) !important;
}
html[data-theme="light"] .cartitem{
  background: var(--mg-bg) !important;
  border: 1px solid var(--mg-line) !important;
}
html[data-theme="light"] .cartitem__img,
html[data-theme="light"] .modal__media{
  background: #fff !important;
}
html[data-theme="light"] .modal__price{
  background: var(--mg-bg) !important;
  border: 1px solid var(--mg-line) !important;
}
/* Imagem do carrinho e do modal: produto inteiro, sem cortar */
html[data-theme="light"] .cartitem__img img,
html[data-theme="light"] .modal__media img{
  object-fit: contain !important;
}
/* Inputs (busca dentro do card de peso, lead, etc.) no tema claro */
html[data-theme="light"] .lead-input,
html[data-theme="light"] .card__weight-row input,
html[data-theme="light"] [data-cart-weight-input]{
  background: #fff !important;
  border: 1px solid var(--mg-line) !important;
  color: var(--mg-ink) !important;
}
html[data-theme="light"] .qty button,
html[data-theme="light"] .card__qty button,
html[data-theme="light"] .iconbtn{
  background: var(--mg-surface) !important;
  border: 1px solid var(--mg-line) !important;
  color: var(--mg-ink) !important;
}
/* opções de <select> legíveis no tema claro */
html[data-theme="light"] select option{
  background-color: #fff;
  color: var(--mg-ink);
}
/* Menu inferior (bottomNav) permanece escuro como overlay: força texto claro */
html[data-theme="light"] .mg-bottomnav__btn,
html[data-theme="light"] .mg-menu-drawer h3,
html[data-theme="light"] .mg-menu-link{
  color: #f3f4f6 !important;
}

/* ---------------------------------------------------------------------------
   14. BOTÃO FLUTUANTE DE WHATSAPP
--------------------------------------------------------------------------- */
.wa-float{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(37,211,102,0.45);
  animation: wa-pulse 2.6s infinite;
}
.wa-float svg{ width: 32px; height: 32px; color: #fff; }
.wa-float:hover{ transform: scale(1.06); }
@keyframes wa-pulse{
  0%   { box-shadow: 0 10px 26px rgba(37,211,102,0.45), 0 0 0 0 rgba(37,211,102,0.45); }
  70%  { box-shadow: 0 10px 26px rgba(37,211,102,0.30), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 10px 26px rgba(37,211,102,0.30), 0 0 0 0 rgba(37,211,102,0); }
}
/* sobe acima da bottom-nav no celular */
@media (max-width: 760px){
  .wa-float{ bottom: 78px; right: 14px; width: 54px; height: 54px; }
  .wa-float svg{ width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce){
  .wa-float{ animation: none; }
}

/* Acessibilidade: foco visível em toda a home */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible{
  outline: 3px solid rgba(255,194,14,0.6);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ===========================================================================
   15. BANNER FULL-WIDTH (ocupa a tela toda)
=========================================================================== */
/* width:100% (não 100vw) — 100vw inclui a barra de rolagem, então a faixa
   ficava ~15px mais larga que a área útil e era cortada à direita. 100% do
   pai (.main) dá exatamente a mesma faixa cheia, sem depender da barra. */
.hero.full-bleed{ width: 100% !important; margin: 0 0 6px !important; }
.hero.full-bleed .promo__slide img{
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  border-radius: 0 !important;
}
.hero.full-bleed .promo__dots{ margin-top: 8px; }

/* DESKTOP (telas largas): o banner do topo não fica gigante. Fica centralizado
   e com altura limitada. No celular/tablet (≤900px) continua 100% como está. */
@media (min-width: 901px){
  .hero.full-bleed{
    width: min(1180px, 100% - 40px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero.full-bleed .promo__slide img{
    max-height: 420px !important;
    border-radius: 18px !important;
  }
}

/* ===========================================================================
   16. CARROSSEL HORIZONTAL DE PRODUTOS (rola para o lado) + "Ver mais"
=========================================================================== */
#produtos{ scroll-margin-top: 140px; } /* a busca rola até aqui sem ficar sob o header */

.hscroll{
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
  align-items: stretch;               /* cards na mesma fileira = mesma altura */
}
/* barra de rolagem fina e discreta (desktop) */
.hscroll{ scrollbar-width: thin; scrollbar-color: var(--mg-line) transparent; }
.hscroll::-webkit-scrollbar{ height: 6px; }
.hscroll::-webkit-scrollbar-thumb{ background: var(--mg-line); border-radius: 999px; }
.hscroll::-webkit-scrollbar-thumb:hover{ background: var(--mg-ink-soft); }
.hscroll::-webkit-scrollbar-track{ background: transparent; }

/* cada card vira largura fixa dentro do carrossel */
.hscroll > .card{
  flex: 0 0 210px;
  width: 210px;
  scroll-snap-align: start;
  height: auto;                        /* override height:100% → permite stretch */
}
@media (max-width: 600px){
  .hscroll > .card{ flex-basis: 158px; width: 158px; }
}

/* card "Ver mais" no fim do carrossel */
.hscroll__more{
  flex: 0 0 158px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px dashed var(--mg-line);
  border-radius: 16px;
  background: var(--mg-surface);
  color: var(--mg-ink-soft);
  text-align: center;
  font-weight: 800;
  line-height: 1.25;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.hscroll__more:hover{ border-color: var(--mg-yellow); color: var(--mg-ink); transform: translateY(-3px); }
.hscroll__more-plus{
  width: 50px; height: 50px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 28px; font-weight: 900;
  background: rgba(255,194,14,0.18);
  color: var(--mg-yellow-2);
}

/* ===========================================================================
   17. ÍCONES (departamentos, categorias visuais, ocasiões) — sem emoji
=========================================================================== */
.dept__link svg{ width: 19px; height: 19px; flex: 0 0 auto; }

.cat__ico{
  position: absolute;
  top: 12px; right: 14px;
  width: 40px; height: 40px;
  opacity: .95;
}
.cat__ico svg{ width: 100%; height: 100%; stroke: #fff; }

.occasion__ico{
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255,194,14,0.14);
}
.occasion__ico svg{ width: 24px; height: 24px; stroke: var(--mg-yellow-2); }

/* ===========================================================================
   18. BOTÃO/FAIXA "MELHORES OFERTAS"
=========================================================================== */
.offers-cta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, #ff6a3d, #e53935);
  color: #fff;
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: var(--mg-shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.offers-cta:hover{ transform: translateY(-2px); box-shadow: var(--mg-shadow); }
.offers-cta__txt strong{ display: block; font-size: 19px; font-weight: 900; }
.offers-cta__txt span{ display: block; font-size: 13px; opacity: .92; font-weight: 600; margin-top: 2px; }
.offers-cta__btn{
  background: #fff; color: #e53935;
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 auto;
}
@media (max-width: 520px){
  .offers-cta{ flex-direction: column; align-items: stretch; text-align: center; gap: 10px; }
  .offers-cta__btn{ width: 100%; }
}

/* ===========================================================================
   19. CORREÇÃO DO GAP antes do rodapé
=========================================================================== */
.main{ padding-bottom: 14px !important; }
#productsGrid .catalog-section:last-child{ margin-bottom: 6px !important; }
.site-footer{ margin-top: 26px; }

/* ===========================================================================
   20. CARROSSEL (marquee) DE MARCAS
=========================================================================== */
.brands__list{
  overflow: hidden;
  flex: 1 1 auto;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.brands__track{
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  animation: brands-marquee 30s linear infinite;
}
.brands:hover .brands__track{ animation-play-state: paused; }
@keyframes brands-marquee{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}
.brand-logo{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  padding: 10px 26px;
  background: var(--mg-surface);
  border: 1px solid var(--mg-line);
  border-radius: 16px;
}
.brand-logo img{ max-height: 88px; max-width: 180px; width: auto; object-fit: contain; }
@media (max-width: 520px){
  .brand-logo{ height: 84px; padding: 8px 18px; }
  .brand-logo img{ max-height: 64px; max-width: 140px; }
}
.brands__track .brand-chip{ flex: 0 0 auto; }
@media (prefers-reduced-motion: reduce){ .brands__track{ animation: none; } }

/* ===========================================================================
   21. LINHAS DE DESCONTO NO CARRINHO
=========================================================================== */
.totals__row--discount, .totals__row--discount strong{ color: var(--mg-green); }
.totals__row--total{ border-top: 1px dashed var(--mg-line); padding-top: 8px; margin-top: 2px; }
.totals__row--total strong{ font-size: 18px; color: var(--mg-ink); }

/* ===========================================================================
   22. MODAL DE BOAS-VINDAS (10% OFF) — compacto (cabe na tela do celular)
=========================================================================== */
#welcomeBackdrop{ z-index: 10000 !important; }
.welcome-modal{
  z-index: 10001 !important;
  width: min(440px, 92vw);
  max-height: 90vh;
  overflow: auto;
  padding: 0 !important;
}
.welcome__head{
  background: linear-gradient(135deg, var(--mg-yellow), var(--mg-yellow-2));
  color: #2a1d00;
  padding: 14px 20px;
  border-radius: 18px 18px 0 0;
  text-align: center;
}
.welcome__badge{
  display: inline-block;
  background: #e53935; color: #fff;
  font-weight: 900; font-size: 11px; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
}
.welcome__title{ margin: 7px 0 3px; font-size: 18px; font-weight: 900; line-height: 1.2; }
.welcome__sub{ margin: 0; font-size: 12px; line-height: 1.4; }
.welcome__form{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 14px 18px 16px;
}
.welcome__full{ grid-column: 1 / -1; }
/* inputs/labels compactos só dentro do modal de boas-vindas */
.welcome__form .lead-field{ gap: 4px; }
.welcome__form .lead-field__label{ font-size: 11px; }
.welcome__form .lead-input{ padding: 9px 12px; border-radius: 11px; }
.welcome__msg{ min-height: 0; color: var(--mg-red); font-weight: 700; font-size: 12.5px; }
.welcome__actions{ display: grid; gap: 8px; margin-top: 2px; }
.welcome__actions .btn{ padding: 11px 14px; }
/* mantém 2 colunas mesmo no celular (CPF|Telefone e Bairro|Cidade lado a
   lado) para o modal ficar baixo e caber sem rolagem; só ajusta a fonte */
@media (max-width: 420px){
  .welcome__title{ font-size: 16.5px; }
  .welcome__sub{ font-size: 11.5px; }
  .welcome__form{ padding: 12px 14px 14px; gap: 8px; }
}

/* ---------------------------------------------------------------------------
   Carrinho aberto: esconde a barra inferior (Menu/Buscar/Carrinho) e o botão
   flutuante do WhatsApp para não cobrirem o botão "Finalizar no WhatsApp".
   A barra é injetada no <body> DEPOIS do #cartDrawer, então o combinador
   irmão (~) consegue alcançá-la.
--------------------------------------------------------------------------- */
#cartDrawer.drawer--open ~ .mg-bottomnav,
#cartDrawer.drawer--open ~ .mg-fab-whats,
#cartDrawer.drawer--open ~ .wa-float{
  display: none !important;
}
/* respiro extra no rodapé do carrinho (área segura de celulares) */
.drawer__footer{
  padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
}

/* Botão "10% OFF" no header (reabre o cadastro) */
.actions .btn--offer{
  background: linear-gradient(135deg, #ff6a3d, #e53935) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 900;
  gap: 6px !important;
  box-shadow: 0 4px 12px rgba(229,57,53,.32);
  animation: offer-pulse 2.4s ease-in-out infinite;
}
.actions .btn--offer:hover{ filter: brightness(1.05); }
.btn--offer__pct{
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  font-weight: 900;
  font-size: 13px;
}
@keyframes offer-pulse{
  0%,100%{ box-shadow: 0 4px 12px rgba(229,57,53,.32); }
  50%{ box-shadow: 0 4px 18px rgba(229,57,53,.6); }
}
@media (prefers-reduced-motion: reduce){ .actions .btn--offer{ animation: none; } }
/* Carrinho compacto (só ícone + contador) — desktop/tablet apenas.
   No mobile (≤520px) os valores menores da seção 3 prevalecem. */
@media (min-width: 521px){
  .actions{ gap: 7px !important; }
  .actions .btn--cart{ padding: 9px 12px !important; gap: 5px !important; }
}
.actions .btn--cart .pill{ margin-left: 0 !important; }

/* ===========================================================================
   23. TELA DE PEDIDO CONFIRMADO (verde preenchendo + check girando)
=========================================================================== */
.order-success{
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #16a34a, #0f8a3e);
  /* começa como um pontinho no centro e expande pra preencher a tela */
  clip-path: circle(0% at 50% 50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.order-success.is-show{
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  animation: os-fill .55s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes os-fill{
  from{ clip-path: circle(0% at 50% 50%); }
  to{ clip-path: circle(150% at 50% 50%); }
}
.order-success__inner{
  display: grid;
  justify-items: center;
  gap: 26px;
  opacity: 0;
  transform: translateY(10px) scale(.96);
}
.order-success.is-show .order-success__inner{
  animation: os-pop .45s ease .45s forwards;
}
@keyframes os-pop{ to{ opacity: 1; transform: none; } }

.order-success__check{
  position: relative;
  width: 128px; height: 128px;
  display: grid; place-items: center;
}
/* círculo girando ao redor do check */
.order-success__ring{
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.30);
  border-top-color: #fff;
}
.order-success.is-show .order-success__ring{
  animation: os-spin 1s linear infinite;
}
@keyframes os-spin{ to{ transform: rotate(360deg); } }
/* símbolo de confirmar (✓) */
.order-success__tick{
  width: 62px; height: 62px;
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 64;
  stroke-dashoffset: 64;
}
.order-success.is-show .order-success__tick{
  animation: os-tick .5s ease .75s forwards;
}
@keyframes os-tick{ to{ stroke-dashoffset: 0; } }

/* fechamento: mantém o verde preenchido e some suave (depois volta pra home) */
.order-success.is-closing{
  clip-path: circle(150% at 50% 50%) !important;
  animation: os-out .48s ease forwards !important;
}
@keyframes os-out{ from{ opacity: 1; } to{ opacity: 0; } }

.order-success__text{
  color: #fff;
  font-weight: 800;
  font-size: 23px;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0,0,0,.18);
}
.order-success__text small{
  display: block;
  margin-top: 6px;
  font-size: 14.5px;
  font-weight: 600;
  opacity: .92;
}
@media (max-width: 520px){
  .order-success__check{ width: 104px; height: 104px; }
  .order-success__tick{ width: 52px; height: 52px; }
  .order-success__text{ font-size: 20px; }
}
@media (prefers-reduced-motion: reduce){
  .order-success.is-show{ animation: none; clip-path: circle(150% at 50% 50%); }
  .order-success.is-show .order-success__inner{ animation: none; opacity: 1; transform: none; }
  .order-success.is-show .order-success__ring{ animation: none; }
  .order-success.is-show .order-success__tick{ animation: none; stroke-dashoffset: 0; }
}

/* ===========================================================================
   24. ENTREGA / RETIRADA no checkout
=========================================================================== */
.deliv-opts{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.deliv-opt{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  background: rgba(255,255,255,0.04);
  transition: border-color .15s ease, background .15s ease;
}
.deliv-opt input{ accent-color: var(--mg-yellow-2); width: 16px; height: 16px; flex: 0 0 auto; }
.deliv-opt.is-active,
.deliv-opt:has(input:checked){
  border-color: var(--mg-yellow-2);
  background: rgba(255,194,14,0.14);
}
.lead-addr{ display: grid; gap: 12px; margin-top: 2px; }
.lead-addr.is-hidden{ display: none; }
.lead-addr__row{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lead-addr__row--rua{ grid-template-columns: 2fr 1fr; } /* rua maior, número menor */
@media (max-width: 420px){ .deliv-opts{ grid-template-columns: 1fr; } }

/* o modal de finalizar pode ficar alto (vários campos) — deixa rolar */
.lead-modal{ max-height: 92vh; overflow: auto; }

/* ===========================================================================
   26. REDESIGN CHECKOUT + ÍCONES + LOADINGS + BANNER  (UI pass 2026-07)
   Última folha carregada nas duas páginas → fonte de verdade destes ajustes.
=========================================================================== */

/* --- T1: botão travado até escolher recebimento E pagamento --- */
.btn:disabled,
.btn[disabled]{
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.15);
}

/* --- T2: ícones SVG nos títulos de seção/categoria (substituem emojis) --- */
.ttl-ico{
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.16em;
  margin-right: .42em;
  flex: 0 0 auto;
}
/* --- T2: ícones das opções do checkout (recebimento/pagamento) --- */
.deliv-opt .opt-ico{
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

/* --- T4: layout do modal "Finalizar pedido" --- */
#leadModal{ width: min(760px, 94vw); }
#leadModal .modal__body{ display: block; padding: 20px; }
#leadModal .lead-form{
  display: flex;
  flex-direction: column;
  align-items: stretch;   /* anula o align-items:end herdado do components (senão
                             os filhos encolhem/colam à direita no desktop) */
  gap: 16px;
}
/* dados pessoais em grade de 3 colunas (desktop) / 1 coluna (mobile) */
.lead-grid3{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
@media (max-width: 640px){
  .lead-grid3{ grid-template-columns: 1fr; }
}
/* blocos "Como quer receber/pagar" ocupam a largura toda, rótulo acima */
.lead-block{ display: block; }
.lead-block > .lead-field__label{
  display: block;
  margin-bottom: 8px;
}
/* opções como cards em linha, com espaçamento uniforme e wrap responsivo */
.deliv-opts{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
@media (max-width: 560px){
  .deliv-opts{ grid-template-columns: 1fr; } /* mobile: uma coluna */
}
.deliv-opt{
  min-height: 44px; /* touch target confortável */
}
/* bloco de endereço: seção própria abaixo do "receber", com transição suave */
.lead-addr{
  display: grid;
  gap: 12px;
  margin-top: 2px;
  overflow: hidden;
  max-height: 640px;
  opacity: 1;
  transition: max-height .32s ease, opacity .24s ease, margin .32s ease;
}
.lead-addr.is-hidden{
  display: grid;        /* vence o display:none anterior p/ poder animar */
  max-height: 0;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
/* botões alinhados e com largura consistente nos dois breakpoints */
#leadModal .lead-actions{
  display: flex;
  gap: 12px;
  margin-top: 4px;
}
#leadModal .lead-actions .btn{
  flex: 1 1 0;
  justify-content: center;
}
@media (max-width: 520px){
  #leadModal .lead-actions{ flex-direction: column; }
}

/* --- T5: spinner compartilhado (Pix + Cartão), animação CSS pura --- */
@keyframes mg-spin{ to{ transform: rotate(360deg); } }
.pix-qr-wrap{
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}
.qr-loading{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f4f4f4;   /* área do QR é clara por natureza (leitura) */
  border-radius: 8px;
  color: #333;
}
.qr-loading__txt{ font-size: 13px; font-weight: 700; }
.qr-spinner{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid rgba(0,0,0,0.15);
  border-top-color: #0b7a3b;
  animation: mg-spin .8s linear infinite;
}
/* spinner dentro do botão "Pagar" (cartão) */
.btn-spinner{
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: mg-spin .7s linear infinite;
}
.btn--loading{ cursor: progress; }

/* --- T6: banner central maior no desktop (mobile permanece intacto) ---
   Antes: travado em 1180px (mais estreito que o conteúdo de 1480px) → parecia
   encolhido, com vazio nas laterais. Agora acompanha a largura do conteúdo e a
   imagem preenche a faixa mantendo proporção (sem crop de encarte, sem pixelar). */
@media (min-width: 901px){
  .hero.full-bleed{
    width: min(1480px, 100% - 40px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero.full-bleed .promo__slide img{
    width: 100% !important;
    height: auto !important;
    max-height: 60vh !important;    /* teto de segurança p/ não ficar gigante */
    object-fit: contain !important; /* mantém proporção; não corta preços do encarte */
    border-radius: 18px !important;
  }
}

/* ===========================================================================
   ESTOQUE (esgotado / últimas unidades) + THUMBNAIL NO CARRINHO
=========================================================================== */

/* Carrinho: miniatura do produto à esquerda de cada linha */
.cartitem{ display:flex; gap:10px; align-items:center; }
.cartitem__thumb{
  width:48px; height:48px; flex:0 0 auto;
  border-radius:10px;
  object-fit:contain !important;  /* produto inteiro, sem cortar */
  padding:4px;
  background:#fff;                 /* foto tem fundo branco -> "flutua" */
  border:1px solid var(--line, rgba(0,0,0,0.08));
}
.cartitem__body{ flex:1 1 auto; min-width:0; }

/* Card de produto ESGOTADO: imagem apagada + ação bloqueada */
.card--out .card__media img{ filter:grayscale(1); opacity:.5; }
.card__flag--out{ background:#ef4444 !important; color:#fff !important; border-color:#ef4444 !important; }

/* Mensagens de estoque no card */
.card__stockmsg{ font-size:11px; font-weight:800; margin-top:4px; }
.card__stockmsg--out{ color:#ef4444; }
.card__stockmsg--low{ color:#b45309; }

/* ===========================================================================
   T7: PRIMEIRA DOBRA — encarte INTEIRO + faixa de marcas já visível ao abrir
   Antes: no celular o encarte era 100% da largura com altura livre. Encarte em
   pé (4:5, 3:4, 1:1.5) virava ~500-650px de altura e jogava "As marcas que
   você confia" para fora da tela.
   Agora: a altura do encarte é limitada ao que sobra na primeira tela
   (100svh − topo − faixa de marcas). A imagem NÃO é cortada: ela reduz junto
   (largura acompanha a proporção) e fica centralizada, então o encarte
   continua inteiro e as marcas aparecem sem precisar rolar.
   Ajuste fino: mexa nas duas variáveis abaixo (não precisa mexer no resto).
=========================================================================== */
:root{
  --mg-fold-top: 196px;    /* utilbar + header (marca/ações + busca) + menu de departamentos */
  --mg-fold-below: 256px;  /* bolinhas + faixa de marcas + faixa "Ver ofertas" inteira */
}

@media (max-width: 900px){
  /* width:auto (não 100vw) + gutters de 16px: auto preenche o pai menos as
     margens, sem estourar. 100vw + margin causava overflow horizontal. */
  .hero.full-bleed{ width: auto !important; margin: 6px 16px 4px !important; }

  /* Track: altura EXPLÍCITA = menor entre a proporção 4:5 e o espaço que
     sobra na primeira dobra. Isso impede que a imagem natural empurre
     marcas/CTA para fora da tela.
     – 100vw − 32px = largura real do banner (16px gutter cada lado)
     – svh − fold-top − fold-below = espaço que sobra depois de header/marcas/CTA
     – vh fallback para navegadores sem svh */
  .hero.full-bleed .promo__track{
    width: 100% !important;
    height: min(calc((100vw - 32px) * 1.25), calc(100vh  - var(--mg-fold-top) - var(--mg-fold-below))) !important;
    height: min(calc((100vw - 32px) * 1.25), calc(100svh - var(--mg-fold-top) - var(--mg-fold-below))) !important;
    max-height: min(calc((100vw - 32px) * 1.25), calc(100vh  - var(--mg-fold-top) - var(--mg-fold-below))) !important;
    max-height: min(calc((100vw - 32px) * 1.25), calc(100svh - var(--mg-fold-top) - var(--mg-fold-below))) !important;
    min-height: 170px !important;
    align-items: stretch !important;
    border-radius: 12px !important;
  }

  .hero.full-bleed .promo__slide{
    flex: 0 0 100% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    background: transparent !important;
  }

  .hero.full-bleed .promo__slide img{
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: block !important;
    object-fit: contain !important;
    border-radius: 0 !important;
  }

  /* bolinhas colam imediatamente abaixo do banner */
  .hero.full-bleed .promo{ gap: 4px !important; }
  .hero.full-bleed .promo__dots{ margin-top: 0 !important; }

  /* menu de departamentos um pouco mais baixo: ~8px a mais para o encarte */
  .dept__link{ padding: 9px 13px; font-size: 13.5px; }

  /* faixa de marcas compacta (rótulo + logos em ~100px) p/ caber na dobra */
  .brands{ margin-top: 8px; }
  .brands__inner{ padding: 9px 0; gap: 6px; }
  .brands__label{ font-size: 12px; }
  .brand-logo{ height: 58px; padding: 6px 12px; border-radius: 14px; }
  .brand-logo img{ max-height: 46px; max-width: 116px; }

  /* o <br> do HTML entre marcas e "Ver ofertas" comia ~19px da dobra */
  .brands + br{ display: none; }
}

/* Faixa "Ver ofertas" DENTRO da primeira tela, no mesmo estilo de sempre
   (título + subtítulo + botão de largura cheia). Só as medidas ficaram um
   pouco mais justas; o espaço que sobra sai do encarte, não da faixa. */
@media (max-width: 520px){
  .offers-cta{
    gap: 8px;
    padding: 12px 14px;
    margin-top: 10px;
    border-radius: 16px;
  }
  .offers-cta__txt strong{ font-size: 16px; }
  .offers-cta__txt span{ font-size: 12px; }
  .offers-cta__btn{ padding: 10px 16px; font-size: 14px; }
}
/* Celular estreito (390px e menos): o subtítulo quebrava em 2 linhas e a faixa
   passava de 126px, estourando a dobra. Aqui ele fica em 1 linha. */
@media (max-width: 400px){
  .offers-cta{ padding: 11px 12px; }
  .offers-cta__txt strong{ font-size: 15px; }
  .offers-cta__txt span{ font-size: 11px; }
}

/* Celular de lado (paisagem): não faz sentido brigar pela dobra — a tela tem
   pouca altura e muita largura. Só limita o encarte para não estourar a tela. */
@media (max-width: 900px) and (orientation: landscape){
  /* Paisagem: tela curta e larga → desativa altura fixa do track */
  .hero.full-bleed .promo__track{
    height: auto !important;
    max-height: none !important;
  }
  .hero.full-bleed .promo__slide{
    aspect-ratio: auto !important;
  }
  .hero.full-bleed .promo__slide img{
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 78vh !important;
    max-height: 78svh !important;
    min-height: 200px !important;
    margin: 0 auto !important;
  }
}

/* Desktop: mesma ideia — o encarte não pode empurrar as marcas para baixo da
   dobra em telas de notebook (altura útil ~660px). O teto de 60vh continua
   valendo quando a tela é alta. */
@media (min-width: 901px){
  .hero.full-bleed .promo__slide img{
    /* 392px = utilbar + header + menu + bolinhas + faixa de marcas do desktop */
    max-height: min(60vh, calc(100vh - 392px)) !important;
    max-height: min(60vh, calc(100svh - 392px)) !important;
    min-height: 240px !important;
  }
}
