/* ===== HEADER ===== */

.site-header {
    width: 100%;
    position: fixed;
    z-index: 99999;
    
    border: 0;
}

.header-inner {
    background: rgba(0, 0, 0, 0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner .site-container {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 1285px) {
    .header-inner .site-container {
        min-height: 90px;
    }
}

@media (max-width: 767px) {
    .header-inner .site-container {
        min-height: 80px;
    }
}

/* CONTÊINER DA ÁREA DE PESQUISA */
.header-actions {
    position: relative;
    isolation: isolate;
    width: fit-content;
    flex: 0 0 auto;
}

/* DESKTOP E TABLET: pesquisa limitada à área da direita */
.header-actions .pesquisa-header {
    inset: 0;
    width: 100%;
    height: 100%;
}

/* MOBILE: pesquisa ocupa o contêiner inteiro */
@media (max-width: 767px) {
    .header-actions {
        position: static;
        width: auto;
        flex: 0 0 auto;
    }

    .header-inner .site-container {
        position: relative;
    }

    .header-actions .pesquisa-header {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        z-index: 100;
    }
}


.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

@media (max-width: 1285px) {
    .header-left {
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .header-left {
        gap: 18px;
    }
}


/* ===== MENU ===== */

.menu-button {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

@media (max-width: 1285px) and (min-width: 768px) {
    .menu-button  {
        width: 20px;
        height: 20px;
    }
}

.menu-button span {
    width: 25px;
    height: 4px;
    display: block;
    background: var(--cor-branco);
    border-radius: 2px;
}

@media (max-width: 1285px) and (min-width: 768px) {
    .menu-button span {
        width: 20px;
        height: 3px;
    }
}

.menu-button:hover span {
    background: var(--cor-destaque);
}

.site-logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

@media (max-width: 1285px) {
    .site-logo img {
        max-height: 42px;
    }
}

.site-logo a {
    color: var(--cor-branco);
    text-decoration: none;
}

@media (max-width: 767px) {
    .header-left .toggle-tema {
        display: none;
    }
}

.header-right {
    position: relative;
    isolation: isolate;

    display: flex;
    align-items: center;
    gap: 5px;

    width: fit-content;
    flex: 0 0 auto;
    min-width: 0;

    background: rgba(0, 0, 0, 0.30);
    border-radius: 30px;
    padding: 10px;

    box-sizing: border-box;
}

@media (max-width: 1285px) {
    .header-right {
        gap: 0;
        padding: 4px;
    }
}

@media (max-width: 767px) {
    .header-right {
        gap: 10px;
    }
}


/* ===== MENU PRINCIPAL ===== */

.site-nav {
    margin: 0;
    font-size: 18px;
}

@media (max-width: 1285px) and (min-width: 768px) {
    .site-nav {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .site-nav {
        display: none;
    }
}

.site-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav li {
    position: relative;
    margin: 0;
    padding: 0 20px;
}

@media (max-width: 1285px) {
    .site-nav li {
        padding: 0 8px;
    }
}

.site-nav a {
    color: var(--cor-branco);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}



/* ===== CATEGORIAS ===== */

.menu-categorias {
    position: relative;
    padding: 0 5px 0 20px !important;
}

@media (max-width: 1285px) and (min-width: 768px) {
    .menu-categorias {
        padding: 0 5px 0 8px !important;
    }
}

.categorias-button {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--cor-branco);
    font-family: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
}

.categorias-seta {
    font-size: 13px;
    line-height: 1;
    color: inherit;
}

/* ===== DROPDOWN DE CATEGORIAS ===== */

.categorias-dropdown {
    position: absolute;
    top: calc(100% + 19px);
    right: 0;
    width: 140px;
    display: none;
    text-align: center;
    background: var(--cor-destaque);
    z-index: 9999;
}

/* Ponte invisível para não fechar durante a passagem do mouse */
.categorias-dropdown::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 19px;
}

@media (max-width: 1285px) {
    .categorias-dropdown {
        width: 130px;
    }
}

.menu-categorias:hover .categorias-seta {
    color: var(--cor-destaque);
}

.menu-categorias:hover .categorias-dropdown {
    display: block;
}

.categorias-dropdown a {
    width: 100%;
    display: block;
    box-sizing: border-box;
    padding: 12px 20px;
    color: var(--cor-branco);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 1285px) {
    .categorias-dropdown a {
        font-size: 14px;
    }
}



/* ===== LUPA ===== */

.search-button-header {
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent !important;
    border: 0;
    color: var(--cor-branco);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-button-header svg {
    width: 28px;
    height: 28px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
}

@media (max-width: 767px) {
    .search-button-header svg {
        width: 32px;
        height: 32px;
    }
}

.search-button-header svg:hover {
    color: var(--cor-destaque);
}

/* ===== BARRA DE PESQUISA ===== */

.pesquisa-header {
    position: absolute;
    inset: 0;
    z-index: 20;

    width: 100%;
    height: 100%;
    box-sizing: border-box;

    background: #1255f3;
    border-radius: 50px;

    clip-path: inset(0 0 0 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        clip-path 350ms ease,
        opacity 250ms ease,
        visibility 350ms;
}

/* ABERTA */

.pesquisa-header.aberto {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* FORMULÁRIO */

.pesquisa-header-form {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 14px 0 22px;
    box-sizing: border-box;
}

/* CAMPO */

.pesquisa-header-campo {
    flex: 1;
    min-width: 0;
    width: 100%;

    padding: 0;
    border: none;
    outline: none;
    box-shadow: none;

    background: transparent;
    color: #fff;

    font: inherit;
    font-size: 18px;
}

.pesquisa-header-campo::placeholder {
    color: rgba(255, 255, 255, 0.55);
    opacity: 1;
}

.pesquisa-header-campo:focus,
.pesquisa-header-campo:focus-visible {
    outline: none;
    border: none;
    box-shadow: none;
}

/* BOTÃO FECHAR */

.pesquisa-header-fechar {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    margin-left: 12px;
    padding: 0;

    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);

    cursor: pointer;
}

.pesquisa-header-fechar svg {
    width: 30px;
    height: 30px;

    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;

    transition:
        color 180ms ease,
        transform 180ms ease;
}

.pesquisa-header-fechar:hover {
    color: #fff;
}

.pesquisa-header-fechar:hover svg {
    transform: scale(1.08);
}

/* ===== PESQUISA MOBILE ===== */

@media (max-width: 767px) {

    .header-inner .site-container {
        position: relative;
    }

    .header-actions {
        position: static;
        width: auto;
        flex: 0 0 auto;
    }

    .header-actions .pesquisa-header {
        position: absolute;

        top: 50%;
        left: 5px;
        right: 5px;

        width: auto;
        height: 70px;

        box-sizing: border-box;
        transform: translateY(-50%);

        border-radius: 30px;
    }

    .header-actions .pesquisa-header-form {
        height: 100%;
        padding: 0 14px 0 20px;
    }
}


/* ===== OFF-CANVAS ===== */

.offcanvas-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 350px;
    max-width: 90vw;
    height: 100vh;
    background: var(--cor-branco);
    color: var(--cor-preto);
    background: rgba(0, 0, 0, 0.82)!important;
    backdrop-filter: blur(6px)!important;
    z-index: 999999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.offcanvas-menu.active {
    transform: translateX(0);
}


/* ===== CABEÇALHO OFF-CANVAS ===== */

.offcanvas-header {
    height: 100px;
    padding: 0 4px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 1285px) {
    .offcanvas-header {
        height: 90px;
    }
}

@media (max-width: 767px) {
    .offcanvas-header {
        height: 80px;
    }
}

.offcanvas-header img {
    display: block;
    width: 100px;
    height: auto;
    object-fit: contain;
}

.offcanvas-header-right {
    display: flex;
    gap: 10px;
    padding-right: 15px;
}

/* ===== BOTÃO FECHAR ===== */

.offcanvas-close {
    width: 45px;
    height: 45px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--cor-branco);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.offcanvas-close svg {
    width: 28px;
    height: 28px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: square;
}


/* ===== CONTEÚDO OFF-CANVAS ===== */

.offcanvas-content {
    padding: 28px 18px;
}

.offcanvas-home {
    display: block;
    margin-bottom: 16px;
    color: var(--cor-branco);
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
}

/* ===== MENU PRINCIPAL ===== */

.offcanvas-categorias {
    margin: 0;
}


.offcanvas-categorias ul {
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.offcanvas-categorias li {
    position: relative;
    margin: 0;
    padding: 15px 0;
}

.offcanvas-categorias a {
    color: var(--cor-branco);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}
