/* ========================================
   NAVBAR UNIFICADA - Construmega System
   ======================================== */

/* ========== NAVBAR CONTAINER ========== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* ========== NAVBAR BRAND/LOGO ========== */
.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6c7ae0, #8b96e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    animation: logoPulso 2.2s ease-in-out infinite;
    transform-origin: center;
}

@keyframes logoPulso {
    0% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(108, 122, 224, 0)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(108, 122, 224, 0.7)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(108, 122, 224, 0)); }
}

.navbar-brand .brand-text {
    background: linear-gradient(135deg, #6c7ae0, #8b96e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== NAVIGATION LINKS ========== */
.navbar-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #6c7ae0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6c7ae0;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========== BADGES ========== */
.pontos-badge,
.carrinho-badge {
    background: linear-gradient(135deg, #6c7ae0, #8b96e0);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(108, 122, 224, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pontos-badge:hover,
.carrinho-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 122, 224, 0.45);
}

.pontos-badge i,
.carrinho-badge i {
    font-size: 1rem;
}

.carrinho-contador {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========== BUTTONS ========== */
.btn-login {
    background: linear-gradient(135deg, #6c7ae0, #5a68ce);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 122, 224, 0.3);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 122, 224, 0.4);
    color: white;
}

.btn-register {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.btn-sair {
    background: linear-gradient(135deg, #ff6b9d, #c94b7d) !important;
}

/* ========== DROPDOWN MENU ========== */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.nav-dropdown-toggle:hover {
    color: #6c7ae0;
}

.nav-dropdown-toggle i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nav-dropdown.active .nav-dropdown-toggle {
    color: #6c7ae0;
}

.nav-dropdown.active .nav-dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    overflow: hidden;
}

.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #6c7ae0, #8b96e0);
    color: white;
}

.dropdown-item:hover i {
    transform: translateX(3px);
}

.dropdown-item.admin-item {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-weight: 600;
}

.dropdown-item.admin-item:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

/* 🔐 Opções de Admin por Permissão */
.dropdown-item.admin-option {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
    font-weight: 600;
}

.dropdown-item.admin-option:hover {
    background: linear-gradient(135deg, #db2777, #be185d);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

/* Separador e Header no Dropdown */
.dropdown-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e5e7eb;
    height: 0;
}

.dropdown-header {
    padding: 0.75rem 1.25rem;
    color: #6366f1;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(108, 122, 224, 0.05));
}
}

.dropdown-item.logout-item {
    border-top: 2px solid #f3f4f6;
    background: #fef2f2;
    color: #ff6b9d;
    font-weight: 600;
}

.dropdown-item.logout-item:hover {
    background: linear-gradient(135deg, #ff6b9d, #c94b7d);
    color: white;
}

/* ========== HAMBURGER BUTTON ========== */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
    z-index: 1100;
}

.navbar-hamburger:hover {
    background: rgba(108, 122, 224, 0.1);
}

.navbar-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1f2937;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.navbar-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 900px) {
    .navbar-hamburger {
        display: flex;
    }

    .navbar-content {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0;
    }

    .navbar-brand {
        flex: 1;
        font-size: 1.4rem;
    }

    .navbar-brand img {
        height: 32px;
        max-width: 100px;
    }

    .navbar-brand .brand-text {
        display: none;
    }

    .navbar-nav {
        display: none;
        flex-direction: column;
        gap: 0.25rem;
        width: 100%;
        padding: 0.75rem 0 1rem;
        border-top: 1px solid #f3f4f6;
        margin-top: 0.5rem;
    }

    .navbar-nav.menu-aberto {
        display: flex;
    }

    .nav-link,
    .nav-dropdown-toggle {
        padding: 0.6rem 0.25rem;
        font-size: 1rem;
        border-radius: 8px;
        width: 100%;
        display: block;
    }

    .pontos-badge,
    .carrinho-badge,
    .btn-login {
        width: 100%;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        justify-content: space-between;
        background: #f9fafb;
        padding: 0.6rem 0.75rem;
        width: 100%;
    }

    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: 1px solid #f3f4f6;
        border-radius: 8px;
        margin: 0.25rem 0;
        display: none;
    }

    .dropdown-menu::before {
        display: none;
    }

    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-brand img {
        height: 28px;
        max-width: 80px;
    }

    .navbar-content {
        padding: 0.6rem 0.75rem;
    }
}
