/* Mandrake V13 - home compacta + carrossel de destaques real */
:root{
  --mg13-blue:#0057ff;
  --mg13-ink:#071225;
  --mg13-border:#d8e6ff;
  --mg13-soft:#eef5ff;
  --mg13-shadow:0 14px 36px rgba(15,23,42,.075);
  --mg13-shadow-strong:0 22px 56px rgba(15,23,42,.13);
}

/* Topo da home: compactar stories e remover o bloco vazio enorme */
.mg-story-shell{padding-top:.7rem!important}
.mg-story-shell .mg-story-card{
  min-height:clamp(180px,22vw,240px)!important;
  padding:0!important;
  border-radius:1.45rem!important;
  border:1px solid rgba(0,87,255,.14)!important;
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(238,245,255,.72))!important;
  box-shadow:var(--mg13-shadow)!important;
}
.mg-story-shell .mg-story-empty-inner{
  min-height:inherit!important;
  padding:1.35rem 1.5rem!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-end!important;
}
.mg-story-shell .mg-story-empty-inner > .flex{
  min-height:100%!important;
  margin:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:end!important;
  gap:1rem!important;
}
.mg-story-shell .mg-story-empty-inner > .flex > .flex.items-center.gap-3{
  align-items:end!important;
}
.mg-story-shell .mg-story-card .mg-story-logo{
  width:2.6rem!important;height:2.6rem!important;border-radius:.95rem!important;
}
.mg-story-shell .mg-story-card .mg-story-title{
  font-size:1.2rem!important;line-height:1.02!important;letter-spacing:-.045em!important;margin-top:.2rem!important;
}
.mg-story-shell .mg-story-card .brand-pill{font-size:.63rem!important;padding:.28rem .6rem!important;letter-spacing:.08em!important}
.mg-story-shell .mg-story-card .brand-button{
  min-width:12rem!important;
  min-height:2.85rem!important;
  border-radius:1rem!important;
  padding:.82rem 1.15rem!important;
  font-size:.92rem!important;
  font-weight:950!important;
}
.mg-story-shell .mg-story-content-box{
  margin-top:1rem!important;
  border-radius:1rem!important;
}
.mg-story-shell .mg-logo-watermark::before{
  left:1.2rem!important;
  top:1rem!important;
  right:auto!important;
  bottom:auto!important;
  width:clamp(150px,18vw,260px)!important;
  height:clamp(150px,18vw,260px)!important;
  opacity:.04!important;
}
.mg-story-shell .mg-logo-watermark::after{display:none!important}

/* Se estiver sem stories, continua elegante e compacto */
.mg-story-shell .mg-story-card-empty .mg-story-empty-inner{padding:1.2rem 1.35rem!important}
.mg-story-shell .mg-story-card-empty .mg-story-desc,
.mg-story-shell .mg-story-card-empty .mg-story-content-box{display:none!important}

/* Categorias com barra oculta no mobile */
.mg-home-categories{margin:.95rem auto 1.15rem!important}
@media (max-width:640px){
  .mg-home-categories{scrollbar-width:none!important;-ms-overflow-style:none!important}
  .mg-home-categories::-webkit-scrollbar{display:none!important}
}

/* Painel de destaques mais limpo */
.mg-products-panel{
  padding:1.2rem!important;
  border-radius:1.45rem!important;
}
.mg-products-panel>.mb-7,.mg-products-panel>.sm\:mb-8{margin-bottom:1rem!important}
.mg-products-panel a[href="/produtos"]{padding:.74rem 1rem!important;white-space:nowrap!important}

/* Cabeçalho do destaque com botão à direita mais coerente */
.mg-products-panel .mb-7{
  gap:.8rem!important;
}
@media (max-width:640px){
  .mg-products-panel .mb-7{display:flex!important;flex-direction:column!important;align-items:flex-start!important}
  .mg-products-panel a[href="/produtos"]{width:100%!important;justify-content:center!important}
}

/* Converte o destaque em carrossel real, sem grade quebrada */
.mg-products-panel .relative{position:relative!important}
#produtosCarrossel{
  --cards:4;
  --gap:.85rem;
  display:flex!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  gap:var(--gap)!important;
  padding:0 0 .35rem!important;
  scroll-snap-type:x mandatory!important;
  scroll-padding-left:0!important;
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
  overscroll-behavior-x:contain!important;
}
#produtosCarrossel::-webkit-scrollbar{display:none!important}
#produtosCarrossel .produto-card{
  flex:0 0 calc((100% - (var(--cards) - 1) * var(--gap)) / var(--cards))!important;
  max-width:calc((100% - (var(--cards) - 1) * var(--gap)) / var(--cards))!important;
  min-width:calc((100% - (var(--cards) - 1) * var(--gap)) / var(--cards))!important;
  scroll-snap-align:start!important;
  border-radius:1rem!important;
}
@media (min-width:1700px){#produtosCarrossel{--cards:5}}
@media (max-width:1199px){#produtosCarrossel{--cards:3}}
@media (max-width:820px){#produtosCarrossel{--cards:2;--gap:.7rem}}
@media (max-width:520px){#produtosCarrossel{--cards:1;--gap:.62rem}}

#produtosCarrossel .produto-card .p-4,
#produtosCarrossel .produto-card .p-5{padding:.72rem!important}
#produtosCarrossel .produto-nome{font-size:.84rem!important;line-height:1.08rem!important;min-height:2.15rem!important;max-height:2.18rem!important}
#produtosCarrossel .produto-price-box{font-size:1.15rem!important}
#produtosCarrossel .produto-card .flex.gap-3{margin-top:auto!important;display:block!important}
#produtosCarrossel .produto-card .flex.gap-3 a[aria-label*="Ver detalhes"]{min-height:2.3rem!important}
@media (max-width:640px){
  #produtosCarrossel .produto-card .p-4,#produtosCarrossel .produto-card .p-5{padding:.62rem!important}
  #produtosCarrossel .produto-nome{font-size:.76rem!important;line-height:.98rem!important;min-height:1.98rem!important}
  #produtosCarrossel .produto-price-box{font-size:1.03rem!important}
}

/* Botões do carrossel */
.mg13-carousel-btn{
  position:absolute!important;
  top:38%!important;
  transform:translateY(-50%)!important;
  width:2.7rem!important;
  height:2.7rem!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  border:1px solid rgba(0,87,255,.16)!important;
  background:rgba(255,255,255,.96)!important;
  color:var(--mg13-blue)!important;
  box-shadow:0 12px 28px rgba(15,23,42,.12)!important;
  cursor:pointer!important;
  z-index:3!important;
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease!important;
}
.mg13-carousel-btn:hover{transform:translateY(-50%) scale(1.02)!important;box-shadow:0 16px 34px rgba(15,23,42,.16)!important}
.mg13-carousel-btn:disabled{opacity:.35!important;cursor:default!important}
.mg13-carousel-btn.prev{left:-.55rem!important}
.mg13-carousel-btn.next{right:-.55rem!important}
.mg13-carousel-btn svg{width:1rem!important;height:1rem!important;display:block!important}
@media (max-width:640px){
  .mg13-carousel-btn{display:none!important}
}

/* Ajustes no mobile para a dobra inicial não ficar gigante */
@media (max-width:640px){
  .mg-story-shell .mg-story-card{
    min-height:155px!important;
    border-radius:1.2rem!important;
  }
  .mg-story-shell .mg-story-empty-inner{padding:.9rem!important}
  .mg-story-shell .mg-story-empty-inner > .flex{
    grid-template-columns:1fr!important;
    align-items:end!important;
    gap:.8rem!important;
  }
  .mg-story-shell .mg-story-card .mg-story-logo{width:2.35rem!important;height:2.35rem!important}
  .mg-story-shell .mg-story-card .mg-story-title{font-size:1.02rem!important}
  .mg-story-shell .mg-story-card .brand-button{width:100%!important;min-width:0!important;font-size:.88rem!important}
  .mg-story-shell .mg-logo-watermark::before{width:150px!important;height:150px!important;left:.9rem!important;top:.8rem!important;opacity:.04!important}
}
