/* Header, menu lateral e carrinho lateral (nova versão). */
:root{--nv-ink:#1f2420;--nv-text:#242624;--nv-muted:#6e706b;--nv-line:#ece7de;--nv-soft:#f7f4ee;--nv-gold:#bf903d;--nv-gold-soft:#f4ecdc}

/* ---------- Header ---------- */
.topbar{background:#fffffff2;border-bottom:1px solid transparent;-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);transition:border-color .25s,box-shadow .25s}
.topbar.nv-scrolled,body:has(#productPage.active) .topbar,body:has(#productsPage.active) .topbar{border-bottom-color:var(--nv-line);box-shadow:0 8px 30px #2a200c08}
.topbar .container{position:relative}
.topbar .row{gap:20px}
.topbar .logo{flex:0 0 auto;cursor:pointer;border-radius:10px}
.topbar .logo img{display:block;width:auto;height:48px;object-fit:contain}
.topbar nav.primary{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);gap:34px}
.topbar nav.primary a{padding:8px 0;font-size:14px;font-weight:400;color:#4a4d47;transition:color .2s}
.topbar nav.primary a:hover,.topbar nav.primary a.active{color:var(--nv-text)}
.topbar nav.primary a::after{content:'';position:absolute;left:0;right:0;bottom:0;height:2px;border-radius:2px;background:var(--nv-gold);transform:scaleX(0);transition:transform .25s ease}
.topbar nav.primary a:hover::after{transform:scaleX(.45)}
.topbar nav.primary a.active::after{transform:scaleX(1)}
.topbar .row>div:last-child,.topbar .row>div:last-child>div{gap:4px!important}
.topbar .btn.ghost{position:relative;display:grid;place-items:center;width:42px;height:42px;padding:0;border-radius:50%;background:transparent;color:var(--nv-text);font-size:19px;transition:background .2s}
.topbar .btn.ghost:hover{background:var(--nv-soft)}
.topbar .btn.ghost i{display:grid;place-items:center;line-height:1}
.nv-cart-badge{position:absolute;top:2px;right:0;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--nv-gold);color:#fff;font-size:10px;font-weight:600;line-height:18px;text-align:center;box-shadow:0 0 0 2px #fff}
.topbar .hamburger-menu{box-sizing:border-box;width:42px;height:42px;padding:14px 11px;border-radius:50%;background:var(--nv-soft)}
.topbar .hamburger-menu span{height:2px;background:var(--nv-text)}
.topbar .hamburger-menu span:nth-child(2){width:70%;margin-left:auto}
.topbar .hamburger-menu.open span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.topbar .hamburger-menu.open span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
.topbar .logo:focus-visible,.topbar .btn.ghost:focus-visible,.topbar .hamburger-menu:focus-visible,.topbar nav.primary a:focus-visible{outline:2px solid #a17e35;outline-offset:3px}
@media(max-width:600px){
 .topbar .logo img{width:auto;height:40px}
 .topbar .btn.ghost,.topbar .hamburger-menu{width:38px;height:38px}
 .topbar .btn.ghost{font-size:17px}
 .topbar .hamburger-menu{padding:12px 10px;margin-left:4px}
 .topbar .row>div:last-child,.topbar .row>div:last-child>div{gap:0!important}
}

/* ---------- Menu lateral (celular): simples, só os links ---------- */
#menuDialog{width:min(360px,88vw);max-width:88vw;padding:0;border:0;border-radius:26px 0 0 26px;background:#fff;box-shadow:-16px 0 50px #1c21131f}
#menuDialog::backdrop{background:#1b201d66;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
/* Entrada: painel desliza da direita, fundo escurece e os links entram em sequência.
   Saída: links somem e o painel volta para a direita (.nv-closing é colocado por navegacao.js antes do close real). */
@media(prefers-reduced-motion:no-preference){
 #menuDialog[open]{animation:nvMenuIn .5s cubic-bezier(.22,1,.36,1)}
 #menuDialog[open]::backdrop{animation:nvFadeIn .4s ease}
 #menuDialog[open] .nv-menu-heading,#menuDialog[open] .menu-list a{animation:nvItemIn .5s cubic-bezier(.22,1,.36,1) both}
 #menuDialog[open] .nv-menu-heading{animation-delay:.08s}
 #menuDialog[open] .menu-list a:nth-child(1){animation-delay:.12s}
 #menuDialog[open] .menu-list a:nth-child(2){animation-delay:.17s}
 #menuDialog[open] .menu-list a:nth-child(3){animation-delay:.22s}
 #menuDialog[open] .menu-list a:nth-child(4){animation-delay:.27s}
 #menuDialog.nv-closing{animation:nvMenuOut .34s cubic-bezier(.55,0,.75,.2) forwards}
 #menuDialog.nv-closing::backdrop{animation:nvFadeOut .34s ease forwards}
 #menuDialog.nv-closing .nv-menu-heading,#menuDialog.nv-closing .menu-list a:nth-child(n){animation:nvItemOut .18s ease forwards}
}
@keyframes nvMenuIn{from{transform:translateX(100%)}to{transform:none}}
@keyframes nvMenuOut{from{transform:none}to{transform:translateX(100%)}}
@keyframes nvFadeIn{from{opacity:0}}
@keyframes nvFadeOut{to{opacity:0}}
@keyframes nvItemIn{from{opacity:0;transform:translateX(24px)}}
@keyframes nvItemOut{to{opacity:0;transform:translateX(12px)}}
#menuDialog .menu-wrap{display:flex;flex-direction:column;gap:18px;min-height:100%;padding:16px 16px calc(24px + env(safe-area-inset-bottom,0px))}
#menuDialog .nv-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px 14px 10px;border-bottom:1px solid var(--nv-line)}
#menuDialog .nv-menu-logo{display:block;width:auto;height:38px}
#nvCloseMenu{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:var(--nv-soft);color:var(--nv-text);font-size:22px;line-height:1;cursor:pointer;transition:background .2s}
#nvCloseMenu:hover{background:#efe8da}
#menuDialog .menu-list{display:flex;flex-direction:column;gap:4px;width:100%;margin:0;padding:0}
/* Os seletores com :hover/.active repetem a base para vencer as regras antigas do index.html e do nova.css */
#menuDialog .menu-list a.btn,#menuDialog .menu-list a.btn:hover,#menuDialog .menu-list a.btn.active{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:0 16px;border:0;border-radius:16px;background:transparent;color:var(--nv-text);font-size:17px;font-weight:500;letter-spacing:-.2px;text-align:left;cursor:pointer;transition:background .2s,color .2s}
#menuDialog .menu-list a.btn::after{content:'›';font-size:22px;font-weight:300;line-height:1;color:#c9b48c;transition:transform .2s,color .2s}
#menuDialog .menu-list a.btn.active{background:var(--nv-gold-soft);color:#7c5a22;font-weight:600}
#menuDialog .menu-list a.btn.active::after{color:#b88a3e}
@media(hover:hover){
 #menuDialog .menu-list a.btn:hover:not(.active){background:var(--nv-soft)}
 #menuDialog .menu-list a.btn:hover::after{transform:translateX(3px);color:#b88a3e}
}
#menuDialog a:focus-visible,#menuDialog button:focus-visible{outline:2px solid #a17e35;outline-offset:2px}

/* ---------- Carrinho lateral ---------- */
#backdrop{background:#1b201d59;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
#drawer{width:min(440px,94vw);border-radius:28px 0 0 28px;background:#fff;box-shadow:-20px 0 60px #1c21131a;transition:transform .38s cubic-bezier(.22,1,.36,1)}
#drawer>header.nv-cart-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 22px 18px;border-bottom:1px solid var(--nv-line)}
.nv-cart-head h3{margin:0;font-size:20px;font-weight:600;letter-spacing:-.5px;color:var(--nv-text)}
.nv-cart-sub{display:block;margin-top:2px;font-size:12px;color:var(--nv-muted)}
#btnCloseDrawer{display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--nv-line);border-radius:50%;background:#fff;color:var(--nv-text);font-size:22px;line-height:1;cursor:pointer}
#btnCloseDrawer:hover{background:var(--nv-soft)}
.nv-free-ship{padding:14px 22px;border-bottom:1px solid var(--nv-line);background:#fbf8f1;font-size:12px;color:#5d6059}
.nv-free-ship p{margin:0 0 8px}
.nv-free-ship strong{color:var(--nv-text)}
.nv-free-bar{height:6px;border-radius:999px;background:#ece3d0;overflow:hidden}
.nv-free-bar span{display:block;width:0;height:100%;border-radius:inherit;background:var(--nv-gold);transition:width .4s}
#drawer .content{gap:0;padding:6px 22px}
.nv-cart-list{margin:0;padding:0;list-style:none}
.nv-cart-item{display:flex;gap:14px;padding:18px 0;border-bottom:1px solid #f1ede5}
.nv-cart-item:last-child{border-bottom:0}
.nv-cart-item>img{flex:0 0 auto;width:84px;height:100px;border-radius:14px;object-fit:cover;background:var(--nv-soft)}
.nv-cart-info{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.nv-cart-info strong{font-size:14px;font-weight:600;line-height:1.35;color:var(--nv-text)}
.nv-cart-meta{font-size:12px;line-height:1.5;color:var(--nv-muted)}
.nv-cart-remove{align-self:flex-start;margin-top:2px;padding:0;border:0;background:none;color:#9a8f7c;font:400 12px 'Poppins',sans-serif;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.nv-cart-remove:hover{color:#8a3b2b}
.nv-cart-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;padding-top:10px}
.nv-qty{display:inline-flex;align-items:center;height:36px;border:1px solid var(--nv-line);border-radius:999px}
.nv-qty button{width:34px;height:34px;padding:0;border:0;border-radius:50%;background:none;color:var(--nv-text);font-size:16px;cursor:pointer}
.nv-qty button:hover{background:var(--nv-soft)}
.nv-qty span{min-width:22px;text-align:center;font-size:13px;font-weight:600}
.nv-cart-price{font-size:15px;font-weight:600;color:var(--nv-text);white-space:nowrap}
.nv-cart-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:40px 10px;text-align:center}
.nv-cart-empty-ico{display:grid;place-items:center;width:72px;height:72px;margin-bottom:10px;border-radius:50%;background:var(--nv-soft);color:#967029;font-size:26px}
.nv-cart-empty strong{font-size:17px;font-weight:600;color:var(--nv-text)}
.nv-cart-empty p{margin:0 0 16px;font-size:13px;color:var(--nv-muted)}
.nv-cart-empty button{min-height:48px;padding:0 26px;border:0;border-radius:999px;background:var(--nv-ink);color:#fff;font:500 14px 'Poppins',sans-serif;cursor:pointer}
.nv-cart-empty button:hover{background:#2d342f}
#drawer>footer.nv-cart-foot{padding:18px 22px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--nv-line);background:#fff}
#drawer>footer.nv-cart-foot[hidden]{display:none}
.nv-cart-totals{display:grid;gap:8px;margin:0 0 16px}
.nv-cart-totals div{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:var(--nv-muted)}
.nv-cart-totals dd{margin:0;color:var(--nv-text);text-align:right}
.nv-cart-totals .nv-total{margin-top:4px;padding-top:12px;border-top:1px dashed #e6e0d3;font-size:16px;font-weight:600;color:var(--nv-text)}
#drawer #btnCheckout{display:flex;align-items:center;justify-content:center;width:100%;min-height:56px;padding:0 20px;border:0;border-radius:999px;background:var(--nv-ink);color:#fff;font-size:15px;font-weight:600;transition:background .2s}
#drawer #btnCheckout:hover{background:#2d342f;filter:none}
.nv-cart-continue{display:block;width:100%;margin-top:8px;padding:10px;border:0;background:none;color:var(--nv-muted);font:400 13px 'Poppins',sans-serif;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.nv-cart-continue:hover{color:var(--nv-text)}
#drawer button:focus-visible{outline:2px solid #a17e35;outline-offset:2px}

/* Aviso "adicionado" e botão flutuante */
.cart-toast{top:92px;bottom:auto;padding:12px 18px;border-radius:14px;background:var(--nv-ink);font-size:13px;box-shadow:0 12px 30px #0000001f}
.cart-toast i{color:#e0b665}
body:has(#drawer.open) .cart-toast{display:none!important}
.mini-cart-btn{background:var(--nv-ink);box-shadow:0 12px 30px #1f24202e}

@media(prefers-reduced-motion:reduce){#menuDialog[open]{animation:none}.topbar,#drawer,.nv-free-bar span,.topbar nav.primary a::after,#menuDialog .menu-list a i{transition:none}}
