/* =========================
   RESET
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
    overflow-x:hidden;
}

body{
    font-family:'Inter',sans-serif;
    background:#050816;
    color:white;
    overflow-x:hidden;
    max-width:100vw;
}

/* =========================
   GLOBAL
========================= */

a{
    text-decoration:none;
    color:inherit;
}

img{
    display:block;
    max-width:100%;
}

button,
input,
textarea,
select{
    font-family:'Inter',sans-serif;
}

.container{
    width:90%;
    max-width:1400px;
    margin:auto;
}

/* =========================
   BACKGROUND
========================= */

body::before{
    content:'';

    position:fixed;

    inset:0;

    background-image:
        linear-gradient(
            rgba(0,217,255,0.04) 1px,
            transparent 1px
        ),

        linear-gradient(
            90deg,
            rgba(0,217,255,0.04) 1px,
            transparent 1px
        );

    background-size:60px 60px;

    z-index:-2;
}

body::after{
    content:'';

    position:fixed;

    width:700px;
    height:700px;

    background:#00d9ff;

    filter:blur(180px);

    opacity:0.08;

    top:-200px;
    right:-200px;

    z-index:-1;

    pointer-events:none;
}

/* =========================
   TOPBAR
========================= */

.topbar{
    background:
    rgba(5,8,22,0.88);

    border-bottom:
    1px solid rgba(255,255,255,0.05);

    backdrop-filter:
    blur(10px);
}

.topbar-content{
    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:6px 0;
}

.topbar span{
    color:#9aa3c7;

    font-size:12px;
}

.topbar-right{
    display:flex;

    align-items:center;

    gap:24px;
}

.topbar-right a{
    color:#00d9ff;

    font-weight:600;

    font-size:12px;

    transition:0.3s;
}

.topbar-right a:hover{
    opacity:0.7;
}

/* =========================
   HEADER
========================= */

.header{
    position:fixed;

    top:0;
    left:0;
    width:100%;

    z-index:999;

    background:
    rgba(5,8,22,0.92);

    backdrop-filter:
    blur(14px);

    border-bottom:
    1px solid rgba(255,255,255,0.05);

    transition: transform 0.3s ease;
}

.header.header--hidden{
    transform: translateY(-100%);
}

/* Desktop: compact header ao scrollar */
.header--scrolled .header-content{
    padding:6px 0;
    gap:20px;
}
.header--scrolled .logo-image{
    height:36px;
}
.header--scrolled .search-box{
    height:36px;
}
.header--scrolled .search-box input{
    font-size:13px;
    padding:6px 14px;
}
.header--scrolled .search-box button{
    width:38px;
}
.header--scrolled .header-icons{
    gap:10px;
}
.header--scrolled .icon-item{
    font-size:11px;
}
.header--scrolled .icon-item svg,
.header--scrolled .icon-item img{
    width:20px;
    height:20px;
}
.header--scrolled .nav-content{
    padding:6px 0;
}

.header-content{
    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:30px;

    padding:16px 0;

    transition: padding .3s ease, gap .3s ease;
}

/* =========================
   LOGO
========================= */

.logo{

    display: flex;

    align-items: center;

    text-decoration: none;

}

.logo-image{

    height: 60px;

    width: auto;

    display: block;

    transition: height .3s ease;

    object-fit: contain;

}

/* =========================
   SEARCH
========================= */

.search-box{
    flex:1;
    max-width:480px;
    display:flex;
    align-items:center;
    background:#0b1020;
    border:1px solid rgba(255,255,255,0.06);
    border-radius:14px;
    overflow:hidden;
    transition:border-color .2s;
}
.search-box:focus-within{
    border-color:rgba(0,217,255,0.4);
}

.search-box input{
    flex:1;
    height:44px;
    border:none;
    outline:none;
    background:transparent;
    padding:0 16px;
    color:white;
    font-size:14px;
}

.search-box input::placeholder{
    color:#6f7694;
}

.search-box button{
    width:50px;
    height:44px;
    border:none;
    background:#00d9ff;
    color:black;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    transition:0.3s;
}

.search-box button:hover{
    background:#00b8d9;
}

/* =========================
   HEADER ICONS
========================= */

.header-icons{
    display:flex;

    align-items:center;

    gap:40px;
}

.icon-item{
    text-align:center;

    color:#d8def3;

    transition:0.3s;

    cursor:pointer;

    overflow:visible;

    position:relative;
}

.icon-item:hover{
    color:#00d9ff;
}

.icon-item span{
    display:block;

    font-size:22px;

    margin-bottom:6px;
}

.cart-icon-wrapper{
    overflow:visible !important;
}

.cart-icon-box{
    position:relative;
    display:inline-flex;
    justify-content:center;
}

.cart-badge{
    position:absolute;
    top:-8px;
    right:-12px;
    background:#00d9ff;
    color:#000;
    font-size:0.6rem;
    font-weight:800;
    min-width:18px;
    height:18px;
    border-radius:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0 4px;
    z-index:10;
    font-family:'Inter',sans-serif;
    pointer-events:none;
}

.icon-item p{
    font-size:14px;
}

/* =========================
   NAVBAR
========================= */

.navbar{
    border-top:
    1px solid rgba(255,255,255,0.04);
}

.nav-content{
    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:10px 0;

    transition: padding .3s ease;
}

.nav-links{
    display:flex;

    align-items:center;

    flex-wrap:wrap;

    gap:4px;
}

.nav-links a{
    position:relative;

    color:#9aa3c7;

    font-weight:500;

    transition:0.3s;
}

.nav-links a:hover{
    color:#00d9ff;
}

.nav-links a::after{
    content:'';

    position:absolute;

    left:0;
    bottom:-8px;

    width:0%;
    height:2px;

    background:#00d9ff;

    transition:0.3s;
}

.nav-links a:hover::after{
    width:100%;
}

/* =========================
   GLOBAL BUTTONS
========================= */

.btn-primary,
.btn-secondary{
    display:flex;

    justify-content:center;
    align-items:center;

    height:58px;

    padding:0 32px;

    border-radius:16px;

    font-weight:700;

    transition:0.3s;
}

.btn-primary{
    background:#00d9ff;

    color:black;
}

.btn-primary:hover{
    transform:translateY(-4px);

    box-shadow:
    0 0 35px rgba(0,217,255,0.35);
}

.btn-secondary{
    border:
    1px solid rgba(255,255,255,0.08);

    color:white;
}

.btn-secondary:hover{
    border-color:#00d9ff;

    color:#00d9ff;
}

/* =========================
   SECTION TITLE
========================= */

.section-title{
    margin-bottom:50px;
}

.section-title span{
    display:inline-block;

    margin-bottom:18px;

    color:#00d9ff;

    font-weight:700;

    letter-spacing:2px;
}

.section-title h2{
    font-size:54px;

    line-height:60px;
}

.section-title p{
    margin-top:18px;

    color:#8d95b3;

    line-height:30px;

    max-width:700px;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:1400px){

    .nav-cat-link{
        padding:12px 7px;
        font-size:12.5px;
    }

    .offer-link{
        font-size:12px;
        white-space:nowrap;
    }

}

@media(max-width:1100px){

    .header-content{
        flex-direction:column;
    }

    .search-box{
        width:100%;
        max-width:100%;
    }

}

@media(max-width:800px){

    .nav-content{
        flex-direction:column;

        gap:20px;
    }

    .nav-links{
        justify-content:center;
    }

}

@media(max-width:700px){

    .header-icons{
        width:100%;

        justify-content:center;
    }

    .section-title h2{
        font-size:38px;

        line-height:46px;
    }

}

/* =========================================================
   COIN ICON & NAV DROPDOWNS (added v3)
========================================================= */

.coin-mini{
    display:inline-block;
    width:14px; height:14px;
    object-fit:contain;
    vertical-align:-3px;
    margin:0 3px;
}
.coin-mid{
    display:inline-block;
    width:16px; height:16px;
    object-fit:contain;
    vertical-align:-3px;
    margin:0 4px;
}

/* nav categories */
.nav-cat{
    position:relative;
    display:inline-block;
}
.nav-cat-link{
    display:inline-flex; align-items:center; gap:5px;
    padding:12px 10px;
    color:#d8def3;
    font-size:13px;
    font-weight:600;
    transition:color .2s;
    cursor:pointer;
    white-space:nowrap;
}
.nav-cat-link:hover,
.nav-cat.open .nav-cat-link{ color:#00d9ff; }
.nav-arrow{
    font-size:10px;
    opacity:.6;
    transition:transform .25s;
}
.nav-cat.has-subs:hover .nav-arrow,
.nav-cat.open .nav-arrow{ transform:rotate(180deg); }

/* dropdown */
.nav-dropdown{
    position:absolute;
    top:100%; left:0;
    min-width:200px;
    background:#0d1525;
    border:1px solid rgba(0,217,255,0.18);
    border-radius:12px;
    padding:8px 0;
    box-shadow:0 12px 32px rgba(0,0,0,0.4);
    opacity:0;
    visibility:hidden;
    transform:translateY(8px);
    transition:opacity .2s, transform .2s, visibility .2s;
    z-index:100;
}
.nav-dropdown a{
    display:block;
    padding:10px 18px;
    color:#d8def3;
    font-size:13.5px;
    font-weight:500;
    transition:background .15s, color .15s;
}
.nav-dropdown a:hover{
    background:rgba(0,217,255,0.08);
    color:#00d9ff;
}
.nav-cat.has-subs:hover .nav-dropdown,
.nav-cat.open .nav-dropdown{
    opacity:1; visibility:visible; transform:translateY(0);
}

@media(max-width:900px){
    .topbar{ display:none; }
    .nav-dropdown{ position:static; opacity:1; visibility:visible; transform:none; box-shadow:none; border:none; padding:4px 0 4px 16px; background:transparent; }
    .nav-cat.has-subs:hover .nav-dropdown{ display:none; }
    .nav-cat.open .nav-dropdown{ display:block; }
    .nav-cat .nav-dropdown{ display:none; }
}


/* =========================================================
   HAMBURGER MENU MOBILE
========================================================= */

.nav-hamburger{
    display:none;
    background:rgba(255,255,255,0.04);
    border:1px solid rgba(255,255,255,0.08);
    border-radius:12px;
    padding:10px 14px;
    cursor:pointer;
    align-items:center;
    gap:10px;
    color:#d8def3;
    font-family:'Inter',sans-serif;
    font-size:14px;
    font-weight:600;
    transition:background .2s;
}
.nav-hamburger:hover{ background:rgba(0,217,255,0.08); }
.nav-hamburger span{
    display:block;
    width:18px;
    height:2px;
    background:#d8def3;
    border-radius:2px;
    transition:transform .25s, opacity .25s;
}
.nav-hamburger span:not(.hamburger-label){
    margin:0;
}
.nav-hamburger > span:nth-child(1),
.nav-hamburger > span:nth-child(2),
.nav-hamburger > span:nth-child(3){
    width:20px;
}
/* Layout interno: 3 traços empilhados */
.nav-hamburger{
    flex-direction:row;
}
.nav-hamburger > span:nth-child(1),
.nav-hamburger > span:nth-child(2),
.nav-hamburger > span:nth-child(3){
    position:absolute;
}
.nav-hamburger{
    position:relative;
    padding:10px 14px 10px 38px;
}
.nav-hamburger > span:nth-child(1){ top:13px; left:12px; }
.nav-hamburger > span:nth-child(2){ top:19px; left:12px; }
.nav-hamburger > span:nth-child(3){ top:25px; left:12px; }

.nav-hamburger.active > span:nth-child(1){ transform:translateY(6px) rotate(45deg); }
.nav-hamburger.active > span:nth-child(2){ opacity:0; }
.nav-hamburger.active > span:nth-child(3){ transform:translateY(-6px) rotate(-45deg); }

.hamburger-label{
    background:none !important;
    width:auto !important;
    height:auto !important;
    position:static !important;
    color:#d8def3;
}

/* Botão fechar dentro do drawer */
.nav-close-btn{
    display:none;
    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.1);
    border-radius:10px;
    color:rgba(255,255,255,0.85);
    font-size:1.1rem;
    cursor:pointer;
    width:38px;
    height:38px;
    align-self:flex-end;
    margin-bottom:16px;
    font-family:'Inter',sans-serif;
    flex-shrink:0;
}
.nav-close-btn:hover{ color:white; }

/* Overlay */
.nav-overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    backdrop-filter:blur(3px);
    z-index:9998;
    opacity:0;
    transition:opacity .25s;
}
.nav-overlay.show{
    display:block;
    opacity:1;
}

/* Mobile: transformar o menu em drawer lateral */
@media(max-width:900px){
    .nav-hamburger{ display:flex; }

    .nav-links{
        position:fixed;
        top:0;
        left:0;
        right:0;
        bottom:0;
        width:100vw;
        max-width:100vw;
        height:100vh;
        background:#0a1020;
        border-right:none;
        flex-direction:column;
        align-items:stretch;
        padding:24px 22px 40px;
        gap:0;
        z-index:9999;
        transform:translateX(-100%);
        transition:transform .3s ease;
        overflow-y:auto;
    }
    .nav-links.open{ transform:translateX(0); }

    .nav-close-btn{ display:block; }

    /* Categorias dentro do drawer */
    .nav-links .nav-cat{
        display:block;
        width:100%;
        border-bottom:1px solid rgba(255,255,255,0.05);
    }
    .nav-links .nav-cat-link{
        display:flex;
        justify-content:space-between;
        width:100%;
        padding:14px 12px;
        font-size:15px;
    }
    .nav-links .nav-dropdown{
        position:static !important;
        opacity:1 !important;
        visibility:hidden;
        height:0;
        overflow:hidden;
        transform:none;
        box-shadow:none;
        border:none;
        background:transparent;
        padding:0;
        transition:height .25s, padding .25s;
    }
    .nav-links .nav-cat.open .nav-dropdown{
        visibility:visible;
        height:auto;
        padding:4px 0 8px 14px;
    }
    .nav-links .nav-dropdown a{
        padding:8px 14px;
        font-size:13.5px;
        color:rgba(255,255,255,0.6);
    }
    .nav-links .nav-cat.has-subs:hover .nav-dropdown{
        height:0;
        visibility:hidden;
        padding:0;
    }
    .nav-links .nav-cat.has-subs.open .nav-dropdown{
        height:auto;
        visibility:visible;
        padding:4px 0 8px 14px;
    }

    /* Esconder o "Explorar Produtos →" do navbar no mobile (já tem dentro do menu) */
    .offer-link{
        display:none;
    }

    /* Bloquear scroll do body quando menu aberto */
    body.menu-open{
        overflow:hidden;
    }
}


/* =========================================================
   HEADER MOBILE LAYOUT — logo, conta e carrinho na mesma linha
========================================================= */
@media(max-width:900px){
    .header-content{
        display:grid;
        grid-template-columns:auto 1fr auto;
        grid-template-areas:
            "logo . icons"
            "search search search";
        gap:14px 12px;
        padding:14px 0;
        align-items:center;
    }
    .logo{
        grid-area:logo;
    }
    .logo-image{
        height:32px;
    }
    .search-box{
        grid-area:search;
        max-width:100%;
        width:100%;
    }
    .search-box input{
        height:40px;
        font-size:14px;
    }
    .search-box button{
        height:40px;
        width:48px;
    }
    .header-icons{
        grid-area:icons;
        width:auto !important;
        gap:14px;
        justify-content:flex-end !important;
    }
    .icon-item{
        text-align:center;
    }
    .icon-item span{
        font-size:18px !important;
        margin-bottom:2px !important;
    }
    .icon-item p{
        font-size:11px !important;
    }
    .account-info p{ font-size:12px; }
    .account-info small{ font-size:10px; }

    /* Mobile: hide account text, show only avatar */
    .header-account{padding:4px;gap:0}
    .header-account-info{display:none}
    .header-avatar,.header-avatar-fallback{width:32px;height:32px}
}

@media(max-width:480px){
    .header-content{
        gap:10px 8px;
        padding:10px 0;
    }
    .logo-image{ height:28px; }
    .header-icons{ gap:10px; }
    .icon-item p{ font-size:10px !important; }
    .account-info small{ font-size:9px; }
}


/* =========================================================
   DRAWER MOBILE — refinamentos
========================================================= */
@media(max-width:900px){
    .nav-links .nav-cat-link{
        padding:18px 16px !important;
        font-size:17px !important;
    }
    .nav-links .nav-dropdown a{
        padding:12px 18px !important;
        font-size:15px !important;
    }
    /* Header do drawer com label */
    .nav-links::before{
        content:'Categorias';
        display:block;
        font-size:13px;
        font-weight:700;
        color:rgba(255,255,255,0.4);
        text-transform:uppercase;
        letter-spacing:0.1em;
        padding:0 16px 12px;
        margin-bottom:8px;
        border-bottom:1px solid rgba(255,255,255,0.05);
        order:-1;
    }
}
/* Header account */
.header-account{
    display:flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
    color:#d8def3;
    transition:.2s;
    padding:6px 12px;
    border-radius:14px;
    border:1px solid transparent;
}
.header-account:hover{
    background:rgba(255,255,255,.04);
    border-color:rgba(255,255,255,.06);
}
.header-avatar{
    width:36px;height:36px;
    border-radius:50%;
    object-fit:cover;
    flex-shrink:0;
    border:2px solid rgba(255,255,255,.1);
}
.header-avatar-fallback{
    width:36px;height:36px;
    border-radius:50%;
    background:rgba(255,255,255,.06);
    display:flex;align-items:center;justify-content:center;
    font-size:18px;
    flex-shrink:0;
}
.header-account-info{
    display:flex;
    flex-direction:column;
    line-height:1.3;
}
.header-account-nick{
    font-size:13px;
    font-weight:700;
    color:#fff;
    white-space:nowrap;
}
.header-account-tag{
    color:#6b7490;
    font-weight:500;
}
.header-account-meta{
    font-size:11px;
    color:#8d95b3;
    white-space:nowrap;
}

/* Scrolled compact */
.header--scrolled .header-account{padding:3px 8px;gap:8px}
.header--scrolled .header-avatar,
.header--scrolled .header-avatar-fallback{width:28px;height:28px;font-size:14px}
.header--scrolled .header-account-nick{font-size:12px}
.header--scrolled .header-account-meta{font-size:10px}