* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

a.cart-circle:hover,
a.cart-circle:focus,
a.cart-circle:active {
    background: #fff;
    color: #2a0a82;
    text-decoration: none;
    opacity: 1;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background: #f5f5f5;
}

/* Barra superior */
.top-bar {
    background: #3b73ff;
    color: #fff;
    text-align: center;
    padding-top: 2px;
}

.top-bar i {
    margin: 0 60px;
    cursor: pointer;
}

.top-bar a {
    color: #fff;              /* faz o ícone aparecer */
    text-decoration: none;    /* tira sublinhado */
    display: inline-flex;     /* mantém alinhado */
    align-items: center;
}

.top-bar a i {
    margin: 0 60px;
    cursor: pointer;
}



/* Header desktop */
.header {
    background: #2a0a82;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 15px 30px;
    gap: 30px;
}

.logo img {
    height: 100px;
}


.search-desktop {
    flex: 1;
    display: flex;
}

/* 🔥 o form agora ocupa o espaço */
.search-desktop form {
    flex: 1;
    display: flex;
}

/* input da busca */
.search-desktop input {
    flex: 1;
    padding: 22px;
    border-radius: 6px 0 0 6px;
    border: none;
    outline: none;
}

/* botão */
.search-desktop button {
    padding: 10px 20px;
    border: none;
    background: #3b73ff;
    color: #fff;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

.search-mobile form {
    display: flex;
    align-items: center;
    width: 100%;
}

.search-mobile button {
    background: none;
    border: none;
    cursor: pointer;
    color: #2a0a82;
    font-size: 16px;
}


.user-area {
    display: flex;
    align-items: center;
    gap: 25px;
}

.user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.user img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: solid 3px #f6f3ff;
    margin-right: 5px;
}

.user-link img.icon-user {
    border: none;
}

/* Mobile */
.header-mobile {
    display: none;
    background: #2a0a82;
    padding: 15px;
}

.header-mobile .icons {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    color: #fff;
    font-size: 25px;
    margin-top: 10px;
    margin-left: 10px;
    margin-right: 10px;
}

.search-mobile {
    margin-top: 15px;
    display: flex;
    background: #fff;
    border-radius: 20px;
    padding: 8px 15px;
    align-items: center;
}

.search-mobile input {
    flex: 1;
    border: none;
    outline: none;
}

.search-mobile i {
    color: #2a0a82;
}

.user-link span {
    color: #fff !important;
}

/* === Carrinho com fundo circular branco === */

.cart {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    color: #fff;
}

/* círculo branco do carrinho */
.cart-circle {
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2a0a82;
    /* mesma cor do header */
    font-size: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

/* valor do carrinho */
.cart-value {
    white-space: nowrap;
}

.cart-badge {
    position: relative;
}

.cart-badge .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #3b73ff;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}


/*--------------------------------------------------------------*/
/* MENU DESKTOP */
.menu-desktop {
    border-top: 2px solid #2f6bff;
   
     background: linear-gradient(180deg, #200077, #3a14b7);
    display: flex;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* LISTA PRINCIPAL */
.menu-principal {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

/* ITEM PRINCIPAL */
.menu-item {
    position: relative;
    padding: 16px 22px;
}

/* LINK PRINCIPAL */
.menu-item>a {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

/* SETINHA */
.menu-item>a::after {
    content: "▾";
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* HOVER ITEM */
.menu-item:hover>a {
    color: #ffffff;
}

.menu-item:hover>a::after {
    transform: rotate(180deg);
}

/* SUBMENU */
.submenu {
    list-style: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: #2a0a82;
    border-radius: 8px;
    min-width: 230px;
    padding: 10px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
    left: 8px;
}

/* MOSTRAR SUBMENU */
.menu-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ITENS SUBMENU */
.submenu li {
    padding: 8px 18px;
}

/* LINKS SUBMENU */
.submenu li a {
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    display: block;
    border-radius: 4px;
    transition: background 0.3s ease, padding-left 0.3s ease;
}

/* HOVER SUBMENU */
.submenu li a:hover {
    background: rgba(255, 255, 255, 0.12);
    padding-left: 22px;
}


/* menu mobile escondido por padrão */
.menu-mobile,
.menu-overlay {
    display: none;
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}
/*-------------------------------------------*/
/* ===== MODAL CARRINHO ===== */
.modal-overlay{
    position:fixed;
    top:0;
    left:0;
    width:100vw;
    height:100vh;
    background:rgba(0,0,0,0.45);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:99999;
}

.modal-box{
    background:#fff;
    width:320px;
    border-radius:10px;
    box-shadow:0 20px 40px rgba(0,0,0,.25);
    animation:modalFade .2s ease;
    overflow:hidden;
    font-family:Arial, sans-serif;
}

.modal-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 16px;
    background:#f5f5f5;
    font-weight:600;
}

.modal-body{
    padding:22px;
    font-size:15px;
    color:#333;
}

.modal-footer{
    padding:12px 16px;
    text-align:right;
}

.btn-ok{
    background:#2d6cdf;
    color:#fff;
    border:none;
    padding:6px 16px;
    border-radius:5px;
    cursor:pointer;
}

.btn-ok:hover{
    background:#2457b7;
}

.modal-close{
    background:none;
    border:none;
    font-size:20px;
    cursor:pointer;
    color:#777;
}

.modal-close:hover{
    color:#000;
}

@keyframes modalFade{
    from{transform:scale(.9);opacity:0}
    to{transform:scale(1);opacity:1}
}

/*-------------------------------------------*/




/* RESPONSIVO */
@media (max-width: 1250px) {
    .menu-mobile,
    .menu-overlay {
        display: block;
    }

    .header,
    .menu-desktop {
        display: none;
    }

    .header-mobile {
        display: block;
        background: #2a0a82;
        padding: 10px;
    }

    /* LINHA PRINCIPAL */
    .mobile-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* LOGO */
    .logo_celular img {
        height: 100px;
        width: auto;
        flex-shrink: 0;
    }

    /* BUSCA */
    .search-mobile {
        flex: 1;
        display: flex;
        align-items: center;
        background: #fff;
        border-radius: 20px;
        padding: 6px 12px;
    }

    .search-mobile input {
        flex: 1;
        border: none;
        outline: none;
        font-size: 14px;
    }

    /* ÍCONES */
    .icons {
        display: flex;
        align-items: center;
        gap: 14px;
        color: #fff;
        font-size: 18px;
        flex-shrink: 0;
    }

    /* USUÁRIO */
    .user-mobile {
        display: flex;
        align-items: center;
        font-weight: bold;
    }

    .user-link-mobile {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #fff;
        text-decoration: none;
        max-width: none;
        /* 🔥 remove corte */
    }

    .user-link-mobile img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
        border: solid 3px #f6f3ff;
    }

    .user-link-mobile span {
        font-size: 16px;
        white-space: normal;
        /* 🔥 nome completo */
        overflow: visible;
        line-height: 1.1;
    }


    .user-link-mobile img.icon-user {
        border: none;
    }

    .cartr {
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: bold;
        font-size: 16px;


    }

    .user-link-mobile img {

        border: solid 2px #f6f3ff;
    }

    .cart-circle {

        width: 40px;
        height: 40px;
    }

    /* ===== MENU MOBILE ===== */
    .menu-mobile {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: #2a0a82;
        color: #fff;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .menu-mobile.open {
        left: 0;
    }

    /* HEADER */
    .menu-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px;
        font-size: 18px;
        font-weight: bold;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .close-menu {
        background: none;
        border: none;
        color: #fff;
        font-size: 26px;
        cursor: pointer;
    }

    /* LISTA */
    .menu-mobile-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .menu-mobile-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .menu-mobile-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 10px;
        color: #fff;
        text-decoration: none;
        font-size: 12px;

    }

    .menu-mobile-link:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    /* SUBMENU */
    .menu-mobile-submenu {
        list-style: none;
        padding-left: 16px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .menu-mobile-item.active .menu-mobile-submenu {
        max-height: 500px;
       
    }

    .menu-mobile-submenu a {
        display: block;
        padding: 8px 10px;
        color: #ddd;
        text-decoration: none;
        font-size: 12px;
    
    }

    .menu-mobile-submenu a:hover {
        color: #fff;
        background: #3b73ff;
    }

    /* SETA */
    .arrow {
        transition: transform 0.3s ease;
    }

    .menu-mobile-item.active .arrow {
        transform: rotate(90deg);
    }

    /* OVERLAY */
    .menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
        z-index: 999;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    } 

.menu-mobile-item.active > .menu-mobile-link {
    background: rgba(255,255,255,0.12);
    border-left: 10px solid #3b73ff;

    
}

}


@media (max-width: 900px) {

    /* Header mobile */
    .header-mobile {
        padding: 10px;
    }

    /* Linha principal */
    .mobile-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Linha de cima: logo + ícones */
    .logo_celular,
    .icons {
        display: inline-flex;
        align-items: center;
    }

    .logo_celular {
        justify-content: flex-start;
    }

    .icons {
        justify-content: flex-end;
        gap: 16px;
        font-size: 18px;
    }

    /* Container para alinhar logo + ícones */
    .logo-icons-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* Campo de busca embaixo */
    .search-mobile {
        width: 100%;
        padding: 8px 14px;
    }

    .search-mobile input {
        font-size: 14px;
    }

    /* Logo menor */
    .logo_celular img {
        height: 80px;
        width: auto;
    }

    /* Usuário mobile */
    .user-mobile {
        display: flex;
        align-items: center;
        font-weight: bold;
    }

    .user-link-mobile {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #fff;
        text-decoration: none;
        max-width: none;
        /* 🔥 remove limite */
    }

    .user-link-mobile img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

    /* 🔥 Nome completo visível */
    .user-link-mobile span {
        font-size: 15px;
        white-space: normal;
        /* permite quebra */
        overflow: visible;
        text-overflow: unset;
        line-height: 1.1;
    }

    /* Ícones continuam alinhados */
    .icons {
        display: flex;
        align-items: center;
        gap: 14px;
    }

     .top-bar a i {
    margin: 0 40px;
    cursor: pointer;
}

    .user-link-mobile img {

        border: solid 2px #f6f3ff;
    }

    .cart-circle {

        width: 40px;
        height: 40px;
    }
}

@media (max-width: 430px) {

    /* Esconde nome do usuário */
    .user-link-mobile span {
        display: none;
    }

    /* Esconde valor do carrinho */
    .cart-value {
        display: none;
    }

    /* Reduz um pouco os ícones */
    .icons {
        gap: 50px;
        font-size: 16px;
      
    }

    /* Logo um pouco menor */
    .logo_celular img {
        height: 70px;
        
    }

  

    .top-bar a i {
    margin: 0 20px;
    cursor: pointer;
}

    .user-link-mobile img {

        border: solid 2px #f6f3ff;
    }

    .cart-circle {

        width: 40px;
        height: 40px;
    }

}