/* NAVBAR FIX - Estilos para la navegación profesional */

/* ===== NAVBAR PRINCIPAL ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 52px;
    position: relative;
}

/* ===== BRAND ===== */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.brand:hover {
    transform: scale(1.05);
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6a00 0%, #d35400 100%);
    border-radius: 50%;
    color: white;
    font-size: 18px;
}

/* ===== NAVIGATION MENU ===== */

.nav-menu {
    display: none !important;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
    align-items: flex-start;
    flex-direction: column;
}

.nav-menu.active {
    display: flex !important;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 106, 0, 0.1);
    color: #ff6a00;
}

/* ===== NAVIGATION ACTIONS ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ===== CART ICON ===== */
.cart-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.cart-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cart-count {
    background: #ff6a00;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* ===== USER MENU ===== */
.user-menu-container {
    position: relative;
    z-index: 100001;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #ff6a00;
    border-radius: 50%;
    color: white;
    font-size: 14px;
}

.user-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-menu-btn.active .user-arrow {
    transform: rotate(180deg);
}

/* ===== USER DROPDOWN ===== */
.user-dropdown {
    position: fixed;
    top: 60px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e1e5e9;
    min-width: 250px;
    z-index: 100001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #ff6a00;
    border-radius: 50%;
    color: white;
    font-size: 20px;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-display-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.user-email {
    color: #666;
    font-size: 14px;
}

.user-dropdown-menu {
    padding: 10px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #333;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 8px 0;
}

.logout-btn {
    color: #dc3545 !important;
}

.logout-btn:hover {
    background: #fff5f5 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar .container {
        padding: 0 15px;
        height: 52px;
    }
    
    .brand {
        font-size: 20px;
    }
    
    .brand-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    /* Mobile menu as fixed overlay to ensure visibility */
    .nav-menu {
        display: none !important;
        position: fixed;
        top: 52px;
        left: 0;
        right: 0;
        background: rgba(17, 17, 17, 0.99);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        z-index: 1200;
        min-height: auto;
        max-height: calc(100vh - 52px);
        overflow-y: auto;
        align-items: center;
        text-align: center;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu li {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }
    
    .nav-actions {
        gap: 8px;
    }
    
    .cart-icon {
        padding: 8px 12px;
        background: rgba(255, 106, 0, 0.15);
        border-radius: 8px;
    }
    
    .cart-icon i {
        font-size: 20px;
    }
    
    .cart-icon span:not(.cart-count) {
        display: none;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 11px;
        top: 2px;
        right: 2px;
    }
    
    .user-menu-btn {
        padding: 6px 10px;
    }
    
    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .user-name {
        font-size: 13px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .user-dropdown {
        position: fixed !important;
        top: 70px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: auto !important;
        max-width: calc(100vw - 20px) !important;
        margin: 0 auto;
    }
}

/* ===== MOBILE SMALL SCREENS ===== */
@media (max-width: 480px) {
    .navbar .container {
        padding: 0 8px;
        height: 52px;
    }
    
    .brand {
        font-size: 18px;
    }
    
    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .store-name {
        display: block;
    }
    
    .nav-actions {
        gap: 4px;
    }
    
    .cart-icon {
        padding: 6px 10px;
        min-width: 44px;
        justify-content: center;
    }
    
    .cart-icon i {
        font-size: 22px;
    }
    
    .cart-count {
        width: 16px;
        height: 16px;
        font-size: 10px;
        font-weight: 700;
        top: 0;
        right: 0;
    }
    
    .user-menu-btn {
        padding: 5px 8px;
    }
    
    .user-avatar {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .user-name {
        display: none;
    }
    
    .user-arrow {
        display: none;
    }
    
    .mobile-menu-toggle {
        padding: 6px;
        font-size: 18px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* ===== DESKTOP RESET ===== */
@media (min-width: 769px) {
    .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        gap: 30px;
        background: transparent;
        box-shadow: none;
        padding: 0;
        max-height: none;
        overflow: visible;
        align-items: center;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: none !important;
    }
}

/* ===== HERO SECTION PADDING ===== */
.hero {
    margin-top: 52px;
}

@media (max-width: 768px) {
    .hero {
        margin-top: 52px;
    }
}

@media (max-width: 480px) {
    .hero {
        margin-top: 52px;
    }
}

body {
    padding-top: 0;
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}