* {
    box-sizing: border-box;
}

body {
    padding-top: 130px;
}

.cabecalho-fixo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 99999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* DESKTOP */

.header-desktop {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 8px 55px 10px;
    gap: 8px;
}

.linha-topo-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo-desktop {
    width: 220px;
    display: flex;
    align-items: center;
}

.logo-desktop img {
    height: 58px;
    width: auto;
    display: block;
}

.whatsapp-desktop {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.link-whatsapp-desktop {
    color: green;
    text-decoration: none;
    font-weight: bold;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.icone-whatsapp-desktop {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.acoes-topo-desktop {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cliente-dropdown-desktop {
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.btn-conta-topo {
    height: 42px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background: #f3f3f3;
    color: #0047ff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
}

.btn-conta-topo span {
    max-width: 170px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.btn-conta-topo:hover {
    background: #e9e9e9;
}

.icone-login-conta {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.menu-conta-dropdown {
    display: block;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 185px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
    z-index: 999999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.menu-conta-dropdown a {
    display: block;
    padding: 13px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
}

.menu-conta-dropdown a:hover {
    background: #f2f5ff;
    color: #0047ff;
}

.cliente-dropdown-desktop:hover .menu-conta-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* CARRINHO */

.btn-carrinho-topo {
    position: relative;
    height: 42px;
    width: 48px;
    border-radius: 6px;
    background: #fff;
    color: #0047ff;
    text-decoration: none;
    font-size: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-carrinho-topo:hover {
    background: #f2f5ff;
}

.icone-carrinho-topo {
    font-size: 25px;
    line-height: 1;
}

.badge-carrinho-topo {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ff3333;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* BUSCA DESKTOP */

.linha-busca-desktop {
    width: 100%;
    display: flex;
    justify-content: center;
}

.busca-desktop {
    width: 100%;
    max-width: 1120px;
}

.busca-desktop form {
    width: 100%;
}

.form-busca-header {
    display: flex;
    gap: 6px;
    width: 100%;
}

.form-busca-header input {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 8px 14px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
}

.form-busca-header input:focus {
    border-color: #0d8cff;
    box-shadow: 0 0 0 2px rgba(13, 140, 255, 0.15);
}

#busca-header-desktop {
    flex: 1.7;
}

#aplicacao-header-desktop {
    flex: 1.7;
}

#referencia-header-desktop {
    flex: 1.1;
}

.btn-buscar-header,
.btn-limpar-header {
    height: 34px;
    padding: 0 16px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-buscar-header {
    border: none;
    background: #0d8cff;
    color: #fff;
}

.btn-buscar-header:hover {
    background: #006dcc;
}

.btn-limpar-header {
    background: #777;
    color: #fff;
}

.btn-limpar-header:hover {
    background: #555;
}

.btn-carrinho-header {
    display: none !important;
}

/* MENU DESKTOP */

.menu-desktop {
    background: #0d8cff;
    display: flex;
    align-items: center;
    padding: 0 55px;
    min-height: 40px;
}

.menu-desktop a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    padding: 10px 14px;
    min-height: 40px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: background 0.3s;
}

.menu-desktop a:hover {
    background-color: #0a6fcc;
}

.menu-desktop a.ativo {
    background-color: #064f99 !important;
    color: #fff !important;
}

.dropdown-categorias {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-conteudo {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 160px;
    z-index: 999999;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.dropdown-conteudo a {
    display: block;
    color: #000;
    padding: 10px 14px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.dropdown-conteudo a:hover {
    background: #f2f2f2;
}

.dropdown-categorias:hover .dropdown-conteudo {
    display: block;
}

/* MOBILE BASE */

.header-mobile {
    display: none;
}

.menu-lateral-mobile {
    display: none;
}

/* MOBILE */

@media (max-width: 768px) {

    body {
        padding-top: 105px;
    }

    .header-desktop,
    .menu-desktop {
        display: none !important;
    }

    .cabecalho-fixo {
        height: auto !important;
        min-height: 0 !important;
    }

    .header-mobile {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        background: #fff;
        padding: 6px 10px;
        gap: 8px;
        width: 100%;
    }

    .logo-mobile {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .logo-mobile img {
        max-height: 50px;
        width: auto;
        display: block;
    }

    .linha-mobile-acoes {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 18px;
    }

    .botao-menu-mobile {
        border: none;
        background: transparent;
        font-size: 30px;
        font-weight: 800;
        cursor: pointer;
        color: #111;
        padding: 0;
        line-height: 1;
    }

    .whatsapp-mobile {
        display: flex;
        align-items: center;
        gap: 5px;
        color: #128c3c;
        font-weight: 800;
        text-decoration: none;
        font-size: 13px;
        white-space: nowrap;
    }

    .icone-whatsapp-mobile {
        width: 21px;
        height: 21px;
        object-fit: contain;
    }

    .btn-carrinho-topo {
        position: relative;
        text-decoration: none;
        font-size: 24px;
        height: auto;
        width: auto;
        padding: 0;
        background: transparent;
        color: #0047ff;
    }

    .icone-carrinho-topo {
        font-size: 24px;
    }

    .badge-carrinho-topo {
        position: absolute;
        top: -8px;
        right: -10px;
        background: #dc3545;
        color: #fff;
        font-size: 10px;
        border-radius: 999px;
        min-width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu-lateral-mobile {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 82%;
        max-width: 330px;
        height: 100vh;
        background: #fff;
        z-index: 999999;
        box-shadow: 4px 0 18px rgba(0,0,0,0.18);
        padding: 18px;
        overflow-y: auto;
    }

    .fechar-menu-mobile {
        border: none;
        background: transparent;
        font-size: 34px;
        line-height: 1;
        cursor: pointer;
        float: right;
    }

    .cliente-logado-menu {
        clear: both;
        margin: 20px 0 14px;
        padding: 12px;
        border-radius: 10px;
        background: #f5f7f8;
        font-weight: 800;
        color: #111;
    }

    .menu-lateral-mobile a {
        display: block;
        padding: 12px 8px;
        color: #111;
        text-decoration: none;
        font-weight: 700;
        border-bottom: 1px solid #eee;
    }

    .busca-menu-mobile {
        clear: both;
        padding: 12px 0;
        margin-bottom: 6px;
        border-bottom: 1px solid #eee;
    }

    .form-busca-menu-mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .form-busca-menu-mobile input {
        height: 40px;
        border: 1px solid #ddd;
        border-radius: 9px;
        padding: 0 10px;
        font-size: 14px;
    }

    .form-busca-menu-mobile button {
        height: 40px;
        border: none;
        border-radius: 9px;
        background: #0d6efd;
        color: #fff;
        font-weight: 800;
        cursor: pointer;
    }

    .form-busca-menu-mobile a {
        text-align: center;
        background: #6c757d;
        color: #fff;
        border-radius: 9px;
        padding: 10px;
        border-bottom: none;
    }
}

/* DESKTOP GARANTIDO */

@media (min-width: 769px) {
    .header-mobile,
    .menu-lateral-mobile {
        display: none !important;
    }
}
