/* ══════════════════════════════════════════════════════════
   NAVROS HEADER V2 — CSS LIMPO
   Versão consolidada — sem remendos
   ══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --nh-green:       #315C4C;
    --nh-green-dark:  #16624D;
    --nh-orange:      #F76C00;
    --nh-nav-bg:      #f3f3f3;
    --nh-header-h:    58px;
    --nh-menubar-h:   34px;
}


/* ──────────────────────────────────────────────────────────
   HEADER SUPERIOR
   ────────────────────────────────────────────────────────── */

.nh-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--nh-green);
    box-shadow: none;
}

.nh-header__inner {
    width: calc(100% - 48px);
    max-width: 1235px;

    margin: 0 auto;
    padding: 0;

    height: 67px;

    display: grid;

    /*
     * 218px = aproximadamente:
     * 162px do logo + 56px de espaço até a busca.
     *
     * A busca ocupa todo o espaço restante.
     *
     * 373px = área exclusiva dos ícones,
     * medida diretamente na Cobasi.
     */
    grid-template-columns:
        218px minmax(0, 1fr) 373px;

    column-gap: 0;

    align-items: center;
}

/* Hambúrguer só existe no mobile (o reset do tema, [type=button], vence o display:none do tema filho) */
.nh-header .nh-mobile-menu-btn { display: none; }

.nh-logo {
    width: 162px;
    max-width: 162px;

    justify-self: start;

    text-decoration: none;

    flex-shrink: 0;
}

.nh-logo__text {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.nh-search {
    width: 100%;
    max-width: none;
    min-width: 0;

    height: 40px;

    display: flex;
    align-items: center;

    background: #fff;

    border-radius: 24px;

    overflow: hidden;

    outline: none;
    box-shadow: none;
    border: none;
}

.nh-search__input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 14px;
    font-size: 0.88rem;
    color: #333;
    background: transparent;
    height: 100%;
    box-shadow: none;
    border: 0 !important;
    border-right: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;

}

.nh-search__btn {
    width: 44px;
    height: 100%;
    border: 0 !important;
    background: transparent;
    outline: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 0 !important;
    color: var(--nh-orange);
    transition: opacity 0.2s;
}

.nh-search__btn:hover { opacity: 0.7; }

.nh-search__btn svg {
    color: var(--nh-orange);
    stroke: var(--nh-orange);
}

.nh-icons {
    width: 373px;

    display: flex;
    align-items: center;

    /*
     * Exatamente a lógica encontrada na Cobasi.
     */
    justify-content: space-between;

    gap: 56px;

    margin-left: 0;

    padding-left: 44px;
    padding-right: 0;

    flex-shrink: 0;
}

.nh-icon {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s;
}

.nh-icon:hover { opacity: 0.8; }

.nh-icon svg {
    width: 22px;
    height: 22px;

    color: #fff !important;
    fill: #fff !important;
    stroke: none !important;
}

.nh-icon svg path,
.nh-icon svg circle {
    fill: #fff !important;
    stroke: none !important;
}

.nh-icon__label {
    font-size: 0.75rem;
    white-space: nowrap;
    color: #fff;
}

.nh-cart { position: relative; }

.nh-cart__badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--nh-orange);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ──────────────────────────────────────────────────────────
   MENU BAR
   ────────────────────────────────────────────────────────── */

.nh-menubar {
    width: 100%;
    position: sticky;
    top: var(--nh-header-h);
    z-index: 9998;
    background: var(--nh-nav-bg);
    border-bottom: 6px solid var(--nh-green-dark);
    box-shadow: none;
    overflow: visible;
}

.nh-menubar__inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: var(--nh-menubar-h);
    position: relative;
    overflow: visible;
}

.nh-todos {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none !important;
    border: none !important;
    border-right: 1px solid #ddd !important;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    padding: 0 16px 0 0;
    margin-right: 12px;
    height: 100%;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s;   
    border-radius: 0 !important;
    outline: none !important;
}

.nh-todos:hover { opacity: 1; text-decoration: underline; }

.nh-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
    overflow: visible;
    gap: 0;
}

.nh-menu__item {
    height: 100%;
    display: flex;
    align-items: center;
    position: static;
    overflow: visible;
}

.nh-menu__item > a {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 100%;
    padding: 0;

    position: relative;
    z-index: 2;

    border: 0;
    border-bottom: 2px solid transparent;
    color: #444 !important;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;
    white-space: nowrap;

    transition:
        color .15s ease,
        background .15s ease;
}

/* NAVROS MENU - LARGURAS ESTILO COBASI - INICIO */
.nh-menu__item:nth-child(1)  > a { width: 70px;  min-width: 70px;  } /* Home */
.nh-menu__item:nth-child(2)  > a { width: 102px; min-width: 102px; } /* Cachorros */
.nh-menu__item:nth-child(3)  > a { width: 75px;  min-width: 75px;  } /* Gatos */
.nh-menu__item:nth-child(4)  > a { width: 94px;  min-width: 94px;  } /* Pássaros */
.nh-menu__item:nth-child(5)  > a { width: 80px;  min-width: 80px;  } /* Peixes */
.nh-menu__item:nth-child(6)  > a { width: 112px; min-width: 112px; } /* Outros pets */
.nh-menu__item:nth-child(7)  > a { width: 84px;  min-width: 84px;  } /* Ofertas */
.nh-menu__item:nth-child(8)  > a { width: 94px;  min-width: 94px;  } /* Novidades */
.nh-menu__item:nth-child(9)  > a { width: 90px;  min-width: 90px;  } /* Conteúdo */
.nh-menu__item:nth-child(10) > a { width: 64px;  min-width: 64px;  } /* Loja */
.nh-menu__item:nth-child(11) > a { width: 61px;  min-width: 61px;  } /* Blog */
.nh-menu__item:nth-child(12) > a { width: 114px; min-width: 114px; } /* Atendimento */
/* NAVROS MENU - LARGURAS ESTILO COBASI - FIM */


.nh-menu__item > a:hover {
    border-bottom: 2px solid #444;
}
.nh-menu__item > a:visited,
.nh-menu__item > a:focus,
.nh-menu__item > a:active {
    color: #444 !important;
    border: 0;
    outline: 0;
}
.nh-menu__item--highlight > a { font-weight: 700; }


/* ── ABA ATIVA ── */

.nh-menu__item--has-mega.is-open > a,
.nh-menu__item--has-mega:hover > a,
.nh-menu__item--has-mega:focus-within > a {
    background: var(--nh-green-dark);
    color: #fff !important;
    border: 0;
    border-radius: 18px 18px 0 0;
    height: calc(100% - 5px);
    align-self: flex-end;
    margin: 0;
    padding-left: 18px;
    padding-right: 18px;
    position: relative;
    z-index: 10;
    overflow: visible;
}

/* curva esquerda */
.nh-menu__item--has-mega:hover > a::before,
.nh-menu__item--has-mega:focus-within > a::before {
    content: "";
    position: absolute;
    left: -16px;
    bottom: -6px;
    width: 16px;
    height: 16px;
    background: transparent;
    border-bottom-right-radius: 16px;
    box-shadow: 7px 7px 0 7px var(--nh-green-dark);
    pointer-events: none;
}

/* curva direita */
.nh-menu__item--has-mega:hover > a::after,
.nh-menu__item--has-mega:focus-within > a::after {
    content: "";
    position: absolute;
    right: -16px;
    bottom: -6px;
    width: 16px;
    height: 16px;
    background: transparent;
    border-bottom-left-radius: 16px;
    box-shadow: -7px 7px 0 7px var(--nh-green-dark);
    pointer-events: none;
}


/* ──────────────────────────────────────────────────────────
   BACKDROP
   ────────────────────────────────────────────────────────── */

.nh-mega-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 9996;
    background: rgba(0,0,0,.23);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

.nh-mega-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}


/* ──────────────────────────────────────────────────────────
   MEGA MENU
   ────────────────────────────────────────────────────────── */

.nh-mega {
    display: none;
    position: fixed;
    left: 0;
    width: 100%;
    height: 420px;
    z-index: 9997;
    background: #fff;
    padding-left: max(24px, calc((100vw - 1300px) / 2));
    padding-right: max(24px, calc((100vw - 1300px) / 2));
    border-radius: 0 0 34px 34px;
    box-shadow: 0 12px 26px rgba(0,0,0,.18);
    overflow: hidden;
    flex-direction: row;
    align-items: stretch;
}

.nh-menu__item--has-mega.is-open .nh-mega { display: flex; }
.nh-menu__item--has-mega.nh-mega-suppressed .nh-mega { display: none; }


/* ── COL 1 — ANIMAÇÃO ── */

.nh-mega__anim {
    width: 240px;
    height: 420px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    overflow: hidden;
}

.nh-mega__anim::after {
    display: none;
    content: none;
}

/* WebP como img */
.nh-mega__anim img.nh-mega__lottie {
    position: absolute;
    top: 0;
    left: 0;
    width: 240px;
    height: 420px;
    object-fit: cover;
    object-position: center bottom;
    z-index: 0;
}

/* botão fechar */
.nh-mega__close {
    -webkit-appearance: none !important;
    appearance: none !important;

    width: auto !important;
    height: 48px !important;
    min-height: 48px !important;

    flex: 0 0 48px !important;
    align-self: flex-start !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    gap: 7px !important;

    margin: 0 !important;
    padding: 0 12px !important;

    background: transparent !important;

    border: 0 !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    border-radius: 0 !important;

    outline: 0 !important;
    box-shadow: none !important;

    color: #666 !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1 !important;

    text-decoration: none !important;

    cursor: pointer !important;
}

.nh-mega__close:hover,
.nh-mega__close:focus,
.nh-mega__close:active {
    background: transparent !important;

    border: 0 !important;
    border-color: transparent !important;

    outline: 0 !important;
    box-shadow: none !important;

    color: #555 !important;
}

.nh-mega__close-x {
    color: #777 !important;

    font-size: 24px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
}

/* Lottie JSON */
.nh-mega__lottie {
    position: relative;
    z-index: 1;
    width: 224px;
    height: 372px;
    min-width: 224px;
    min-height: 372px;
    max-width: 224px;
    max-height: 372px;
    flex: 0 0 372px;
    margin: 0 auto;
    padding: 0;
    display: block;
    overflow: hidden;
}

.nh-mega__lottie svg {
    display: block;
    width: 224px;
    height: 372px;
    max-width: none;
    max-height: none;
    margin: 0;
}


/* ── COL 2 — CATEGORIAS ── */

.nh-mega__col2 {
    width: 280px;
    height: 420px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    background: var(--nh-green-dark);
    border-bottom-left-radius: 24px;
    overflow: hidden;
}

.nh-mega__cat2 {
    min-height: 31px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    color: #fff;
    font-size: 12.5px;
    line-height: 19px;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s ease, color .12s ease;
}

.nh-mega__cat2:hover { background: rgba(255,255,255,.10); }

.nh-mega__cat2.is-active {
    min-height: 32px;
    background: #fff;
    color: var(--nh-green-dark);
    border: 0;
    border-radius: 16px 0 0 16px;
    padding: 6px 14px 6px 16px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.nh-mega__cat2 svg { flex-shrink: 0; opacity: .85; }
.nh-mega__cat2.is-active svg { color: var(--nh-green-dark); stroke: currentColor; opacity: 1; }

.nh-mega__ver-todos2 {
    margin-top: 0;
    min-height: 31px;
    padding-top: 6px;
    padding-bottom: 6px;
    border-top: 1px solid rgba(255,255,255,.20);
    color: #fff;
    font-weight: 700;
}


/* ── COL 3 — SUBCATEGORIAS ── */

.nh-mega__col3 {
    flex: 1;
    height: 420px;
    padding: 16px 28px;
    background: #fff;
    overflow: hidden;
}

.nh-mega__subsub {
    display: none;
    flex-direction: column;
    gap: 1px;
}

.nh-mega__subsub.is-active { display: flex; }

.nh-mega__subsub a {
    width: max-content;
    padding: 5px 0;
    color: #454545;
    font-size: 13px;
    line-height: 18px;
    font-weight: 400;
    text-decoration: none;
    transition: color .12s ease;
}

.nh-mega__subsub a:hover { color: var(--nh-green-dark); }

.nh-mega__ver-sub {
    margin-top: 7px;
    color: #444;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
}


/* ──────────────────────────────────────────────────────────
   GAVETA LATERAL
   ────────────────────────────────────────────────────────── */

.nh-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 480px;
    max-width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: row;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    transition: left 0.3s ease;
}

.nh-drawer.is-open { left: 0; }

.nh-drawer__left {
    width: 160px;
    flex-shrink: 0;
    background: #f5f9f5;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
}

.nh-drawer__img { width: 100%; object-fit: contain; border-radius: 8px; }

.nh-drawer__right { flex: 1; overflow-y: auto; padding: 8px 0; }

.nh-drawer__close {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    padding: 14px 20px;
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}

.nh-drawer__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
    border-bottom: 1px solid #f9f9f9;
}

.nh-drawer__item:hover { background: #f5f5f5; }
.nh-drawer__item img { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; }
.nh-drawer__item svg { margin-left: auto; color: #aaa; flex-shrink: 0; }

.nh-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 99998;
}

.nh-overlay.is-open { display: block; }


/* ── Accordion do menu (conteúdo do drawer no mobile; oculto no desktop) ── */

.nh-mnav { display: none; }

.nh-mnav__list {
    --nh-pl: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nh-mnav__list--1 { --nh-pl: 34px; }
.nh-mnav__list--2 { --nh-pl: 50px; }
.nh-mnav__list--3 { --nh-pl: 66px; }

.nh-mnav__item { margin: 0; padding: 0; }

.nh-drawer .nh-mnav__row {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 0 18px 0 var(--nh-pl);
    background: #fff;
    color: #292929;
    border: 0;
    border-bottom: 1px solid #f2f2f2;
    border-radius: 0;
    box-shadow: none;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

/* linha com URL real + seta: texto navega, seta abre/fecha */
.nh-drawer div.nh-mnav__row { padding: 0 0 0 var(--nh-pl); cursor: default; }
.nh-drawer div.nh-mnav__row > .nh-mnav__link {
    flex: 1;
    display: flex;
    align-items: center;
    align-self: stretch;
    color: inherit;
    text-decoration: none;
}
.nh-drawer .nh-mnav__arrow {
    flex: 0 0 56px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #888;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
}

.nh-drawer .nh-mnav__row:hover,
.nh-drawer .nh-mnav__row:focus,
.nh-drawer .nh-mnav__arrow:hover,
.nh-drawer .nh-mnav__arrow:focus {
    background: #f5f8f6;
    color: #292929;
    outline: 0;
}
.nh-drawer .nh-mnav__row:focus-visible,
.nh-drawer .nh-mnav__arrow:focus-visible {
    outline: 2px solid var(--nh-green-dark);
    outline-offset: -2px;
}

.nh-mnav__chev { flex: 0 0 auto; color: #888; transition: transform .2s ease; }
.nh-mnav [aria-expanded="true"] .nh-mnav__chev,
.nh-mnav [aria-expanded="true"].nh-mnav__arrow .nh-mnav__chev { transform: rotate(90deg); }

.nh-mnav__item.is-open > .nh-mnav__row,
.nh-mnav__item.is-open > .nh-mnav__row > .nh-mnav__link { font-weight: 700; color: var(--nh-green-dark); }

.nh-mnav__sub { background: #f8faf9; }
.nh-mnav__sub .nh-mnav__sub { background: #f1f5f3; }
.nh-mnav__sub .nh-mnav__row { font-size: 15px; font-weight: 400; background: transparent; }


/* ──────────────────────────────────────────────────────────
   BARRA DE OFERTA
   ────────────────────────────────────────────────────────── */

.nh-offerbar {
    text-align: center;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 40px;
    max-width: 800px;
    margin: 10px auto;
    display: block;
}


/* ──────────────────────────────────────────────────────────
   RESPONSIVO
   ────────────────────────────────────────────────────────── */

@media (max-width: 1360px) {
    .nh-mega { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 1100px) {
    .nh-mega__anim { width: 200px; }
    .nh-mega__col2 { width: 250px; }
}

/* Mobile: 767px — mesmo breakpoint do header mobile no tema filho */
@media (max-width: 767px) {
    .nh-icon__label { display: none; }
    .nh-menubar { display: none; }
    .nh-mega { display: none !important; }
    .nh-header__inner { gap: 12px; padding: 0 16px; }

    /* Drawer dedicado à navegação: entra pela esquerda, sem imagem/animação */
    .nh-drawer {
        left: 0;
        width: 92vw;
        max-width: 400px;
        height: 100vh;
        height: 100dvh;
        display: block;
        overflow: hidden;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .28s ease, visibility 0s linear .28s;
        box-shadow: 4px 0 22px rgba(0,0,0,.18);
    }
    .nh-drawer.is-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform .28s ease, visibility 0s;
    }

    .nh-drawer__left,
    .nh-drawer__cats { display: none; }

    .nh-drawer__right {
        width: 100%;
        height: 100%;
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .nh-drawer .nh-drawer__close {
        width: 100%;
        min-height: 58px;
        margin: 0;
        padding: 14px 18px;
        background: #fff;
        color: #222;
        border: 0;
        border-bottom: 1px solid #eee;
        border-radius: 0;
        box-shadow: none;
        font-size: 16px;
        font-weight: 600;
        text-align: left;
    }

    .nh-mnav { display: block; }

    .nh-overlay { background: rgba(0,0,0,.38); }
}

/* GATOS — quadro mais largo para preservar toda a animação */
.nh-menu__item[data-anim*="gatos.webp"] .nh-mega__anim {
    width: 383px;
}

.nh-menu__item[data-anim*="gatos.webp"] .nh-mega__anim > img {
    width: 383px !important;
    max-width: none !important;
}
