:root{
  --mg-blue:#075cff;--mg-blue-dark:#0648c9;--mg-ink:#0b1634;--mg-muted:#60708e;
  --mg-line:#dbe7ff;--mg-soft:#f4f8ff;--mg-white:#fff;--mg-nav-h:64px;
  --mg-radius:18px;--mg-shadow:0 12px 30px rgba(17,73,170,.09)
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:#fff}
body{margin:0!important;color:var(--mg-ink)!important;background:#fff!important;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;-webkit-font-smoothing:antialiased}
a{text-decoration:none}
img{max-width:100%;height:auto}
/* header público */
header:not(.mg-cart-header):not(.admin-header),.site-header,.main-header,.mg-header{
  background:rgba(255,255,255,.96)!important;border-bottom:1px solid var(--mg-line)!important;
  box-shadow:0 4px 18px rgba(15,64,150,.05)!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)
}
header:not(.mg-cart-header):not(.admin-header){min-height:58px!important}
header img,.site-header img,.main-header img{object-fit:contain}
/* superfícies e hierarquia */
.mg-home-entry-hero,.mg-filter-panel,.checkout-topbar,.cart-items-card,.checkout-summary-card,
section[class*="hero"],.produto-card,.product-card,[class*="story"]{
  border-color:var(--mg-line)!important
}
.mg-home-entry-hero,.mg-filter-panel,.checkout-topbar,.cart-items-card,.checkout-summary-card{
  background:#fff!important;box-shadow:var(--mg-shadow)!important;border-radius:var(--mg-radius)!important
}
button,.btn,[role="button"],input,select,textarea{font:inherit}
button,.btn{border-radius:14px!important}
input,select,textarea{border-color:#bfd4ff!important;background:#fff!important}
/* Produtos */
body:has(.js-products-grid){background:linear-gradient(180deg,#f7faff 0,#fff 420px)!important}
body:has(.js-products-grid) .mg-filter-panel{margin-top:18px!important;padding:18px!important}
body:has(.js-products-grid) .mg-filter-panel>.grid{gap:12px!important}
body:has(.js-products-grid) .js-products-grid{gap:18px!important}
.produto-card,.product-card{overflow:hidden!important;background:#fff!important;border:1px solid var(--mg-line)!important;border-radius:18px!important;box-shadow:0 8px 24px rgba(20,65,140,.07)!important;transition:.2s ease!important}
.produto-card:hover,.product-card:hover{transform:translateY(-3px)!important;box-shadow:0 16px 34px rgba(20,65,140,.12)!important}
.produto-card img,.product-card img{display:block;width:100%;object-fit:cover}
/* Home e stories compactos */
body:has(.mg-home-entry-hero){background:linear-gradient(180deg,#f6faff 0,#fff 520px)!important}
body:has(.mg-home-entry-hero) .mg-home-entry-hero{margin-top:18px!important}
body:has(.mg-home-entry-hero) [class*="stories"]{max-width:100%!important}
body:has(.mg-home-entry-hero) .produto-card{min-width:0!important}
/* Carrinho */
.mg-cart-header{position:sticky!important;top:0!important;z-index:200!important;background:#fff!important;border-bottom:1px solid var(--mg-line)!important}
.mg-cart-nav{min-height:58px!important}
.mg-checkout-clean{max-width:1240px!important;margin-inline:auto!important}
.checkout-layout-clean{gap:18px!important}
.cart-items-card,.checkout-summary-card{border:1px solid var(--mg-line)!important}
.checkout-final-btn{background:var(--mg-blue)!important;border-color:var(--mg-blue)!important}
/* menu inferior único */
#mgCleanBottomNav{display:none}
@media(max-width:820px){
  body:not(.mg-cart-page){padding-bottom:calc(var(--mg-nav-h) + 18px + env(safe-area-inset-bottom))!important}
  #mgCleanBottomNav{position:fixed;left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom));height:var(--mg-nav-h);z-index:10000;display:grid;grid-template-columns:repeat(4,1fr);align-items:center;background:rgba(255,255,255,.98);border:1px solid #cfe0ff;border-radius:20px;box-shadow:0 15px 40px rgba(10,55,135,.18);overflow:hidden;backdrop-filter:blur(14px)}
  #mgCleanBottomNav a{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;color:#596985;font-size:10px;font-weight:800;min-width:0}
  #mgCleanBottomNav a .mg-nav-icon{font-size:18px;line-height:1}
  #mgCleanBottomNav a.is-active{color:var(--mg-blue);background:#eef5ff}
  .js-products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .produto-card,.product-card{border-radius:15px!important}
  .mg-filter-panel{margin-left:0!important;margin-right:0!important;border-radius:18px!important}
  .mg-home-entry-hero{margin-left:10px!important;margin-right:10px!important}
  .checkout-layout-clean{display:block!important}
  .checkout-summary-card{margin-top:16px!important}
}
/* Agente IA: sempre acima da navegação e de qualquer barra */
iframe[src*="agent-factory-chat"],iframe[title*="chat" i],iframe[title*="assist" i],
[id*="bubble" i][style], [class*="bubble" i][style], [id*="chat" i][style], [class*="chat" i][style]{
  z-index:2147483000!important
}
@media(max-width:820px){
  iframe[src*="agent-factory-chat"],iframe[title*="chat" i],iframe[title*="assist" i]{
    position:fixed!important;bottom:calc(var(--mg-nav-h) + 22px + env(safe-area-inset-bottom))!important;right:14px!important
  }
}
/* remove sobras conhecidas de menus duplicados */
.mg-v2-mobile-nav,.mg-v3-bottom-nav,.mg-v4-bottom-nav,.mg-v5-bottom-nav,.mg-v6-bottom-nav,
.mobile-bottom-nav,.bottom-mobile-nav,#mobileBottomNav,.mg-mobile-nav{display:none!important}
/* acessibilidade */
:focus-visible{outline:3px solid rgba(7,92,255,.35)!important;outline-offset:2px}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* ===== Mandrake V8 — experiência do cliente consolidada ===== */
:root{
  --mg-shell:1280px;
  --mg-gap:22px;
  --mg-blue:#075cff;
  --mg-blue-2:#0d6efd;
  --mg-navy:#0b1634;
  --mg-surface:#ffffff;
  --mg-soft:#f6f9ff;
  --mg-line:#d7e5ff;
  --mg-shadow-soft:0 10px 28px rgba(15,66,150,.08);
  --mg-shadow-card:0 8px 24px rgba(15,66,150,.07);
}

body{overflow-x:hidden!important;background:#fff!important}
.mg-wide-shell,.mg-container{width:min(var(--mg-shell),calc(100% - 32px))!important;margin-inline:auto!important}
.mg-main{padding-top:84px!important}

/* Cabeçalho compacto e consistente */
header:not(.mg-cart-header):not(.admin-header),.site-header,.main-header,.mg-header{
  position:sticky!important;top:0!important;z-index:8000!important;height:64px!important;min-height:64px!important;
  display:flex!important;align-items:center!important;background:rgba(255,255,255,.96)!important
}
header:not(.mg-cart-header):not(.admin-header) nav,.site-header nav,.main-header nav,.mg-header nav{
  width:min(var(--mg-shell),calc(100% - 24px))!important;margin-inline:auto!important;min-height:64px!important
}

/* HOME: remove repetição e comprime jornada inicial */
body:has(.mg-home-entry-hero) .mg-home-entry-hero{
  margin-top:10px!important;border:1px solid var(--mg-line)!important;background:linear-gradient(135deg,#fff 0%,#f7faff 72%,#e9f2ff 100%)!important;
  box-shadow:var(--mg-shadow-soft)!important;border-radius:24px!important;padding:26px 28px!important
}
body:has(.mg-home-entry-hero) .mg-home-entry-inner{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:24px!important;align-items:center!important}
body:has(.mg-home-entry-hero) .mg-home-entry-title{font-size:clamp(2rem,4vw,3.5rem)!important;line-height:1!important;letter-spacing:-.045em!important;margin:.4rem 0 .65rem!important}
body:has(.mg-home-entry-hero) .mg-home-entry-sub{max-width:720px!important;font-size:1rem!important;line-height:1.55!important;color:#4f5f7b!important}
body:has(.mg-home-entry-hero) .mg-home-entry-actions{display:flex!important;gap:10px!important;margin-top:18px!important}
body:has(.mg-home-entry-hero) .mg-home-entry-btn{min-height:46px!important;padding:0 18px!important;border-radius:14px!important;font-weight:900!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important}
body:has(.mg-home-entry-hero) .mg-home-entry-chips{display:none!important}
body:has(.mg-home-entry-hero) .mg-home-entry-card{min-width:180px!important;padding:22px!important;border:1px solid var(--mg-line)!important;border-radius:20px!important;background:#fff!important;text-align:center!important;box-shadow:var(--mg-shadow-card)!important}
body:has(.mg-home-entry-hero) .mg-home-entry-card strong{display:block!important;font-size:2rem!important;color:var(--mg-blue)!important;line-height:1!important}
body:has(.mg-home-entry-hero) .mg-home-entry-card span{display:block!important;margin-top:7px!important;font-size:.72rem!important;text-transform:uppercase!important;letter-spacing:.08em!important;font-weight:900!important;color:#5f6f8b!important}

/* Stories: faixa compacta, sem bloco vazio gigante */
.mg-story-shell{padding-top:16px!important}
.mg-story-card{border:1px solid var(--mg-line)!important;border-radius:24px!important;background:#fff!important;box-shadow:var(--mg-shadow-soft)!important}
.mg-story-empty-inner{padding:18px 22px!important}
.mg-story-title{font-size:clamp(1.45rem,2vw,2rem)!important;margin-top:4px!important}
.mg-story-desc{margin-top:2px!important}
.mg-story-logo{width:48px!important;height:48px!important;border-radius:14px!important}
.mg-story-content-box{padding:10px!important;min-height:104px!important;display:flex!important;align-items:center!important;justify-content:center!important}
.mg-story-content-box [class*="story"]{margin:0!important}

/* Remove bloco rotativo redundante; mantém somente 3 benefícios */
.mg-benefit-panel{display:none!important}
.mg-fashion-trust{margin-top:0!important;gap:12px!important}
.mg-fashion-trust-item{padding:14px 16px!important;border-radius:16px!important;box-shadow:none!important;background:#fff!important}
.mg-fashion-trust-icon{width:38px!important;height:38px!important;border-radius:12px!important}

/* Seção de destaque */
.mg-products-section,.mg-products-shell,[class*="products-highlight"]{scroll-margin-top:82px}
.mg-products-heading,.mg-section-title{font-size:clamp(1.9rem,3.2vw,3rem)!important;letter-spacing:-.04em!important}

/* CATÁLOGO: topo simplificado */
body:has(.js-products-grid) .mg-main{padding-top:78px!important}
body:has(.js-products-grid) .mg-hero-pro{margin-top:10px!important;padding:24px 26px!important;border:1px solid var(--mg-line)!important;border-radius:24px!important;background:linear-gradient(135deg,#fff,#f3f8ff 75%,#dfeeff)!important;box-shadow:var(--mg-shadow-soft)!important}
body:has(.js-products-grid) .mg-hero-pro-inner{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:22px!important;align-items:center!important}
body:has(.js-products-grid) .mg-hero-copy h1{font-size:clamp(2rem,4vw,3.35rem)!important;line-height:1!important;letter-spacing:-.05em!important;margin:.3rem 0 .65rem!important}
body:has(.js-products-grid) .mg-hero-copy p{max-width:760px!important;line-height:1.5!important;color:#53627d!important}
body:has(.js-products-grid) .mg-hero-actions{display:flex!important;gap:10px!important;margin-top:15px!important}
body:has(.js-products-grid) .mg-hero-cta{min-height:44px!important;padding:0 16px!important;border-radius:13px!important;font-weight:900!important}
body:has(.js-products-grid) .mg-hero-status-card{min-width:170px!important;padding:18px!important;border-radius:18px!important;background:#fff!important;border:1px solid var(--mg-line)!important;text-align:center!important;box-shadow:var(--mg-shadow-card)!important}
body:has(.js-products-grid) .mg-trust-strip{display:none!important}
body:has(.js-products-grid) .mg-filter-panel{margin-top:16px!important;padding:16px!important;border:1px solid var(--mg-line)!important;border-radius:20px!important;background:#fff!important;box-shadow:var(--mg-shadow-soft)!important}
body:has(.js-products-grid) .mg-product-filter-grid{display:grid!important;grid-template-columns:minmax(280px,1.6fr) repeat(3,minmax(150px,.7fr))!important;gap:10px!important}
body:has(.js-products-grid) .mg-input-pro{height:46px!important;border-radius:13px!important}
body:has(.js-products-grid) #abasConteudo,body:has(.js-products-grid) #mgUnifiedResults{margin-top:28px!important}
body:has(.js-products-grid) .js-products-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important}

/* Cards de produto: altura e hierarquia estáveis */
.produto-card,.product-card{display:flex!important;flex-direction:column!important;min-width:0!important;border-radius:18px!important;box-shadow:var(--mg-shadow-card)!important;background:#fff!important}
.produto-card>img,.product-card>img,.produto-card [class*="image"] img,.product-card [class*="image"] img{aspect-ratio:4/5!important;object-fit:cover!important;background:#f2f5f9!important}
.produto-card .p-3,.produto-card .p-4,.product-card .p-3,.product-card .p-4{padding:14px!important}
.produto-card h3,.product-card h3{font-size:1rem!important;line-height:1.25!important;margin:.3rem 0!important;min-height:2.5em!important}
.produto-card p,.product-card p{line-height:1.4!important}
.produto-card button,.product-card button,.produto-card a[class*="sacola"],.product-card a[class*="sacola"]{min-height:40px!important}

/* CARRINHO */
.mg-cart-header{height:64px!important;min-height:64px!important}
.mg-checkout-clean{width:min(1220px,calc(100% - 32px))!important;padding-top:22px!important}
.checkout-topbar{padding:18px 20px!important;margin-bottom:16px!important;border:1px solid var(--mg-line)!important;border-radius:18px!important;background:#fff!important;box-shadow:var(--mg-shadow-soft)!important}
.checkout-topbar h1{font-size:clamp(2rem,3.5vw,3rem)!important;line-height:1!important;margin:.35rem 0!important}
.checkout-layout-clean{display:grid!important;grid-template-columns:minmax(0,1.65fr) minmax(340px,.85fr)!important;gap:18px!important;margin:0!important}
.checkout-layout-clean>.col-lg-7,.checkout-layout-clean>.col-lg-5{width:auto!important;max-width:none!important;padding:0!important}
.checkout-summary-card{position:sticky!important;top:82px!important;align-self:start!important}
.cart-items-card,.checkout-summary-card{overflow:hidden!important;border-radius:18px!important}
.cart-items-head{padding:15px 18px!important}
#listaCarrinho .list-group-item{padding:14px 16px!important}
.summary-head-clean{border-radius:16px!important}
.checkout-final-btn{min-height:50px!important;border-radius:14px!important;font-weight:900!important}

/* IA sempre visível */
iframe[src*="agent-factory-chat"],iframe[title*="chat" i],iframe[title*="assist" i]{z-index:2147483646!important}

@media(max-width:980px){
  body:has(.js-products-grid) .mg-product-filter-grid{grid-template-columns:1fr 1fr!important}
  body:has(.js-products-grid) .js-products-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .checkout-layout-clean{grid-template-columns:1fr!important}
  .checkout-summary-card{position:static!important}
}

@media(max-width:820px){
  :root{--mg-nav-h:58px}
  .mg-wide-shell,.mg-container,.mg-checkout-clean{width:calc(100% - 16px)!important}
  .mg-main{padding-top:72px!important}
  header:not(.mg-cart-header):not(.admin-header),.site-header,.main-header,.mg-header,.mg-cart-header{height:58px!important;min-height:58px!important}
  header:not(.mg-cart-header):not(.admin-header) nav,.site-header nav,.main-header nav,.mg-header nav{min-height:58px!important;width:calc(100% - 12px)!important}

  body:has(.mg-home-entry-hero) .mg-home-entry-hero{padding:18px!important;border-radius:20px!important}
  body:has(.mg-home-entry-hero) .mg-home-entry-inner{grid-template-columns:1fr!important;gap:14px!important}
  body:has(.mg-home-entry-hero) .mg-home-entry-card{display:none!important}
  body:has(.mg-home-entry-hero) .mg-home-entry-title{font-size:2.25rem!important}
  body:has(.mg-home-entry-hero) .mg-home-entry-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  body:has(.mg-home-entry-hero) .mg-home-entry-btn{padding:0 10px!important;font-size:.88rem!important}

  .mg-story-card{border-radius:20px!important}
  .mg-story-empty-inner{padding:14px!important}
  .mg-story-empty-inner>div:first-child{align-items:center!important}
  .mg-story-desc{display:none!important}
  .mg-story-content-box{min-height:92px!important;padding:8px!important}
  .mg-fashion-trust{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  .mg-fashion-trust-item{display:block!important;padding:10px!important;text-align:center!important}
  .mg-fashion-trust-icon{margin:0 auto 7px!important}
  .mg-fashion-trust-item span:last-child span{display:none!important}
  .mg-fashion-trust-item strong{font-size:.73rem!important}

  body:has(.js-products-grid) .mg-hero-pro{padding:18px!important;border-radius:20px!important}
  body:has(.js-products-grid) .mg-hero-pro-inner{grid-template-columns:1fr!important;gap:12px!important}
  body:has(.js-products-grid) .mg-hero-status-card{display:none!important}
  body:has(.js-products-grid) .mg-hero-copy h1{font-size:2.2rem!important}
  body:has(.js-products-grid) .mg-hero-copy p{font-size:.88rem!important}
  body:has(.js-products-grid) .mg-hero-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  body:has(.js-products-grid) .mg-filter-panel{padding:12px!important;border-radius:18px!important}
  body:has(.js-products-grid) .mg-product-filter-grid{grid-template-columns:1fr!important;gap:8px!important}
  body:has(.js-products-grid) .js-products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .produto-card,.product-card{border-radius:14px!important}
  .produto-card h3,.product-card h3{font-size:.86rem!important;min-height:2.4em!important}
  .produto-card p,.product-card p{font-size:.75rem!important}

  #mgCleanBottomNav{height:58px!important;left:6px!important;right:6px!important;bottom:calc(6px + env(safe-area-inset-bottom))!important;border-radius:17px!important;grid-template-columns:repeat(4,1fr)!important}
  #mgCleanBottomNav a{font-size:9px!important;gap:2px!important}
  #mgCleanBottomNav a .mg-nav-icon{font-size:16px!important}
  body:not(.mg-cart-page){padding-bottom:calc(74px + env(safe-area-inset-bottom))!important}
  iframe[src*="agent-factory-chat"],iframe[title*="chat" i],iframe[title*="assist" i]{bottom:calc(72px + env(safe-area-inset-bottom))!important;right:10px!important}

  .mg-checkout-clean{padding-top:12px!important}
  .checkout-topbar{padding:15px!important;border-radius:16px!important}
  .checkout-topbar h1{font-size:2rem!important}
  .checkout-layout-clean{display:block!important}
  .cart-items-card,.checkout-summary-card{border-radius:16px!important}
  #listaCarrinho .list-group-item{padding:11px 10px!important}
  .checkout-summary-card{margin-top:12px!important}
}

@media(max-width:480px){
  body:has(.mg-home-entry-hero) .mg-home-entry-title,body:has(.js-products-grid) .mg-hero-copy h1{font-size:1.85rem!important}
  body:has(.js-products-grid) .mg-hero-actions{grid-template-columns:1fr!important}
  .mg-story-logo{width:42px!important;height:42px!important}
  .mg-story-title{font-size:1.25rem!important}
  .mg-fashion-trust-item{padding:8px 5px!important}
  .mg-fashion-trust-icon{width:32px!important;height:32px!important}
}
