/* homologação */
#box-aviso-homolog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #21c55d;
    color: #08110f;
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.4px;
    padding: 8px 12px;
    z-index: 1100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

/* se tiver box de homolog, empurra o header */
body.homologacao-ativa {
    padding-top: 118px;
}

/* header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 82px;
    z-index: 1000;
    background:
            radial-gradient(circle at top left, rgba(241, 205, 28, 0.06), transparent 30%),
            linear-gradient(180deg, #0e1a25 0%, #132433 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(241, 205, 28, 0.18);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

body.homologacao-ativa .header {
    top: 36px;
}

.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* logo */
.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 46px;
    display: block;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.03);
}

/* nav desktop */
.nav-desktop {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    height: 100%;
    flex: 1;
}

.nav-desktop > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 16px;
    color: var(--secondary);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-desktop > a:hover {
    color: var(--primary-light);
    background: rgba(241, 205, 28, 0.05);
}

.nav-desktop > a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--primary-light);
    transform: scaleX(0);
    transform-origin: center;
    transition: var(--transition);
}

.nav-desktop > a:hover::after {
    transform: scaleX(1);
}

.nav-desktop > a.active-link {
    color: var(--primary-light);
    background: rgba(241, 205, 28, 0.08);
}

.nav-desktop > a.active-link::after {
    transform: scaleX(1);
}

/* botões desktop */
/* ENTRAR */
.nav-desktop > a.btn-login {
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;

    background: #f1cd1c;
    color: #0b1220 !important;
    border: 1px solid #f1cd1c;

    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;

    transition: all 0.25s ease;
}

.nav-desktop > a.btn-login:hover {
    background: #e0be19;
    border-color: #e0be19;
    color: #0b1220 !important;
    transform: translateY(-1px);
}

.nav-desktop > a.btn-login::after {
    display: none;
}

/* CADASTRAR */
.nav-desktop > a.btn-outline {
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;

    background: transparent;
    color: #e5e7eb !important;
    border: 1px solid rgba(255, 255, 255, 0.16);

    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;

    transition: all 0.25s ease;
}

.nav-desktop > a.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.nav-desktop > a.btn-outline::after {
    display: none;
}

/* área cliente */
.cliente-area {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 14px;
}

.cliente-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 14px 0 16px;
    border-radius: var(--radius-pill);
    background: rgba(241, 205, 28, 0.10);
    border: 1px solid rgba(241, 205, 28, 0.20);
    color: var(--primary-light);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    max-width: 240px;
}

.cliente-info:hover {
    background: rgba(241, 205, 28, 0.14);
    transform: translateY(-1px);
}

.cliente-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-light);
}

.cliente-info i {
    font-size: 1.2rem;
    flex-shrink: 0;
    transition:
            transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
            color 0.2s ease;
    transform-origin: center;
    will-change: transform;
}

.cliente-area.active .cliente-info i {
    animation: chevronBounceUp 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    transform: rotate(180deg);
}

@keyframes chevronBounceUp {
    0% {
        transform: rotate(0deg) scale(1);
    }
    55% {
        transform: rotate(180deg) scale(1.12);
    }
    75% {
        transform: rotate(180deg) scale(0.96);
    }
    100% {
        transform: rotate(180deg) scale(1);
    }
}

/* estado padrão */
.dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 52px;
    min-width: 220px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 30;
}

/* estado ativo */
.cliente-area.active .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0,0,0,0.06);
    border-left: 1px solid rgba(0,0,0,0.06);
}

.dropdown a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.dropdown a:hover {
    background: rgba(241, 205, 28, 0.14);
    color: #000;
}

.divider {
    height: 1px;
    margin: 6px 0;
    background: rgba(15, 23, 42, 0.08);
}

/* carrinho */
/* =========================
   CART CONTAINER
========================= */
.cart {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
    color: var(--secondary);

    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-soft);

    transition: all 0.25s ease;
    flex-shrink: 0;
}

/* hover elegante */
.cart:hover {
    color: var(--primary-light);
    background: rgba(241, 205, 28, 0.08);
    border-color: rgba(241, 205, 28, 0.25);

    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* ícone */
.cart i {
    font-size: 1.8rem;
    transition: transform 0.2s ease;
}

/* leve interação no hover */
.cart:hover i {
    transform: scale(1.1);
}

/* =========================
   BADGE (CONTADOR)
========================= */
.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;

    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    border-radius: 999px;
    background: var(--primary-light);
    color: #000;

    font-size: 11px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 3px 8px rgba(0,0,0,0.25);

    transform: scale(0);
    transform-origin: center;

    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;

    pointer-events: none;
}

/* quando ativo (tem itens) */
.cart-badge.active {
    transform: scale(1);
    opacity: 1;
}

/* =========================
   ANIMAÇÃO AO ATUALIZAR
========================= */
.cart-badge.bump {
    animation: cart-bump 0.28s ease;
}

@keyframes cart-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* =========================
   VARIAÇÃO PARA MUITOS ITENS
========================= */
.cart-badge.high {
    background: #ff3b30;
    color: #fff;
}

/* mobile actions */
.mobile-actions {
    display: none;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* botão menu */
.menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.08);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--secondary);
    transition: var(--transition);
}

/* menu mobile */
.nav-mobile {
    display: none;
    position: fixed;
    top: 82px;
    left: 0;
    right: 0;
    background: rgba(11, 18, 32, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 12px 25px rgba(0,0,0,0.22);
    z-index: 998;
    padding: 12px 0 18px;
}

.nav-mobile.active {
    display: block;
}

.nav-mobile > a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 1.45rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-mobile > a:hover {
    background: rgba(241, 205, 28, 0.12);
    color: var(--primary-light);
}

/* usuário mobile */
.mobile-user {
    margin: 14px 16px 0;
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(241, 205, 28, 0.16);
    background: rgba(241, 205, 28, 0.08);
}

.mobile-user strong {
    display: block;
    margin-bottom: 10px;
    color: var(--primary-light);
    font-size: 1.4rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-user a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    color: var(--secondary);
    font-size: 1.35rem;
    font-weight: 600;
    transition: var(--transition);
}

.mobile-user a:hover {
    color: var(--primary-light);
}

/* atalhos laterais */
.wpp_telefone {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wpp_telefone a {
    width: 50px;
    height: 50px;
    border-radius: 50% 0 0 50%;
    background: rgba(16, 30, 43, 0.88);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -2px 4px 12px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.wpp_telefone a:hover {
    background: var(--primary-dark);
    transform: translateX(-5px);
}

.wpp_telefone a img {
    width: 24px;
    height: 24px;
    display: block;
}

/* container bootstrap */
.header-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* responsivo */
@media (max-width: 1200px) {
    .nav-desktop > a {
        padding: 0 12px;
        font-size: 1.32rem;
    }

    .cliente-info {
        max-width: 200px;
    }
}

@media (max-width: 992px) {
    .nav-desktop > a {
        padding: 0 10px;
        font-size: 1.24rem;
    }

    .cliente-info {
        max-width: 170px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .header {
        height: 70px;
    }

    .logo img {
        height: 40px;
    }

    .nav-desktop {
        display: none;
    }

    .mobile-actions {
        display: flex;
    }

    .nav-mobile {
        top: 70px;
    }

    .wpp_telefone a {
        width: 46px;
        height: 46px;
    }

    .wpp_telefone a img {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 576px) {
    .header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;

        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* logo totalmente à esquerda */
    .logo {
        margin: 0;
        padding: 0;
    }

    .logo a {
        margin: 0;
        padding: 0;
    }

    .logo img {
        height: 36px;
    }

    /* empurra tudo da direita */
    .mobile-actions {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    .cart {
        width: 40px;
        height: 40px;
    }

    .cart i {
        font-size: 1.6rem;
    }

    .cart-badge {
        top: -5px;
        right: -5px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
    }

    .wpp_telefone {
        gap: 6px;
    }

    .wpp_telefone a {
        width: 40px;
        height: 40px;
    }

    .wpp_telefone a img {
        width: 20px;
        height: 20px;
    }
}